Product Variant Appends ID instead of Variant Name

  • Posts: 30
  • Thank you received: 2
9 years 2 months ago #211087

-- url of the page with the problem -- : www.tokeshoes.com
-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3..4.3
-- PHP version -- : 5.5.27

Dear friends:

We have been using Hikashop for many years. Thanks for your great work.

We are having quite a few challenges with one of our installations with respect to variants. They are ordering wrong on the product page in the admin section (we know how to set the order on the products configuration), we cannot get variants to copy when we duplicate some products, and so on. But we will stick with one topic at a time. And this one is that the variant ID is used rather than the name of the variant for the appended name on each variant.

To be more clear:

Our product characteristic is but a single one: size (for shoes). Our variants are named in series 16 EU, 17 EU and so on.

I enclose a screen shot of the variants. You will note that the IDs are different numbers from the sizes. As you see, 24 EU is ID 18. When we create our variants, the system appends to the main product name NOT THE VARIANT NAME, such as _24 EU as we would like, but the variant ID. So our main product name is followed by [main product name] _18 for EU 24.

So we have to go back and change them. and it causes so many other problems.

Can you assist? THANK YOU AS ALWAYS.

Attachments:

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

  • Posts: 82725
  • Thank you received: 13338
  • MODERATOR
9 years 2 months ago #211088

Hi,

1. That's not what I see on your website:
take.ms/iCz7V
I've selected 25 EU in the characteristic selector and I do see 25 EU appended to the product name on the product page and not 19

2. Regarding the copy of products with variants, variants will only be copied if the variants code still match the code of the main product. By matching I mean that the product code of the main product is included in the product code of the variants. That's probably where lie the issue because the copy works just fine on our end with variants. You can try on your end by copying a product you just created with variants and didn't touch at the codes of either the product or the variants and you'll see that you should get the variants to copy too.

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

  • Posts: 30
  • Thank you received: 2
9 years 2 months ago #211104

Thanks Nicholas, as always for your quick response.

After we add the variants, we manually edit the variant code for each variant to reflect the proper shoe size instead of the variant ID. Your circle screen shot of our front end reflects the proper variant code after the colon because, (as I vaguely remember), we added that to the view. The code which follows that circle, with the underscore, is what we edit in the back end before we publish the product.

Of course, that's not efficient and the client has been asking me to address that.

To ensure that I don't waste your valuable time, I did a short [unlisted] video showing the process in the admin area as I experience it. I first show you the characteristics, then add a product and the variants. You will see two things: the characteristics/variants are out of order and the added extension to the main name is _[ID], rather than _[name of variant].

youtu.be/7scpRAyD2W4

I recognize this may be me doing something wrong, and I know that either way you will set me straight.

As for copying the product with the variants, I have read other posts on this for a long time. Perhaps if you can let me know what you think of the video ), and get that taken care of, I can keep working on the copying. I can deal with the variants not copying, because it's not a big deal adding them - IF the product codes work right.

Thank you for all you do.

With kindest regards!

Nadine.

Last edit: 9 years 2 months ago by solia. Reason: clarification.

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

  • Posts: 30
  • Thank you received: 2
9 years 2 months ago #211109

This is a PS Nicholas.

I was re-reading your post and pondering also your point about the variants not copying and why that may be.

You can try on your end by copying a product you just created with variants and didn't touch at the codes of either the product or the variants and you'll see that you should get the variants to copy too.


After you review my video, you will see why we have to edit the variant code after it is automatically generated to get it to match the variant name instead of the ID number. Maybe THAT is also why later, if we try to copy that product, the variants do not copy.

So, perhaps it's all related. Once the variant codes generate properly, I won't have to "touch the codes of either the product or the variants" and I bet our copying issue will be resolved.

:)

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

  • Posts: 82725
  • Thank you received: 13338
  • MODERATOR
9 years 2 months ago #211121

Hi,

It's normal that you get the characteristic value id in the product code of the variants of the product they are generated.
That's the way the system generating the variants is done for efficiency (in the MySQL queries) so that the process doesn't crash and allows you to generate hundreds of variants at once.

If you want the system to generate the variants code with another format, that's possible.
You'll have to develop a small HikaShop plugin implementing the onAfterVariantsCreation($product_id, $new_variants_ids, $element) trigger and use the variables passed to your plugin to update the variants with the product codes that you want.

The following user(s) said Thank You: solia

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

  • Posts: 30
  • Thank you received: 2
9 years 2 months ago #211211

Thank you Nicolas.

OK, now I know that adding the ID of the characteristic as the suffix to the product is intended behavior.

Of course I understand the use of IDs is important to the database efficiency.

Perhaps however, you can see that by actually adding it as the variant product code suffix, rather than using it in some other field, the result is often misleading and forces manual editing. Our case is a perfect example of that. We have a shoe size number as the characteristic, but an ID number is added to the main product instead and they are different numbers. So our 24 EU shoe size gets a _18 suffix, which is meaningless to the customer and the owner – indeed it causes confusion.

Obviously we have to change the variants code immediately, and as a consequence, we seem to lose sync and cannot copy products with variants.

I wonder if in the future, the characteristic might be added as the product suffix and the ID retained elsewhere for database purposes.
I hope that you might be persuaded that this can be improved in future editions.

I would be willing to commission the plugin you mention if it’s in our budget. If you or one of your good people is interested in doing that for us, let me know your quote.

One last follow up: if you look at our video, after we add the variants, they display out of order on the variant page. I hope that we might have them display in order. It’s just so much easier to find the variant you are looking for that way! The client has asked (repeatedly), and we would love to say “we took care of it, they are in order now.”

With kindest regards to you and your team, I am

Nadine

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

  • Posts: 82725
  • Thank you received: 13338
  • MODERATOR
9 years 2 months ago #211219

Hi,

1. If you need someone to work on such plugin, you can contact our partners for a quote:
www.hikashop.com/home/our-partners.html

2. I've created an issue on our end regarding that. The variants are in order in some cases (the ones we tested but not yours). We'll fix it for the next version of HikaShop.

The following user(s) said Thank You: solia

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

Time to create page: 0.053 seconds
Powered by Kunena Forum