Copy product page thumbnail in product listing

  • Posts: 34
  • Thank you received: 1
10 years 5 months ago #195991

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.0

Hi,
--> Now we have 3/4 product image thumbnails on product details page under main image.
--> Now I want to copy those thumbnails on product listing page on each products with div listing layout with popup option like product details page.
I tried to copy below codes on "listing_img_title.php", but only showing main image area with hikashop default image (without specified product image)

$this->row = & $this->element;
$this->setLayout('show_block_img');
echo $this->loadTemplate();

--> I need help to get just thumbnails code, please help.

Best Regards,

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

  • Posts: 84304
  • Thank you received: 13698
  • MODERATOR
10 years 5 months ago #195996

Hi,

You can't do that. The show_block_img view file is not meant to be used on product listings.
First, the data of the images is not loaded on listings, only the main image data is loaded. So you would first need to run a MySQL query in order to load the images data of each of the products on the page.
And second, the show_block_img view uses javascript to swap the images between one another and you would need to set different div names for each products in order for that to work.
Now it's not impossible to make it work, but it requires more fiddling than just copy/pasting a few lines of code in there.

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

Time to create page: 0.056 seconds
Powered by Kunena Forum