- Posts: 34
- Thank you received: 1
Copy product page thumbnail in product listing
11 years 6 months ago #195991
by sifur
Copy product page thumbnail in product listing was created by sifur
-- 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)
--> I need help to get just thumbnails code, please help.
Best Regards,
-- 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)
Code:
$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.
11 years 6 months ago #195996
by nicolas
Replied by nicolas on topic Copy product page thumbnail in product listing
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.
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.144 seconds