Variant images showing Twice for Mobile

  • Posts: 303
  • Thank you received: 18
  • Hikashop Business
5 years 7 months ago #297894

-- url of the page with the problem -- : www.mojooutdoors.com/products/product/70...category_pathway-135
-- HikaShop version -- : 3.5.0
-- Joomla version -- : 3.8.10

I have a mobile carousel that displays fine for most of my products. I.e., displays normal on desktop then has a bootstrap slider on mobile/tablet.

Example: www.mojooutdoors.com/spinning-wing-decoys/mojo-king-mallard

However, for products with variants, the bootstrap carousel display, but the images are duplicated below the description for some reason. This only occurs for the products with variants.

Example: www.mojooutdoors.com/products/product/70...category_pathway-135

Any thoughts on why this is occurring for the variant products only? Also, i should note that I do not have images for the product variants. They are all on the main product page.

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
5 years 7 months ago #297905

Hi,

I'm sorry but I don't understand what you mean. I don't see any carousel on either of your links:


Attachments:
Last edit: 5 years 7 months ago by nicolas.

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

  • Posts: 303
  • Thank you received: 18
  • Hikashop Business
5 years 7 months ago #297920

It only displays on the mobile version, not desktop.

I use simple css rules to hide the carousel on desktop, as well as, hide the normal image display with thumbnails on mobile. Does this make more sense? Sorry for the confusion.

Last edit: 5 years 7 months ago by mojooutdoors-holden.

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

  • Posts: 303
  • Thank you received: 18
  • Hikashop Business
5 years 7 months ago #297934

Fixed the issue by completing removing the part that loads the variant images. Even though no variant images were set, it's like Hikashop was trying to generate or load something that wasn't there, and it's only choice was the duplicate images. Not sure if that's even close to what was going on but removing the following lines in "product/show.php" fixed the problem:

$this->setLayout('show_block_img');
		echo $this->loadTemplate();

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
5 years 7 months ago #297945

Hi,

When variants don't have images, they use the images of the main product.
Remove that code will remove the variants images from the HTML and only leave the default ones.
That way, HikaShop won't do any replacing of the images when you switch the variants.
If you don't have images in the variants, you indeed don't need that code, and it can potentially mess with the rest of the page if the customization made on the product page has some issue.
So yes, that was probably what I would have told you to do.

The following user(s) said Thank You: mojooutdoors-holden

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

  • Posts: 303
  • Thank you received: 18
  • Hikashop Business
5 years 7 months ago #298046

Thanks for your help!

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

Time to create page: 0.065 seconds
Powered by Kunena Forum