I have a goal that I hope is realistic: I would like to keep my entire (small) shop, with 10 categories, 16 sub-categories, and 47 variants, all in one spreadsheet, just as exported by the HS > Products "Export" function. This is for efficiency's sake and to keep all the information organized and updated in one place.
Here is the workflow I am trying to create: I would like to simply open this file, modify anything necessary such as price or inventory changes, and upload the entire file back again. I would keep this downloaded and modified CSV file as my "working" file for the shop and make almost all changes in the shop directly to this file, and then upload the entire file again. Modifications could include adding language translation columns for JoomFish for use in the site's active languages, and also adding new variants, etc.
Q1) Is this a workable workflow within HS, or should I be going about it differently?
I haven't seen this in the documentation, but here are the observations I've made about the exported CSV file of my shop.
Original file as exported was:
- Encoding: UTF-8
- Separator: “;” (semicolon)
Organization of original file (your mileage may differ):
- Row 1 has the column headers
- Row 2 is the “mother row”; it is empty except for the text “product category” in col. AO categories
- Rows 3-12 are the product categories
- Rows 13-27 are the subcategories. Some are parents of variants and some are products themselves*.
- Rows 28-204 are the variants**.
Product categories:
- all columns are empty except col. AM parent_category, AN categories_image and AO categories
- AM parent_category text is “product category” (without the quotes)
Subcategories (same as base products in my shop):
- listed as “main” in col. N product_type
- AM parent_category is blank
- col. AO categories lists the category it’s associated with
- see col. F product_code; it contains the code that variants use to link to it
Variants:
- Associated with their product by means of col. B product_parent_id
Where to enter key info:
- Page title: col. AL product_page_title
- Variant weight:*** col. AX peso (last column: text entered = label of variant choices of prod. page)
- Header on product page AND link text on Subcategory listing page: col. C product_name
- Body text on product page: col. D product_description
- Inventory: product_quantity
* I have now changed this in my "working" CSV file so that subcategories with only one variant are set up like that; no subcategories are now purchasable products themselves. To do this, I zeroed out the dimensions, product_quantity and price_value and set the rest of the columns to be like other subcategories, copying and pasting the appropriate values. I.e., they are set up just like a subcategory/product that has more than one variant.
** This included a lot of "ghost" (automatically generated) variants I didn't want or need. I simply deleted those lines in my working CSV file so that I have only the variants I want. I'm not sure if this is the right procedure.
*** Weight is the only variable for the products in my shop.
Q2. Are these observations correct? Am I missing anything I need in order that when I upload the file again, the variants will link correctly with their products/subcategories, and product/subcategories with their categories?
My immediate problem is the CSV file I'm working with now on a site that urgently needs to launch (yesterday).
(I have a thread open in the Bug Report section about an error notice I get now when I export all my shop's products. However, I'm not working with that exported file at the moment, I'm only using it for reference. My problems are with a previous CSV export that had no error notices, which I've modified and am now trying to import again.)
I've turned Site > Global configuration > Server > Server Settings > Error Reporting to Maximum, which was useful at one point for eliminating some errors, but now is no longer showing any relevant errors.
On importing the whole CSV file, I get a cryptic message, usually stating something like, "X products found: X new products imported, X invalid product code, X already existing products." If there are problems anywhere, it doesn't tell me specifically what they are. In any case, the results have been very spotty: Some products are added correctly and everything is perfect. Others are completely ignored. For some products, masses of new "ghost" variants are generated (one for every possible product weight I entered into the system). Etc. So everything needs to be gone through carefully again and cleaned up, defeating the whole purpose of the exercise, which is to efficiently upload all the data in the shop at once.
Q3. Shouldn't this procedure work? Is it a bug or is there something else I should be doing to prepare for the upload? (I am half-tempted to first back up and then delete all the products, categories, etc. before uploading to see if that would work, but I don't relish the idea of restoring from backup and hoping for the best.)
This being the case, I have taken to making mini-CSV files from my main working file and trying to import only the variants associated with a single product/subcategory at a time to see if I can isolate the problem and develop a workable way to upload my information.
I am now trying only to get four variants uploaded with their full, correct information, and have them associate themselves correctly with their "mother" product/subcategory.
Before I upload, I delete all the existing variants of the product and ensure that it has the correct name, description and product code and that price, dimension and quantity information are all zeroed out. I either enter "manage variants" and delete them all; or I do that and also delete the variable "weight" to prevent HS from re-generating "ghost" variants; or I go back out to the products list (HS Products > Products, listing all sub-elements of "Product category," i.e. everything) and delete all the variants by hand there.
Then I upload. The message when I upload "4 products found: 0 new products imported, 0 invalid product code, 4 already existing products" doesn't really tell me much, so I investigate further.
On investigation, I find:
- 4 correct, new variants created, but associated with a new, blank product/subcategory that has no information (no name, no description and the critical information all zeroed out).
- Name of each new variant has oddly been taken not from the product_name column but from product_name|en-GB, one of my translation columns for JoomFish
- If I eliminated the variable "weight" before, the product/subcategory remains with no variants. If I didn't eliminate the variable, I get about 40 automatically generated variables, one for each weight of every possible item I have ever put into the system.
Q4. Any ideas on how I can get the items I upload to associate themselves with their product/subcategory correctly?
Q4a. Am I right in deleting the existing variants before uploading? How about the variable?
For reference, I'm attaching the mini-CSV file I've been experimenting with trying to upload, just trying to get these four variants right. I figure once I get this right, uploading the correct info for the rest of the shop will be a breeze.
Thanks Nicolas or anyone for any help on this issue.