- Posts: 118
- Thank you received: 3
[solved] Prob with inline style on child images
There is something that put a border: 0px as inline style on the img hikashop_child_image after a hover on it in the product page.
I can't find the code that put this inlne style, I would enjoy to not have inline style on hover on this element.
Thanks.
Please Log in or Create an account to join the conversation.
It is done by some javascript added by the Helper Image.
If can edit the core file directly but your modifications will be lost with updates.
So the best solution is to use a template override:
www.hikashop.com/en/support/documentatio...tation.html#override
In your case, it is the function "hikashop_image_toggle_js(&$obj)" that you want to override.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Jerome wrote: Hi,
It is done by some javascript added by the Helper Image.
If can edit the core file directly but your modifications will be lost with updates.
So the best solution is to use a template override:
www.hikashop.com/en/support/documentatio...tation.html#override
In your case, it is the function "hikashop_image_toggle_js(&$obj)" that you want to override.
Regards,
Could you please give me an exemple of code I should have in the hikashop_image.php file ?
I did not find the hikashop_image_toggle_js(&$obj) function, I found the hikashopChangeImage(id,url,x,y,obj,nAlt) function wich contains the code I want to override. I copied this function in the hikashop_image.php, deleted the code I want tp supress, but it did not work and generated an error.
IMHO, it's a strange way to add border on hovers on images. Why not to use css only for this ?
But I enjoy the possibility to override templates and views.
Sincerely.
Please Log in or Create an account to join the conversation.
The function "hikashop_image_toggle_js(&$obj)" should return the javascript which will be added in the page.
If you open the helper image (administrator/com_hikashop/helper/image.php), you will find in the function "display" the call of the function "hikashop_image_toggle_js".
Just bellow, you will find the javascript code which is added if the function does not exist. You can copy the code
After that, you can change the javascript code in your function in order to remove the code you do not require:
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
With your nice help, it works.
Thanks a lot.
Will tag the thread solved answered.
Sincerely.
Please Log in or Create an account to join the conversation.