CSV product import - why/how

  • Posts: 56
  • Thank you received: 0
12 years 3 months ago #66280

Hi, I've just see the CSV product import which I hadn't noticed or known about before.

I believe the documentation could be improved by more clearly explaining
--its purpose
--perhaps a simpler way to get started with all the right field names to include, etc. and
--what you can and can't do successfully: as well as products, existing categories?, new categories?, new variants? etc.

I have a very small shop with about 12 categories, each with about 2 products, and each of those with perhaps 10 variants. Price is dependent on the variant. Photo and general description vary with the product, not the variant. (Variants are just weight).

First, I'm assuming (and hoping) that it's purpose is to be able to load up all the products with all their characteristics, categories, descriptions, photos, variants, prices, etc. from a single spreadsheet where all these things can be seen side-by-side.

If this is true, this is a huge time-saver compared to clicking half a dozen times through the interface for each product, category and variant and navigating to the correct field for each bit of information. I can build a spreadsheet that contains all the relevant info, and then just upload it.

So thanks loads if that is indeed what it does. It makes setting up a shop much, much faster.

However, I don't know where to start. I already have a spreadsheet with a lot of product and variant information that I've been using to keep my own information straight.

Do I need to simply export the product table from my MySQL database and have a look at it, and figure out from looking at the existing data what each fieldname is? Do I need to export category tables, variant tables, etc. too? I.e. transfer my existing info into the exported table, and then re-import it?

Another question: What about translations? This site is still using JoomFish 2.1.6 (on HS Biz 1.6.0 on Joomla 1.5.26). Is there a way to upload the translated shop information for each language? One spreadsheet per language? Or is there some other way? (The site is starting with three languages but there will be more.)

Thanks for your help.

I have some familiarity with fiddling around in MySQL but haven't studied the HS tables much yet (and I prefer to only the study the ones I need to!)


HikaShop Business 2.3.2 on Joomla 1.5.26 + JoomFish 2.1.6 - Multilingual site

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

  • Posts: 13201
  • Thank you received: 2322
12 years 3 months ago #66355

Hi dforrest,

What do you really need to do ? Import products in a csv file ?
To do that, export your existing products in HikaShop > Products and in the toolbar click on "Export", then in the csv file you will see all the fields, and see how the csv file work.

By importing from a csv file, you can create categories, add products, add variants...

HikaShop on Joomla 1.5 is still using JoomFish, and we support about 40 languages.
You can find some documentation here:
www.hikashop.com/en/download/languages.html

CSV Documentation:
www.hikashop.com/en/support/documentatio...hikashop-import.html

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

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
12 years 3 months ago #66466

For multilingual data import, there is no documentation and the export doesn't add the translations to the CSV.
You can do it following the instructions on that thread:
www.hikashop.com/ja/forum/4-how-to/47696...import.html?limit=20

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

  • Posts: 56
  • Thank you received: 0
12 years 2 months ago #67620

Xavier wrote: Hi dforrest,

What do you really need to do ? Import products in a csv file ?
To do that, export your existing products in HikaShop > Products and in the toolbar click on "Export", then in the csv file you will see all the fields, and see how the csv file work.

By importing from a csv file, you can create categories, add products, add variants...

HikaShop on Joomla 1.5 is still using JoomFish, and we support about 40 languages.
You can find some documentation here:
www.hikashop.com/en/download/languages.html

CSV Documentation:
www.hikashop.com/en/support/documentatio...hikashop-import.html


Thanks, Xavier

Yes, that's what I need to do. Import in a CSV file while adding a few more products and variants and modifying others.

I've now exported the CSV file and am learning how it works.

Two questions for the moment

1) If I add a product or variant, there are two columns where I'm not sure what to put -- product_created and product_modified -- as they appear to be coded time stamps. If I just leave them blank will HS fill in the appropriate data when I upload the CSV file again?

2) Page titles: I'd like to ensure my page titling system is consistent, so it would be convenient to see all the page titles in the shop in a spreadsheet. But I don't see that in this spreadsheet. Where could I do that, if anywhere? I'd be willing to modify DB tables in MySQL if that's the only way to see all the page titles lined up together in table format.

Thanks


HikaShop Business 2.3.2 on Joomla 1.5.26 + JoomFish 2.1.6 - Multilingual site
Last edit: 12 years 2 months ago by dforrest.

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

  • Posts: 56
  • Thank you received: 0
12 years 2 months ago #67621

Hi Nicolas,

Thanks for the link to this thread, I'm not quite at that stage yet but I see how it's done. When I'm doing that, I'll ask if there are more questions, for now it looks pretty well explained there.


HikaShop Business 2.3.2 on Joomla 1.5.26 + JoomFish 2.1.6 - Multilingual site

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

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
12 years 2 months ago #67886

Hi,

1. Yes, these columns can be left empty.
You don't need to fill all the columns. Just the ones you need.

2. If you export your products, in the CSV, you should get a column product_page_title with the page title for each product (if you filled it of course). Is that what you're talking about ?

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

  • Posts: 56
  • Thank you received: 0
12 years 2 months ago #67976

Thanks Nicolas.

1. OK

2. Oops, now I see it, thanks, I'll give it a try.

I have now been working on my exported CSV file, opening it as an OpenOffice spreadsheet. I have made some modifications, eliminating unused variants, changing product descriptions, etc. After working on it in OpenOffice .ods format, I re-saved it in .csv format with UTF-8 encoding, and when I went to import it I got the following error message (see attachement). Zero products imported. I would think that importing the same file I exported would not lead to errors, but I must be doing something wrong. It cites "invalid product codes" but I did not touch the product codes in the file I worked on. Ideas? Thanks!

Edit 19:05 - Now I see it has imported some of the information properly. The products which were alone in their categories all were imported correctly, it seems (these are HS Product/Show pages). However, most of my categories have two subcategories, and one of these has many variants. Now if you select these categories from the main site menu, you get a blank page (these are HS Product/Listing pages).

Another factor, I edited category and subcategory names, perhaps with the import errors the products are now not finding their categories?

However, if, rather than selecting a category from the site menu, you select from the shop module at left, you get a correct page for the same item. Choose a category from the menu -> blank page, choose it from the shop module -> correct page.

I have looked at the HS display options for the "Shop left" module and compared it to those for one of the categories that comes out blank when selecting from the menu. The only difference was All sub elements vs. Direct sub elements. I change the menu item to conform to the options of the Shop left module (All sub elements), but I still get a blank page. Second screen shot of options attached, file name ending in 19.27.50. Thanks


HikaShop Business 2.3.2 on Joomla 1.5.26 + JoomFish 2.1.6 - Multilingual site
Attachments:
Last edit: 12 years 2 months ago by dforrest. Reason: missing word

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

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
12 years 2 months ago #68141

Hi,

The message didn't say "Zero products imported". It said "Zero new products imported". And that's normal since the products where already in the database.
So it's not an error. The error messages appears in red, you can't miss them :)

For the blank page, I would recommend set to "maximum" the "error reporting" option of the joomla configuration.
Then, on the bank page, you should see the error message which would help you/us understand what's going on.

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

  • Posts: 56
  • Thank you received: 0
12 years 2 months ago #71418

Thanks for this info. I have indeed set system error reporting to Maximum and now have a better view of what is going on.

For instance, on the main (intro) page for the shop, which is a Category Listing page, I get the following error messages:

Notice: Undefined index: number_of_products in [...]/public_html/components/com_hikashop/views/category/view.html.php on line 251

Notice: Undefined index: only_if_products in [...]/public_html/components/com_hikashop/views/category/view.html.php on line 256

Notice: Undefined index: only_if_products in [...]/public_html/components/com_hikashop/views/category/tmpl/listing_div.php on line 106

These may or may not be related to another anomaly I see: Most of the product categories have been duplicated. I changed many of their names in the spreadsheet, and it seems like on upload, instead of changing the existing category, it made a new category.

I will try to delete unneeded categories and variants in the backend interface instead of on the spreadsheet, then upload a new and improved version of the spreadsheet, in which among other things I will try to add new variants that have not yet been created in the backend, and see what happens.

In the meantime, if you can give me any more information about the error codes, that will be appreciated.

Thanks very much :)


HikaShop Business 2.3.2 on Joomla 1.5.26 + JoomFish 2.1.6 - Multilingual site

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

  • Posts: 56
  • Thank you received: 0
12 years 2 months ago #71503

Hi, I've now completely updated the spreadsheet to import and imported it again.

Most of the import has gone quite well, so thanks for this facility! :)

There are just a few errors left:

The errors cited in the post just above continue to display and I haven't a clue what to do about them, help appreciated.

Also, I have 9 products that show error codes on their product page. I believe they all cite the same errors, sample screenshot attached.

Text of one of the errors:

Notice: Undefined index: 259 in /home/sites/urdapilleta.eu/public_html/components/com_hikashop/views/product/view.html.php on line 1227

[Product name]
[Product photo]
[Product price] [Weight]

Notice: Undefined property: stdClass::$characteristic_id in /home/sites/urdapilleta.eu/public_html/administrator/components/com_hikashop/types/characteristic.php on line 180

Notice: Undefined property: stdClass::$characteristic_value in /home/sites/urdapilleta.eu/public_html/administrator/components/com_hikashop/types/characteristic.php on line 182

Note I have 6 product variants that are alone in their category and 6 that are alone in their subcategory. All 9 of the products with the above error codes are products that are alone in their category or subcategory. OTOH, there are 3, two that are alone in a category and one in a subcategory, that display correctly with no error codes. I think I set them all up in the same way, so I don't understand the difference, but perhaps I've done something wrong. I've set up all products as variants because the product pages look better that way. Some categories have no subcategories and just one single variant; selecting the variant is the only way to select the product.

The subcategories with multiple variants are all displaying with out error messages.

Thanks for your help.


HikaShop Business 2.3.2 on Joomla 1.5.26 + JoomFish 2.1.6 - Multilingual site
Attachments:

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

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
12 years 2 months ago #71600

These errors means that the variants/characteristics data of the product is not correct.
It must come from the CSV that you used which has something missing leading to the import not able to import properly the variants/characteristic data of your products.
Because of that, the system is searching for data which doesn't exist and produce these messages.

One solution would be to remove the characteristics of your products and add them again via the interface so that HikaShop creates all the data properly. Another would be to fix the CSV and run again an import.

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

  • Posts: 56
  • Thank you received: 0
12 years 2 months ago #71698

I've looked over the CSV really carefully to see if I could find any common theme in the variants that worked well vs. those that worked poorly, and the same for the categories they belonged to. I couldn't find any differences that would explain what happened.

I have fixed the 9 offending products via the interface. They had one thing in common -- they were all defined with a price at the product level. Perhaps this made HS reject the variant prices on import and pay no attention to the new info re existing categories/products (i.e., the price field was left blank, meaning no price). Perhaps I should have zeroed out these prices instead of leaving the field blank to make sure the existing data were overwritten?

Anyway, the error codes in these nine product pages are now gone, and the errors in the shop module and main category page are gone too, so I suppose we can close this one. If you know, I would still appreciate an answer to the question in paragraph 2 though, for next time. Thanks.


HikaShop Business 2.3.2 on Joomla 1.5.26 + JoomFish 2.1.6 - Multilingual site

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

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
12 years 1 month ago #71997

I would't be able to tell exactly what the problem could be without seeing the CSV, however, I can say that it doesn't come from the price column as it doesn't change anything for the variants.

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

  • Posts: 1
  • Thank you received: 0
11 years 3 months ago #123137

I want to import some products to my Hikashop. I tried to export my products but I'm unable to read that file. I have attached the file. Please help me out.[img]http://

File Attachment:

File Name: h818747e.csv
File Size:6 KB


Attachments:

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

  • Posts: 26165
  • Thank you received: 4029
  • MODERATOR
11 years 3 months ago #123140

Hi,

It looks like the product you are trying to export have a currency id "0", which is not possible.
Can you correctly open your product you are trying to export, in the backend ?

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.125 seconds
Powered by Kunena Forum