Product and Variant numbering

  • Posts: 38
  • Thank you received: 2
  • Hikashop Business
4 years 9 months ago #320832

-- HikaShop version -- : HikaShop Business 4.3.0
-- Joomla version -- : 3.9.19
-- PHP version -- : ph7.0
-- Browser(s) name and version -- : firefox 77.0.1 (64-bit)

I have a product type in 4x versions
B411, B412, B413, B414 (each is a different concenration)
B411 is the default product
I add 3 Variants for B411 and each variant becomes B411_xxxx
The variants state : "no default" selected
I add the default value of the primary product so there are now 4 variants and it appears OK on the website. BUT when I try to change the numbers back to B411, B412, B413, B414; I cannot change the default product as its says the number exists and I have a number then B411_xxxx
How can I stop this. I need to keep the product number correct for the business.
What am I doing wrong?
I have added screen shots

Attachments:

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

  • Posts: 4816
  • Thank you received: 654
  • MODERATOR
4 years 9 months ago #320862

Hello,

Your error message means that among all your products one of them use the same Product code.
The most simple idea, is to check that your "main" product code isn't the one you want use in your variant and to modify it
Ex :
Product tab : ("main" product)
Code => HKTSwh01_REF


Variants tab :
Code => HKTSwh01
(variant 01)
Code => HKTSwh02
(variant 02)
Code => HKTSwh03
And so on...

IF your "main" product doesn't use this code AND also, if none of all of your products use this code, maybe this product code remains present in SQL (from a deleted product).

Then take care, wrong managing Sql can leads to important issue, you have to only modify the product code, not delete it OR delete the product entry (line), I insist it's very important.
If you have any doubts about how to process come back to us before modifying your Sql.

Note : Most often we didn't recommend to directly modifying Sql tables, here it's one of the rare cases where there is no other choice !

Hope this will help you to move forward.
Regards

Last edit: 4 years 9 months ago by Philip.

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

  • Posts: 38
  • Thank you received: 2
  • Hikashop Business
4 years 8 months ago #320981

Thanks Philipe
I must first say that I am not able to manage the SQL so may need youre help
But first lets look at what is happening.

I have a product type in 4x versions
B411, B412, B413, B414 (each is a different concentration)
B411 is the default product
I add 3 Variants for B411
B412, B413, B414
The variants state : "no default" selected
at this point I can look on the website and I see the 3 variants in the drop down but I can't see the "main" product.
If I make a choice and add to the cart I get the correct code
B412 etc. But I can't select or see the main product on the website?
I add the default value of the primary product TO THE VARIANT LIST then it shows on the website but the nibers are changed as described before, so there are now 4 variants with the wrong (appended) product code on the website.

I need to keep the product number correct for the business. If the product is deleted and the company want to assign the number to a new product would this not also be a problem?

Some background may help:
5000+ products were imported with CSV. Due to miss-configuration
some "main" products became variants of another product.
e.g.:
"main" car
variant Blue
variant Green
variant Red
variant BUS
variant TRAIN
Obvioussly bus and train are "main" products so I am trying to move these out seperating them with CSV. that is what has caiused this problem I think.
Thanks for your consideration, I can give access if required.
Regards

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

  • Posts: 83407
  • Thank you received: 13502
  • MODERATOR
4 years 8 months ago #321003

Hi,

The main product is a virtual entity. For example, if I sell a red tshirt in the sizes L and XL, the main product would be "red tshirt" and it would have two variants: L and XL.
So in your case too, you want to have B411 as a variant of the main product. You first need to change the product code of the main product to a code which doesn't exist, like "main_B41" and then add the variant B411 with the correct product code.
If your main product already has the code B411, you can't use it in a variant or another product. That why you should first change the code of the main product if it's actually using the code of a variant you want to add.

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

  • Posts: 38
  • Thank you received: 2
  • Hikashop Business
4 years 8 months ago #321022

Hi Nicolas
That makes a lot of sense, now my question, If I have 5000 products all with a current catalogue number and almost 75% of the products have a number of variants will I have to "make-up" a new number for a top level "main product"
so if B411 is my current primamry "man" product will I have to make a up a new number for B411 suxh as B411-*** and then add the real B411 as a variantI am a bit confused as to what this would lo0ok like in my CSV file as a excel file.
Sorry for the question but I'm really missing something here.
If I was enetering this manually would I have to add B411 as the "main" product but also add it as a Variant?
Kind regards
Tony

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

  • Posts: 83407
  • Thank you received: 13502
  • MODERATOR
4 years 8 months ago #321033

Hi,

In your CSV, you already have one line for the main product and one line for each variant, minus the line for missing variant.
So you would have to add that extra line, like the other variants of the product. It would actually have the same values as the main product in the characteristic columns. As for the code, you would have to change the code of the main product to something else so that you can use it in the variant's product_code column.
Now as you already have the products in the database and the system uses the product_code to match the products during the import. So if you import that modified CSV while still having the products in the database it won't work well.
You would have to first delete the products and the variants before reimporting them with the modified CSV.

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

  • Posts: 38
  • Thank you received: 2
  • Hikashop Business
4 years 8 months ago #321041

Thank you.
Sorry but I still have a couple of questions.
1

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

  • Posts: 38
  • Thank you received: 2
  • Hikashop Business
4 years 8 months ago #321042

Sorry
So if I want to modify a number of products I would need to export the CSV, delete those products on the site, make the changes in CSV and re-import? Is it necessary to delete the products?

If I export all products and change the prices can I then import the updated CSV without deleting the products on the site? this feels strange or I am miss-interpreting your comments previously.

within the site I have main products mixed in with variants of a product, can I change these "variants" to become "main" products within the site or must I delete them and re enter the incorrectly assigned "variants" as a "main" product? (as my example previously)

Can this be done with CSV or would I need to delete the products first? I assume I don't need to make a whole lot of "new" main products?

I am not sure how to proceed to solve this problem, your help is appreciated. I can give log on details if it would help to see the issues on the site or I can send screen shots privately

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

  • Posts: 83407
  • Thank you received: 13502
  • MODERATOR
4 years 8 months ago #321068

Hi,

It's not necessary, unless you want to change the product_code of those products.

So yes, you could update the prices doing that.

You can't change variants to become products. You would have to delete the variant and add the product, either manually or via CSV import.

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

  • Posts: 38
  • Thank you received: 2
  • Hikashop Business
4 years 8 months ago #321111

OK thanks I'll do some tests and see how I get on, If I'm honest I am still confused as to the layout and structure of product "main" and variants but I'll see how I get on.

I assume I can easily move products to another category with CSV so remove it from where it is and place to another without deleteing?
Thanks for all the help

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

  • Posts: 83407
  • Thank you received: 13502
  • MODERATOR
4 years 8 months ago #321113

Yes.

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

Time to create page: 0.048 seconds
Powered by Kunena Forum