Variant on this product doesn't change image/options

  • Posts: 116
  • Thank you received: 7
  • Hikashop Business
4 years 11 months ago #317441

-- HikaShop version -- : 4.2.3
-- Joomla version -- : 3.9.16
-- PHP version -- : 7.3
-- Browser(s) name and version -- : Any (Windows, Mac), FF, Chrome, etc.
-- Error-message(debug-mod must be tuned on) -- : None

I am having a problem with one product that won't work like the others. The variant selection doesn't change the displayed image and the changed options don't get added to the shopping cart.

I have tried different display views (we are using a custom layout) but again other products work just fine.

I can't tell what the difference is between this one and the others that do work. There aren't any javascript errors, and I can't figure out what to test for next. I did export this product and re-import it back into the system again after deleting it while I was testing what was wrong, but that's the only difference that I know of. I created a new product (with fewer options) and they all work as well.

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

  • Posts: 83409
  • Thank you received: 13502
  • MODERATOR
4 years 11 months ago #317445

Hi,

I checked your link and from what I can see, the variant swapping javascript system is working on that page.
You can see it, if you just change the size, without changing the color. The text is updated, and if you add the product to the cart, you'll see that the correct size is added.
And looking at the HTML of the page, I see that only the HTML of the variants for the default value of the color characteristic is present in the page. This explains the behavior. As the javascript doesn't find the HTML of the other variants, it can't refresh the text on the page.
I'm not sure on how this can happen. All I can say is this:
- we don't have the issue on our end and no one reported such issue either.
- the variant HTML data is displayed in the product / show.php view file, but any other override of the product view could be the culprit.
So I would first recommend to go in the folder template/YOUR_TEMPLATE/html/com_hikashop/product/ via FTP.
There, rename the files one by one to deactivate them, and see if that helps. That will allow you to find the culprit.

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

  • Posts: 116
  • Thank you received: 7
  • Hikashop Business
4 years 11 months ago #317471

I removed the template overrides completely before posting, by physically moving the com_hikashop folder in the template's html folder. With that, the problem continues.

I created a new test product just with a single characteristic, color, and added two colors for variants. If I make a change to the default color, the text will display (but the image won't change) but after the first variant selection, any further selection fails to do anything at all.

I reinstalled hikashop again to see if that helped, but no difference. I also set the menu template to the J! Protostar and same behavior.

On the test product, I can get the text to change, but not the image when the single variant is selected.

I did get the variant selection to "break" by changing one of the test variants with the original image, which is q 74K 1200x1000 image, but I don't see how that would affect anything.

This message contains confidential information

Last edit: 4 years 11 months ago by stratacorps.

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

  • Posts: 83409
  • Thank you received: 13502
  • MODERATOR
4 years 11 months ago #317485

Hi,

Since I don't have the problem on my end and you say that even without template overrides you have the problem, then I don't know how that's possible.
Maybe it's a bug which only happens in some cases.
We would need a backend access and a FTP access to be able to investigate the situation on your website.
Could you provide that along with a link to this thread via our contact form ?
www.hikashop.com/support/contact-us.html

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

  • Posts: 83409
  • Thank you received: 13502
  • MODERATOR
4 years 11 months ago #317557

Hi,

Thank you for the access.
I checked the situation on your website.
I confirm that it doesn't come from your template and that you don't have a view override which could cause the problem.

I did some debugging and here is what I've found:
When I look at the HTML of your product page, I see that only the variants with the value "tahiti blue" (corresponding to the id 86 in the screenshot below) have their HTML in the page:
monosnap.com/file/fFdmSD4INcXDUUmSLpV655cxR9M5ZW
So I was thinking that there would be some bug somewhere before the display of the HTML of the variants which would remove the other variants for some reason.
However, if you add temporarily the line:
<?php exit; ?>
at the end of the file components/com_hikashop/views/product/tmpl/show.php so that the processing of the page stops after rendering the product page's HTML, I can see this with my browser's inspector tool:
monosnap.com/file/nuQlH1oEDv5cPtl8mGkSCpxLVvwFz9
monosnap.com/file/MWZTF0uGzkFy2pZAcq9ePeJAAt12jq
etc
There, I can see all the HTML of all the variants of the product.
So this indicates that there is something removing the HTML of some of the variants for some reason after HikaShop has added it to the page.
I'm thinking it must be a system or a hikashop plugin but I couldn't find any that could cause this.
So then, I was thinking that it might be linked to MagicZoom since I could see it on your page.
So I went to the Extensions manager, and disabled "Magic Zoom Plus module for HikaShop". And after doing this, the HTML of the variants is all there on the page and the characteristics switching works fine.
So I think there is a bug in that module. I guess you'll have to check with the developers of that extension so that then can check on the situation.

The following user(s) said Thank You: stratacorps

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

  • Posts: 116
  • Thank you received: 7
  • Hikashop Business
4 years 11 months ago #317574

Okay, thanks. I had disabled all the magic plugins that were addons to hikashop and had similar issues. I also have other products that the zoom module works on and that have variants as well. I've reach out to MagicToolbox to see if they can shed some light on why this specific product is breaking the variant selection here.

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

  • Posts: 116
  • Thank you received: 7
  • Hikashop Business
4 years 11 months ago #317607

Igor over at MagicToolbox found the issue although I didn’t get exactly what prevented variants in this specific product and not the others, but oh well.

Are there any other Zoom type options available that won’t interfere with Hikashop core? The more we can stay within a single developer the better! Thanks again for your help.

The following user(s) said Thank You: Bobwales

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

  • Posts: 83409
  • Thank you received: 13502
  • MODERATOR
4 years 11 months ago #317609

Hi,

I can't say. I don't know how zoom was made or how it works.
The more you have stuff on your website, the more you risk conflicts. And I can see that you have a LOT of stuff on your website :)

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

  • Posts: 127
  • Thank you received: 6
4 years 10 months ago #318950

Had precisely the same issue.
Igor at Magic Zoom has fixed the issue which will be included in the latest version of that excellent plugin, IMO.
Best regards, Bob

The following user(s) said Thank You: nicolas

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

Time to create page: 0.079 seconds
Powered by Kunena Forum