Enlarged image showing duplicates of image due to variants

  • Posts: 3
  • Thank you received: 0
2 months 2 weeks ago #363542

-- url of the page with the problem -- : flyrc3dprints.com/index.php/shop/airplan...t/1-frsky-tdmx-mount
-- HikaShop version -- : HikaShop Starter 5.1.1 [2409241855]
-- Joomla version -- : Joomla! 5.1.4 Stable
-- PHP version -- : 8.3.6
-- Browser(s) name and version -- : Firefox v130.0.1

I have started my storefront and have listed multiple products. Every product will have a number of variants due to it being offered in different colors. I have only one image associated with each product. When you click on the image on the product display page to enlarge it, it shows 6 duplicate versions of the same image. Each product has 6 variants so I imagine it has something to do with that. Is there a way to turn off this variant display? I might have products with a few different images, but I don't need images for each variant.

Attachments:

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

  • Posts: 83007
  • Thank you received: 13398
  • MODERATOR
2 months 2 weeks ago #363545

Hi,

If you don't need different images for different variants, edit the view file product / show for your frontend template via the menu Display>Views and remove this code:

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

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

  • Posts: 3
  • Thank you received: 0
2 months 2 weeks ago #363562

Thank you for your prompt reply. I could use a little more clarification. I could not locate a file name with the description you outlined. I have included a screenshot of views "Products" that start with a P and couldn't locate the exact file you referenced.
Also, before I edit that code, I wanted to make sure that it will still allow the viewing of multiple images for products that will have more than 1 image associated with it. I just wanted to filter out the variant pictures. Is my understanding of your instructions correct?

Attachments:

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

  • Posts: 83007
  • Thank you received: 13398
  • MODERATOR
2 months 2 weeks ago #363568

Hi,

You're on the right track. I can see it on the line with the id 31 on your screenshot.
And yes, you'll still be able to have several images per product with this change.

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

  • Posts: 3
  • Thank you received: 0
2 months 2 weeks ago #363585

That worked like a champ. Thank you very much!

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

Time to create page: 0.068 seconds
Powered by Kunena Forum