Skip to main content

Disable clic on badge

More
9 years 4 months ago #270127 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!

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

More
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:
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);
to:
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.

More
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.174 seconds
Powered by Kunena Forum