- Posts: 103
- Thank you received: 2
Disable clic on badge
9 years 4 months ago #270127
by melisari
Disable clic on badge was created by melisari
-- HikaShop version -- : 3.0.1
-- Joomla version -- : 3.7.2
-- PHP version -- : 7
-- Browser(s) name and version -- : chrome
i would like to avoid the click event in the badge, it is possible? thank you!
-- Joomla version -- : 3.7.2
-- PHP version -- : 7
-- Browser(s) name and version -- : chrome
i would like to avoid the click event in the badge, it is possible? thank you!
Please Log in or Create an account to join the conversation.
9 years 4 months ago #270142
by nicolas
Replied by nicolas on topic Disable clic on badge
Hi,
There is no option for that.
It's done on purpose since normally the badge is on top of the product image and you want the popup to open with the full size image even if you click on the badge.
So you'll have to edit the file "show_block_img" via the menu Display>Views and change the code:
to:
There is no option for that.
It's done on purpose since normally the badge is on top of the product image and you want the popup to open with the full size image even if you click on the badge.
So you'll have to edit the file "show_block_img" via the menu Display>Views and change the code:
Code:
if(!empty($this->element->badges))
$html .= $this->classbadge->placeBadges($this->image, $this->element->badges, '0', '0',false);
$attr = 'title="'.$this->escape(@$image->file_description).'"';
if (!empty ($this->element->images) && count($this->element->images) > 1)
$attr .= ' onclick="return window.localPage.openImage(\'hikashop_main_image'.$variant_name.'\', \''.$variant_name.'\', event);"';
echo $this->popup->image($html, $img->origin_url, null, $attr);
Code:
$attr = 'title="'.$this->escape(@$image->file_description).'"';
if (!empty ($this->element->images) && count($this->element->images) > 1)
$attr .= ' onclick="return window.localPage.openImage(\'hikashop_main_image'.$variant_name.'\', \''.$variant_name.'\', event);"';
echo $this->popup->image($html, $img->origin_url, null, $attr);
if(!empty($this->element->badges))
echo $this->classbadge->placeBadges($this->image, $this->element->badges, '0', '0',false);
The following user(s) said Thank You: melisari
Please Log in or Create an account to join the conversation.
9 years 4 months ago #270200
by melisari
Replied by melisari on topic Disable clic on badge
Worked like charm! Thank you so much!
Please Log in or Create an account to join the conversation.
Time to create page: 0.199 seconds