- Posts: 80
- Thank you received: 0
Images in product page
14 years 8 months ago #35474
by CassHW
Images in product page was created by CassHW
Hi Nicolas,
when there are multiple thumbnails in the product page and when the user clicks on one, it brings up a lightbox with the full size image. Is it possible to have a "Next" and "Prev" links on each side to go through the images?
Right now, the user needs to close the image and click on another thumbnail to see the full size image.
thanks
when there are multiple thumbnails in the product page and when the user clicks on one, it brings up a lightbox with the full size image. Is it possible to have a "Next" and "Prev" links on each side to go through the images?
Right now, the user needs to close the image and click on another thumbnail to see the full size image.
thanks
Please Log in or Create an account to join the conversation.
14 years 8 months ago #35518
by nicolas
Replied by nicolas on topic Re: Images in product page
Hi,
You can do that like explained there:
www.hikashop.com/en/support/documentatio...ox-media-player.html
You can do that like explained there:
www.hikashop.com/en/support/documentatio...ox-media-player.html
Please Log in or Create an account to join the conversation.
14 years 8 months ago #35519
by CassHW
Replied by CassHW on topic Re: Images in product page
Hi Nicolas,
thanks but I get this err msg:
Warning: Missing argument 6 for hikashop_small_image_link_render(), called in /home/horsewhi/public_html/jupgrade/administrator/components/com_hikashop/helpers/image.php on line 143 and defined in /home/horsewhi/public_html/jupgrade/templates/yoo_streamline/html/hikashop_image.php on line 8
thanks but I get this err msg:
Warning: Missing argument 6 for hikashop_small_image_link_render(), called in /home/horsewhi/public_html/jupgrade/administrator/components/com_hikashop/helpers/image.php on line 143 and defined in /home/horsewhi/public_html/jupgrade/templates/yoo_streamline/html/hikashop_image.php on line 8
Please Log in or Create an account to join the conversation.
14 years 8 months ago #35543
by nicolas
Replied by nicolas on topic Re: Images in product page
We've uploaded a new version of the override to avoid that error. Please download it again and do the installation again and you won't have the warning.
Please Log in or Create an account to join the conversation.
14 years 8 months ago - 14 years 8 months ago #35553
by CassHW
Replied by CassHW on topic Re: Images in product page
Great, it's working now. Thanks heaps!
However, there is still a small issue:
lets say I've got 3 images, therefore 3 thumbnails.
when you click on one, under the lightbox, it says there are 12
when you go through the images, it repeats the 3 I've got for the product.
It doesn't always multiply the images though.
I've got products with 1 image and there is only 1 in the lightbox.
Some I've got 4 and there are 4.
Others I've got 4 and there are 16.
thanks
PS: I think I figured out when the images multiply!
Each time I edit the product, the images get multiplied in the lightbox.
If I create the product then the right number of images are shown in the light box. If I edit it once, then the number is multiplied by 2 and so on. Hope this helps
However, there is still a small issue:
lets say I've got 3 images, therefore 3 thumbnails.
when you click on one, under the lightbox, it says there are 12
when you go through the images, it repeats the 3 I've got for the product.
It doesn't always multiply the images though.
I've got products with 1 image and there is only 1 in the lightbox.
Some I've got 4 and there are 4.
Others I've got 4 and there are 16.
thanks
PS: I think I figured out when the images multiply!
Each time I edit the product, the images get multiplied in the lightbox.
If I create the product then the right number of images are shown in the light box. If I edit it once, then the number is multiplied by 2 and so on. Hope this helps
Last edit: 14 years 8 months ago by CassHW.
Please Log in or Create an account to join the conversation.
14 years 8 months ago #35636
by CassHW
Replied by CassHW on topic Re: Images in product page
bump
now even when I create a new product, the images in the lightbox are multiplied. there are no pattern I can see
now even when I create a new product, the images in the lightbox are multiplied. there are no pattern I can see
Please Log in or Create an account to join the conversation.
14 years 8 months ago #35696
by nicolas
Replied by nicolas on topic Re: Images in product page
Hi,
Note that when you edit a message, we don't see it
So if you say "thanks" and then you edit it and ask a question" we won't answer you as we won't know you asked something. So you should create a new message in that case.
That's normal that you get duplicates if your product has variants.
You will get the images for each variant of your product.
In that case, you should edit the file "show" of the view "product" via the menu Display->Views and remove that code:
<div id="hikashop_product_image_<?php echo $variant_name;?>" style="display:none;">
<div id="hikashop_main_image_div_<?php echo $variant_name;?>" class="hikashop_main_image_div">
<?php
$image = reset($variant->images);
if(!$this->config->get('thumbnail')){
echo '<img src="'.$this->image->uploadFolder_url.$image->file_path.'" alt="'.$image->file_name.'" id="hikashop_main_image_'.$variant_name.'" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle" />';
}else{
$style='';
if(!empty($variant->images) && count($variant->images)>1){
$height = $this->config->get('thumbnail_y');
if(!empty($height)){
$style=' style="height:'.($height+5).'px;"';
}
} ?>
<div class="hikashop_product_main_image_thumb" id="hikashop_main_image_thumb_div_<?php echo $variant_name;?>" <?php echo $style;?>>
<?php echo $this->image->display($image->file_path,true,$image->file_name,'id="hikashop_main_image_'.$variant_name.'" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle"','id="hikashop_main_image_'.$variant_name.'_link"'); ?>
</div>
<?php
}
if(!empty($variant->images) && count($variant->images)>1){
?>
</div><div id="hikashop_small_image_div_<?php echo $variant_name;?>" class="hikashop_small_image_div"><?php
foreach($variant->images as $image){
echo $this->image->display($image->file_path,'hikashop_main_image_'.$variant_name,$image->file_name,'class="hikashop_child_image"');
}
}
?>
</div>
</div>
That way, the variants images won't be loaded.
Note that when you edit a message, we don't see it
So if you say "thanks" and then you edit it and ask a question" we won't answer you as we won't know you asked something. So you should create a new message in that case.
That's normal that you get duplicates if your product has variants.
You will get the images for each variant of your product.
In that case, you should edit the file "show" of the view "product" via the menu Display->Views and remove that code:
<div id="hikashop_product_image_<?php echo $variant_name;?>" style="display:none;">
<div id="hikashop_main_image_div_<?php echo $variant_name;?>" class="hikashop_main_image_div">
<?php
$image = reset($variant->images);
if(!$this->config->get('thumbnail')){
echo '<img src="'.$this->image->uploadFolder_url.$image->file_path.'" alt="'.$image->file_name.'" id="hikashop_main_image_'.$variant_name.'" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle" />';
}else{
$style='';
if(!empty($variant->images) && count($variant->images)>1){
$height = $this->config->get('thumbnail_y');
if(!empty($height)){
$style=' style="height:'.($height+5).'px;"';
}
} ?>
<div class="hikashop_product_main_image_thumb" id="hikashop_main_image_thumb_div_<?php echo $variant_name;?>" <?php echo $style;?>>
<?php echo $this->image->display($image->file_path,true,$image->file_name,'id="hikashop_main_image_'.$variant_name.'" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle"','id="hikashop_main_image_'.$variant_name.'_link"'); ?>
</div>
<?php
}
if(!empty($variant->images) && count($variant->images)>1){
?>
</div><div id="hikashop_small_image_div_<?php echo $variant_name;?>" class="hikashop_small_image_div"><?php
foreach($variant->images as $image){
echo $this->image->display($image->file_path,'hikashop_main_image_'.$variant_name,$image->file_name,'class="hikashop_child_image"');
}
}
?>
</div>
</div>
That way, the variants images won't be loaded.
Please Log in or Create an account to join the conversation.
14 years 8 months ago #35733
by CassHW
Replied by CassHW on topic Re: Images in product page
Hi Nicolas,
sorry I didn't know about the edit stuff.
I've removed the code but it's still showing duplicate photos
thanks
sorry I didn't know about the edit stuff.
I've removed the code but it's still showing duplicate photos
thanks
Please Log in or Create an account to join the conversation.
14 years 8 months ago #35808
by nicolas
Replied by nicolas on topic Re: Images in product page
Then it's probably that you didn't edit the file for the template you're using. Please make sure that you edit the file "show" of the view "product" for the template you're using on your front end.
Please Log in or Create an account to join the conversation.
14 years 8 months ago #35863
by CassHW
Replied by CassHW on topic Re: Images in product page
Yep, I didn't update the file for the right template.
Now it's all working!
Thanks
Now it's all working!
Thanks
Please Log in or Create an account to join the conversation.
Time to create page: 0.212 seconds