- Posts: 17
- Thank you received: 0
Disable img popup and thumbnails on details page
- thirdhatch
-
Topic Author
- Offline
Less
More
11 years 6 months ago - 11 years 6 months ago #196315
by thirdhatch
Disable img popup and thumbnails on details page was created by thirdhatch
-- HikaShop version -- : 2.4.0 (latest 2.4.0 update)
-- Joomla version -- : 3.4.1
Hello I am having a similar situation to this one
Desired behavior:
I have tried following the instructions here but the result is that the product page does not show a popup, but still renders the thumbnail and not the original image.
Please help!
-- Joomla version -- : 3.4.1
Hello I am having a similar situation to this one
Desired behavior:
- The product images in the category/product listing view are rendered as thumbnails
- The product detail page does not use an image popup, instead the product detail page displays the image in its original size (the original uploaded image)
I have tried following the instructions here but the result is that the product page does not show a popup, but still renders the thumbnail and not the original image.
Please help!
Last edit: 11 years 6 months ago by thirdhatch. Reason: specifying which version of 2.4.0
Please Log in or Create an account to join the conversation.
11 years 6 months ago #196359
by Xavier
Replied by Xavier on topic Disable img popup and thumbnails on details page
Hi,
In the view "product / show_block_img" please replace:
By:
In the view "product / show_block_img" please replace:
Code:
$html = '<img id="hikashop_main_image'.$variant_name.'" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle" title="'.$this->escape(@$image->file_description).'" alt="'.$this->escape(@$image->file_name).'" src="'.$img->url.'"/>';
if(!empty($this->element->badges))
$html .= $this->classbadge->placeBadges($this->image, $this->element->badges, '0', '0',false);
echo $this->popup->image($html, $img->origin_url, null, $attr);
Code:
$html = '<img id="hikashop_main_image'.$variant_name.'" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle" title="'.$this->escape(@$image->file_description).'" alt="'.$this->escape(@$image->file_name).'" src="'.$img->origin_url.'"/>';
if(!empty($this->element->badges))
$html .= $this->classbadge->placeBadges($this->image, $this->element->badges, '0', '0',false);
echo $html;
Please Log in or Create an account to join the conversation.
- thirdhatch
-
Topic Author
- Offline
Less
More
- Posts: 17
- Thank you received: 0
11 years 6 months ago #196414
by thirdhatch
Replied by thirdhatch on topic Disable img popup and thumbnails on details page
Excellent - thank you!!!
Please Log in or Create an account to join the conversation.
6 years 5 months ago #317423
by oxido
Replied by oxido on topic Disable img popup and thumbnails on details page
How can i do the same think for the thumbnails?
Just to remove the popup, i want the main image to be changed on click / mouseover. but i don't want to use the popup.
Just to remove the popup, i want the main image to be changed on click / mouseover. but i don't want to use the popup.
Please Log in or Create an account to join the conversation.
6 years 5 months ago #317424
by nicolas
Replied by nicolas on topic Disable img popup and thumbnails on details page
Hi,
In the same file, you can change the code:
to:
In the same file, you can change the code:
Code:
if(empty($variant_name)) {
echo $this->popup->image($html, $img->origin_url, $id, $attr, array('gallery' => 'hikashop_main_image'));
} else {
echo $this->popup->image($html, $img->origin_url, $id, $attr, array('gallery' => 'hikashop_main_image_VARIANT_NAME'));
}
Code:
echo $html;
The following user(s) said Thank You: oxido
Please Log in or Create an account to join the conversation.
6 years 5 months ago - 6 years 2 months ago #317442
by oxido
Replied by oxido on topic Disable img popup and thumbnails on details page
Thx nicolas, the mouse over or the click didn't work on the images after that change, but i did fix for that.
This is the full code changed
NOTICE!
This is not working with variants, if you have different images on your variant's, the script is not gonna update the big image with the one you mouse over or thoch (on mobiles)
From this
To this
This is the full code changed
NOTICE!
This is not working with variants, if you have different images on your variant's, the script is not gonna update the big image with the one you mouse over or thoch (on mobiles)
From this
Code:
$html = '<img class="'.$classname.'" title="'.$this->escape(@$image->file_description).'" alt="'.$this->escape(@$image->file_name).'" src="'.$img->url.'"/>';
if(empty($variant_name)) {
echo $this->popup->image($html, $img->origin_url, $id, $attr, array('gallery' => 'hikashop_main_image'));
} else {
echo $this->popup->image($html, $img->origin_url, $id, $attr, array('gallery' => 'hikashop_main_image_VARIANT_NAME'));
}
To this
Code:
$onMouseOver = "return window.localPage.changeImage(this, 'hikashop_main_image', '".$img->url."', $width, $height, '', '02');";
$html = '<a href="javascript:void(0);" onmouseover="'.$onMouseOver.'"><img class="'.$classname.'" title="'.$this->escape(@$image->file_description).'" alt="'.$this->escape(@$image->file_name).'" src="'.$img->url.'"/> </a>';
echo $html;
Last edit: 6 years 2 months ago by oxido.
The following user(s) said Thank You: nicolas
Please Log in or Create an account to join the conversation.
Time to create page: 0.188 seconds