Import csv with variants and stock

  • Posts: 191
  • Thank you received: 5
10 years 5 months ago #159416

-- url of the page with the problem -- : http://localhost - Wamp
-- HikaShop version -- : 2.3.1 Business
-- Joomla version -- : 3.3
-- PHP version -- : 5.5.12
-- Browser(s) name and version -- : XXXXX x.x.x
-- Error-message(debug-mod must be tuned on) -- : Error_message

Hello,

I have read the Import documentation and search the forum for solutions but I still can't get my head around on how to setup the spreadsheet (to be imported as csv) so it works with the variants. The products will have will have a mix in sizes and each size will have a quantity.

I have attached the test spreadsheet and an image from shop front-end as an example. I manage to upload the the two products but with no variants added (large/x-large etc), then I made some changes after looking at one example that was posted by HikaShop and now I don't seem to get anything working.

The category and sub-category has already been setup in the shop.

If somebody could please have a look at the file and advise on what I am doing wrong, that would be much appreciated.

Thank you
Kind regards
Lene

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 191
  • Thank you received: 5
10 years 5 months ago #159418

csv file attached, could not attach the xls file.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 5 months ago #159438

Hi,

You almost have it.
You need to specify the default value of the characteristic in the main product in your CSV (so the cell of the characteristic for the main product should be filled with one of the values of the characteristic).

Please Log in or Create an account to join the conversation.

  • Posts: 191
  • Thank you received: 5
10 years 5 months ago #159533

Hi,

It is just not working, it throws all sorts of errors (attached img with example errors). I think one of the issues is the product_id? I created this, not the system. But if it is a system related code, what id would you use to connect the characteristics (variant) with the main listing?

I simplified the csv file and it works fine with the basic information, just not for the characteristics.

It is a bit difficult as it is on my localhost at the moment. Other than the categories the only thing setup is one characteristics named Size (alias: size) with 4 values: x-large, large, medium and small. Not all products will be available in all sizes.

I hope the above makes sense.

Thanks
Regards
Lene

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 5 months ago #159657

Hi,

For the brand error that's normal. The column name should be "product_manufacturer_id"

For the "product not found", it's because the products/variants don't have a product_code column.
Add one where you enter the code of each product/variant.
And in the product_parent_id column enter the product code of the main product for your variants (leave empty for the main product).
And finally remove the product_id column if present.

Then it should fix the issues you're having.

Please Log in or Create an account to join the conversation.

  • Posts: 191
  • Thank you received: 5
10 years 5 months ago #159691

Hello,

Just need to clarify, you say 'in the product_parent_id column enter the product code of the main product for your variants', does this mean that I need to import the main products first to get the product id for the main product, then import variants?

Thanks
Regards
Lene

Please Log in or Create an account to join the conversation.

  • Posts: 191
  • Thank you received: 5
10 years 5 months ago #159724

Hello,

I think I finally got it. The image in this post put the final bits into place:
www.hikashop.com/forum/4-how-to/37749-tu...t-with-variants.html

I added a unique product_code for both main product and variant (this was the missing link) and added the product_code for the main product in product_parent_id.

I did a test on just two products, fingers crossed it will work when I receive a complete product list :).

Thank you Nicolas,

Regards
Lene

Please Log in or Create an account to join the conversation.

  • Posts: 191
  • Thank you received: 5
10 years 4 months ago #161692

Hello,

This is driving me mad....

I managed to import a brand product list into the shop and from what I can see it looks just fine. Then I get another spreadsheet with new brand and it is just not importing right. The variants goes in as main products and most images does not show. I have attached sample csv.

I appreciate it if you could please have a look and see what is wrong. To me, I cannot see any difference from the other import, the same 'template' has been used.

Thank you
Kind regards
Lene

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 191
  • Thank you received: 5
10 years 4 months ago #161701

The error it is giving me when importing is:

Error
The product headrush1-large should have an empty value instead of the value headrush1 in the field product_parent_id as it is a main product (not a variant) and thus doesn't have any parent.

The product headrush2-medium should have an empty value instead of the value headrush2 in the field product_parent_id as it is a main product (not a variant) and thus doesn't have any parent.

The product headrush3-xlarge should have an empty value instead of the value headrush3 in the field product_parent_id as it is a main product (not a variant) and thus doesn't have any parent.

...........and so on.

But I cannot see the difference between the csv file I attached before and the one I previously imported without issues.

Regards
Lene

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 4 months ago #161849

Hi,

It's indeed hard to see.
Instead of the "variant" in the column "product_type", you have "variant " (a space is at the end).
Because of that the system doesn't recognize the variant as a variant but as a main product and tells you that main products should not have something in the product_parent_id column.
Remove the space there and it will work.

Please Log in or Create an account to join the conversation.

  • Posts: 191
  • Thank you received: 5
10 years 4 months ago #161856

Hello,

Thank you so much! That is one thing I would never have thought about looking for. I will not miss it in future though.

Thank you!
Regards
Lene

Please Log in or Create an account to join the conversation.

Time to create page: 0.073 seconds
Powered by Kunena Forum