[Skip to main content](#vessel-content)

#   Display product option's image in the tooltip

##

- **[Lippo](/forum/user/41137-lippo "View Lippo's Profile")**
- [![Lippo's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/41137-lippo "View Lippo's Profile") Topic Author
- [ Offline](/forum/user/41137-lippo)

Less More

- Posts: 22
- Thank you received: 1
-
-

9 years 11 months ago -  9 years 11 months ago [\#253774](#253774) by [Lippo](/forum/user/41137-lippo "View Lippo's Profile")  *[Display product option's image in the tooltip](/forum/26-product-category-display/887193-display-product-options-image-in-the-tooltip#253774 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.4 -- PHP version -- : 5.6.27 -- Browser(s) name and version -- : Firefox 49.0.2  Hello, found several discussions about that, but no one leading to a concrete solution for the problem/request.  Product options are additional products added to the main products. Since the options are real products in HikaShop, they have also their product images. Actually is not possible to show the image next to the optional product in the &quot;options&quot; list.  But, for each optional product we have the &quot;description&quot; displayed in a tooltip. If i add an image in the description field, the image is not displayed.  Tried to look at the code and I found why, working through overrides.  file:  option.php line 126  Actually, due to the &quot;strips&#95;tags&quot; PHP function, all the HTML tages are stripped and plain text is shown in the tooltip.  If I try to use &quot;allowable&#95;tags&quot; function coupled with strip&#95;tags, in order to allow the image tags, it doesn't work.  If i remove &quot;strips&#95;tags&quot; I see all the HTML code (product name + link to the image). Please remember that the image is included into the Product description (for each additional product). Output in the image attached.  What i'm not able to do is to display the &quot;result&quot; of the HTML code. If the code will be treated as HTML, the image will be displayed in the tooltip.  Can you please help with this? Thanks!")* was created by *[Lippo](/forum/user/41137-lippo "View Lippo's Profile")*

-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.4
-- PHP version -- : 5.6.27
-- Browser(s) name and version -- : Firefox 49.0.2

Hello,
found several discussions about that, but no one leading to a concrete solution for the problem/request.

Product options are additional products added to the main products.
Since the options are real products in HikaShop, they have also their product images.
Actually is not possible to show the image next to the optional product in the "options" list.

But, for each optional product we have the "description" displayed in a tooltip.
If i add an image in the description field, the image is not displayed.

Tried to look at the code and I found why, working through overrides.

file:  **option.php** line 126 Code:

$description = $this-&gt;escape(strip_tags(JHTML::_('content.prepare',$optionInfo-&gt;product_description)));

Actually, due to the "strips_tags" PHP function, all the HTML tages are stripped and plain text is shown in the tooltip.

If I try to use "allowable_tags" function coupled with strip_tags, in order to allow the image tags, it doesn't work.

If i remove "strips_tags" I see all the HTML code (product name + link to the image). Please remember that the image is included into the Product description (for each additional product). Output in the image attached.

What i'm not able to do is to display the "result" of the HTML code.
If the code will be treated as HTML, the image will be displayed in the tooltip.

Can you please help with this?
Thanks!

- [ ![hikastrips.PNG](/forum/attachment/34275) ](/forum/attachment/34275 "hikastrips.PNG") [ ](/forum/attachment/34275?download=1 "hikastrips.PNG")

Last edit: 9 years 11 months ago by [Lippo](/forum/user/41137-lippo "View Lippo's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODcxOTMtZGlzcGxheS1wcm9kdWN0LW9wdGlvbi1zLWltYWdlLWluLXRoZS10b29sdGlwP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14265
-
-

9 years 11 months ago [\#253798](#253798) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Display product option's image in the tooltip](/forum/26-product-category-display/887193-display-product-options-image-in-the-tooltip#253798 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.4 -- PHP version -- : 5.6.27 -- Browser(s) name and version -- : Firefox 49.0.2  Hello, found several discussions about that, but no one leading to a concrete solution for the problem/request.  Product options are additional products added to the main products. Since the options are real products in HikaShop, they have also their product images. Actually is not possible to show the image next to the optional product in the &quot;options&quot; list.  But, for each optional product we have the &quot;description&quot; displayed in a tooltip. If i add an image in the description field, the image is not displayed.  Tried to look at the code and I found why, working through overrides.  file:  option.php line 126  Actually, due to the &quot;strips&#95;tags&quot; PHP function, all the HTML tages are stripped and plain text is shown in the tooltip.  If I try to use &quot;allowable&#95;tags&quot; function coupled with strip&#95;tags, in order to allow the image tags, it doesn't work.  If i remove &quot;strips&#95;tags&quot; I see all the HTML code (product name + link to the image). Please remember that the image is included into the Product description (for each additional product). Output in the image attached.  What i'm not able to do is to display the &quot;result&quot; of the HTML code. If the code will be treated as HTML, the image will be displayed in the tooltip.  Can you please help with this? Thanks!")*

Hi,

Try it like that:
$description = JHTML::_('content.prepare',$optionInfo-&gt;product_description);

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODcxOTMtZGlzcGxheS1wcm9kdWN0LW9wdGlvbi1zLWltYWdlLWluLXRoZS10b29sdGlwP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Lippo](/forum/user/41137-lippo "View Lippo's Profile")**
- [![Lippo's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/41137-lippo "View Lippo's Profile") Topic Author
- [ Offline](/forum/user/41137-lippo)

Less More

- Posts: 22
- Thank you received: 1
-
-

9 years 11 months ago [\#253863](#253863) by [Lippo](/forum/user/41137-lippo "View Lippo's Profile")  Replied by *[Lippo](/forum/user/41137-lippo "View Lippo's Profile")* on topic *[Display product option's image in the tooltip](/forum/26-product-category-display/887193-display-product-options-image-in-the-tooltip#253863 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.4 -- PHP version -- : 5.6.27 -- Browser(s) name and version -- : Firefox 49.0.2  Hello, found several discussions about that, but no one leading to a concrete solution for the problem/request.  Product options are additional products added to the main products. Since the options are real products in HikaShop, they have also their product images. Actually is not possible to show the image next to the optional product in the &quot;options&quot; list.  But, for each optional product we have the &quot;description&quot; displayed in a tooltip. If i add an image in the description field, the image is not displayed.  Tried to look at the code and I found why, working through overrides.  file:  option.php line 126  Actually, due to the &quot;strips&#95;tags&quot; PHP function, all the HTML tages are stripped and plain text is shown in the tooltip.  If I try to use &quot;allowable&#95;tags&quot; function coupled with strip&#95;tags, in order to allow the image tags, it doesn't work.  If i remove &quot;strips&#95;tags&quot; I see all the HTML code (product name + link to the image). Please remember that the image is included into the Product description (for each additional product). Output in the image attached.  What i'm not able to do is to display the &quot;result&quot; of the HTML code. If the code will be treated as HTML, the image will be displayed in the tooltip.  Can you please help with this? Thanks!")*

Hi Nicolas,
thank you for your answer.

Unfortunately it doesn't work.
It breaks the HTML tags and it still shows "unexpanded" html tags.

See the image attached.

Can you please provide other suggestions?

- [ ![hikaoptstrips.PNG](/forum/attachment/34303) ](/forum/attachment/34303 "hikaoptstrips.PNG") [ ](/forum/attachment/34303?download=1 "hikaoptstrips.PNG")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODcxOTMtZGlzcGxheS1wcm9kdWN0LW9wdGlvbi1zLWltYWdlLWluLXRoZS10b29sdGlwP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14265
-
-

9 years 11 months ago [\#253895](#253895) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Display product option's image in the tooltip](/forum/26-product-category-display/887193-display-product-options-image-in-the-tooltip#253895 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.4 -- PHP version -- : 5.6.27 -- Browser(s) name and version -- : Firefox 49.0.2  Hello, found several discussions about that, but no one leading to a concrete solution for the problem/request.  Product options are additional products added to the main products. Since the options are real products in HikaShop, they have also their product images. Actually is not possible to show the image next to the optional product in the &quot;options&quot; list.  But, for each optional product we have the &quot;description&quot; displayed in a tooltip. If i add an image in the description field, the image is not displayed.  Tried to look at the code and I found why, working through overrides.  file:  option.php line 126  Actually, due to the &quot;strips&#95;tags&quot; PHP function, all the HTML tages are stripped and plain text is shown in the tooltip.  If I try to use &quot;allowable&#95;tags&quot; function coupled with strip&#95;tags, in order to allow the image tags, it doesn't work.  If i remove &quot;strips&#95;tags&quot; I see all the HTML code (product name + link to the image). Please remember that the image is included into the Product description (for each additional product). Output in the image attached.  What i'm not able to do is to display the &quot;result&quot; of the HTML code. If the code will be treated as HTML, the image will be displayed in the tooltip.  Can you please help with this? Thanks!")*

Hi,

Then it means that the tooltips system doesn't support HTML tags.
You need to replace the line:
$options='&lt;span class="hikashop_option_info" title="'.$description.'"&gt;'.$options.'&lt;/span&gt;';
with a tooltip tag. For example: [ extensions.joomla.org/extension/tooltips](https://extensions.joomla.org/extension/tooltips)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODcxOTMtZGlzcGxheS1wcm9kdWN0LW9wdGlvbi1zLWltYWdlLWluLXRoZS10b29sdGlwP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Lippo](/forum/user/41137-lippo "View Lippo's Profile")**
- [![Lippo's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/41137-lippo "View Lippo's Profile") Topic Author
- [ Offline](/forum/user/41137-lippo)

Less More

- Posts: 22
- Thank you received: 1
-
-

9 years 11 months ago [\#253905](#253905) by [Lippo](/forum/user/41137-lippo "View Lippo's Profile")  Replied by *[Lippo](/forum/user/41137-lippo "View Lippo's Profile")* on topic *[Display product option's image in the tooltip](/forum/26-product-category-display/887193-display-product-options-image-in-the-tooltip#253905 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.4 -- PHP version -- : 5.6.27 -- Browser(s) name and version -- : Firefox 49.0.2  Hello, found several discussions about that, but no one leading to a concrete solution for the problem/request.  Product options are additional products added to the main products. Since the options are real products in HikaShop, they have also their product images. Actually is not possible to show the image next to the optional product in the &quot;options&quot; list.  But, for each optional product we have the &quot;description&quot; displayed in a tooltip. If i add an image in the description field, the image is not displayed.  Tried to look at the code and I found why, working through overrides.  file:  option.php line 126  Actually, due to the &quot;strips&#95;tags&quot; PHP function, all the HTML tages are stripped and plain text is shown in the tooltip.  If I try to use &quot;allowable&#95;tags&quot; function coupled with strip&#95;tags, in order to allow the image tags, it doesn't work.  If i remove &quot;strips&#95;tags&quot; I see all the HTML code (product name + link to the image). Please remember that the image is included into the Product description (for each additional product). Output in the image attached.  What i'm not able to do is to display the &quot;result&quot; of the HTML code. If the code will be treated as HTML, the image will be displayed in the tooltip.  Can you please help with this? Thanks!")*

Hi Nicolas,

in this case I should include the content of the option in the tip tag.
Can you suggest the syntax for this?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODcxOTMtZGlzcGxheS1wcm9kdWN0LW9wdGlvbi1zLWltYWdlLWluLXRoZS10b29sdGlwP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Lippo](/forum/user/41137-lippo "View Lippo's Profile")**
- [![Lippo's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/41137-lippo "View Lippo's Profile") Topic Author
- [ Offline](/forum/user/41137-lippo)

Less More

- Posts: 22
- Thank you received: 1
-
-

9 years 11 months ago [\#253917](#253917) by [Lippo](/forum/user/41137-lippo "View Lippo's Profile")  Replied by *[Lippo](/forum/user/41137-lippo "View Lippo's Profile")* on topic *[Display product option's image in the tooltip](/forum/26-product-category-display/887193-display-product-options-image-in-the-tooltip#253917 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.4 -- PHP version -- : 5.6.27 -- Browser(s) name and version -- : Firefox 49.0.2  Hello, found several discussions about that, but no one leading to a concrete solution for the problem/request.  Product options are additional products added to the main products. Since the options are real products in HikaShop, they have also their product images. Actually is not possible to show the image next to the optional product in the &quot;options&quot; list.  But, for each optional product we have the &quot;description&quot; displayed in a tooltip. If i add an image in the description field, the image is not displayed.  Tried to look at the code and I found why, working through overrides.  file:  option.php line 126  Actually, due to the &quot;strips&#95;tags&quot; PHP function, all the HTML tages are stripped and plain text is shown in the tooltip.  If I try to use &quot;allowable&#95;tags&quot; function coupled with strip&#95;tags, in order to allow the image tags, it doesn't work.  If i remove &quot;strips&#95;tags&quot; I see all the HTML code (product name + link to the image). Please remember that the image is included into the Product description (for each additional product). Output in the image attached.  What i'm not able to do is to display the &quot;result&quot; of the HTML code. If the code will be treated as HTML, the image will be displayed in the tooltip.  Can you please help with this? Thanks!")*

BTW fixed in a different way.
Decided to remove the tooltip and to display the product description (including the image) instead of the product title in the option box.

Changed this line: Code:

$html = '&lt;span class="hikashop_option_name"&gt;'.$optionInfo-&gt;product_name.$options.'&lt;/span&gt;&lt;/td&gt;&lt;td&gt;' . $html;

with: Code:

$html = '&lt;span class="hikashop_option_name"&gt;'.$optionInfo-&gt;product_description.$options.'&lt;/span&gt;&lt;/td&gt;&lt;td&gt;' . $html;

Result attached

- [ ![sfizi1.PNG](/forum/attachment/34308) ](/forum/attachment/34308 "sfizi1.PNG") [ ](/forum/attachment/34308?download=1 "sfizi1.PNG")

The following user(s) said Thank You: [Jerome](/forum/user/80-jerome "View Jerome's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODcxOTMtZGlzcGxheS1wcm9kdWN0LW9wdGlvbi1zLWltYWdlLWluLXRoZS10b29sdGlwP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[ianspeed](/forum/user/1602-ianspeed "View ianspeed's Profile")**
- [![ianspeed's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/1602-ianspeed "View ianspeed's Profile")
- [ Offline](/forum/user/1602-ianspeed)

Less More

- Posts: 173
- Thank you received: 8
-
-

1 year 11 months ago [\#364514](#364514) by [ianspeed](/forum/user/1602-ianspeed "View ianspeed's Profile")  Replied by *[ianspeed](/forum/user/1602-ianspeed "View ianspeed's Profile")* on topic *[Display product option's image in the tooltip](/forum/26-product-category-display/887193-display-product-options-image-in-the-tooltip#364514 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.4 -- PHP version -- : 5.6.27 -- Browser(s) name and version -- : Firefox 49.0.2  Hello, found several discussions about that, but no one leading to a concrete solution for the problem/request.  Product options are additional products added to the main products. Since the options are real products in HikaShop, they have also their product images. Actually is not possible to show the image next to the optional product in the &quot;options&quot; list.  But, for each optional product we have the &quot;description&quot; displayed in a tooltip. If i add an image in the description field, the image is not displayed.  Tried to look at the code and I found why, working through overrides.  file:  option.php line 126  Actually, due to the &quot;strips&#95;tags&quot; PHP function, all the HTML tages are stripped and plain text is shown in the tooltip.  If I try to use &quot;allowable&#95;tags&quot; function coupled with strip&#95;tags, in order to allow the image tags, it doesn't work.  If i remove &quot;strips&#95;tags&quot; I see all the HTML code (product name + link to the image). Please remember that the image is included into the Product description (for each additional product). Output in the image attached.  What i'm not able to do is to display the &quot;result&quot; of the HTML code. If the code will be treated as HTML, the image will be displayed in the tooltip.  Can you please help with this? Thanks!")*

Hi Nicolas,
Hope you're well.
I am trying to replicate what Lippo did, with a thumbnail preceding the product options, I guess the code has changed over the last 8 years as I'm struggling to recreate what Lippo managed?
Any ideas on how to do this now?
Thanks
Ian

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODcxOTMtZGlzcGxheS1wcm9kdWN0LW9wdGlvbi1zLWltYWdlLWluLXRoZS10b29sdGlwP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14265
-
-

1 year 11 months ago [\#364516](#364516) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Display product option's image in the tooltip](/forum/26-product-category-display/887193-display-product-options-image-in-the-tooltip#364516 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.4 -- PHP version -- : 5.6.27 -- Browser(s) name and version -- : Firefox 49.0.2  Hello, found several discussions about that, but no one leading to a concrete solution for the problem/request.  Product options are additional products added to the main products. Since the options are real products in HikaShop, they have also their product images. Actually is not possible to show the image next to the optional product in the &quot;options&quot; list.  But, for each optional product we have the &quot;description&quot; displayed in a tooltip. If i add an image in the description field, the image is not displayed.  Tried to look at the code and I found why, working through overrides.  file:  option.php line 126  Actually, due to the &quot;strips&#95;tags&quot; PHP function, all the HTML tages are stripped and plain text is shown in the tooltip.  If I try to use &quot;allowable&#95;tags&quot; function coupled with strip&#95;tags, in order to allow the image tags, it doesn't work.  If i remove &quot;strips&#95;tags&quot; I see all the HTML code (product name + link to the image). Please remember that the image is included into the Product description (for each additional product). Output in the image attached.  What i'm not able to do is to display the &quot;result&quot; of the HTML code. If the code will be treated as HTML, the image will be displayed in the tooltip.  Can you please help with this? Thanks!")*

Hi,

The code did change a bit, but it's mainly still the same.
The code is now: Code:

&lt;span class="hikashop_option_name"&gt;&lt;?php echo $optionInfo-&gt;product_name . $options; ?&gt;&lt;/span&gt;

in the view product / option, which you can change to: Code:

&lt;span class="hikashop_option_name"&gt;&lt;?php echo $optionInfo-&gt;product_description . $options; ?&gt;&lt;/span&gt;

via the Display&gt;Views menu.

Note that this means that you want to add the thumbnail and the text in the description of your option product.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODcxOTMtZGlzcGxheS1wcm9kdWN0LW9wdGlvbi1zLWltYWdlLWluLXRoZS10b29sdGlwP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[ianspeed](/forum/user/1602-ianspeed "View ianspeed's Profile")**
- [![ianspeed's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/1602-ianspeed "View ianspeed's Profile")
- [ Offline](/forum/user/1602-ianspeed)

Less More

- Posts: 173
- Thank you received: 8
-
-

1 year 11 months ago [\#364537](#364537) by [ianspeed](/forum/user/1602-ianspeed "View ianspeed's Profile")  Replied by *[ianspeed](/forum/user/1602-ianspeed "View ianspeed's Profile")* on topic *[Display product option's image in the tooltip](/forum/26-product-category-display/887193-display-product-options-image-in-the-tooltip#364537 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.4 -- PHP version -- : 5.6.27 -- Browser(s) name and version -- : Firefox 49.0.2  Hello, found several discussions about that, but no one leading to a concrete solution for the problem/request.  Product options are additional products added to the main products. Since the options are real products in HikaShop, they have also their product images. Actually is not possible to show the image next to the optional product in the &quot;options&quot; list.  But, for each optional product we have the &quot;description&quot; displayed in a tooltip. If i add an image in the description field, the image is not displayed.  Tried to look at the code and I found why, working through overrides.  file:  option.php line 126  Actually, due to the &quot;strips&#95;tags&quot; PHP function, all the HTML tages are stripped and plain text is shown in the tooltip.  If I try to use &quot;allowable&#95;tags&quot; function coupled with strip&#95;tags, in order to allow the image tags, it doesn't work.  If i remove &quot;strips&#95;tags&quot; I see all the HTML code (product name + link to the image). Please remember that the image is included into the Product description (for each additional product). Output in the image attached.  What i'm not able to do is to display the &quot;result&quot; of the HTML code. If the code will be treated as HTML, the image will be displayed in the tooltip.  Can you please help with this? Thanks!")*

Hi Nicolas,
Unfortunately that isn't working for me, it just adds the current last image from the main product to the last option?
Am I missing some extra code somewhere else?
What I ideally would like is product image then product name and keep the tool tip for the option?

Thanks
Ian

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODcxOTMtZGlzcGxheS1wcm9kdWN0LW9wdGlvbi1zLWltYWdlLWluLXRoZS10b29sdGlwP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14265
-
-

1 year 11 months ago [\#364539](#364539) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Display product option's image in the tooltip](/forum/26-product-category-display/887193-display-product-options-image-in-the-tooltip#364539 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.4 -- PHP version -- : 5.6.27 -- Browser(s) name and version -- : Firefox 49.0.2  Hello, found several discussions about that, but no one leading to a concrete solution for the problem/request.  Product options are additional products added to the main products. Since the options are real products in HikaShop, they have also their product images. Actually is not possible to show the image next to the optional product in the &quot;options&quot; list.  But, for each optional product we have the &quot;description&quot; displayed in a tooltip. If i add an image in the description field, the image is not displayed.  Tried to look at the code and I found why, working through overrides.  file:  option.php line 126  Actually, due to the &quot;strips&#95;tags&quot; PHP function, all the HTML tages are stripped and plain text is shown in the tooltip.  If I try to use &quot;allowable&#95;tags&quot; function coupled with strip&#95;tags, in order to allow the image tags, it doesn't work.  If i remove &quot;strips&#95;tags&quot; I see all the HTML code (product name + link to the image). Please remember that the image is included into the Product description (for each additional product). Output in the image attached.  What i'm not able to do is to display the &quot;result&quot; of the HTML code. If the code will be treated as HTML, the image will be displayed in the tooltip.  Can you please help with this? Thanks!")*

Hi,

I don't see how that's possible. The code modification only adds the description of the option. It doesn't touch the image of the main product.
Are you sure you don't have other modifications ?
Can you provide a screenshot of what you changed ?
If you revert the change, can you confirm that you're back to just having the name of the option product ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODcxOTMtZGlzcGxheS1wcm9kdWN0LW9wdGlvbi1zLWltYWdlLWluLXRoZS10b29sdGlwP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[ianspeed](/forum/user/1602-ianspeed "View ianspeed's Profile")**
- [![ianspeed's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/1602-ianspeed "View ianspeed's Profile")
- [ Offline](/forum/user/1602-ianspeed)

Less More

- Posts: 173
- Thank you received: 8
-
-

1 year 11 months ago -  1 year 11 months ago [\#364553](#364553) by [ianspeed](/forum/user/1602-ianspeed "View ianspeed's Profile")  Replied by *[ianspeed](/forum/user/1602-ianspeed "View ianspeed's Profile")* on topic *[Display product option's image in the tooltip](/forum/26-product-category-display/887193-display-product-options-image-in-the-tooltip#364553 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.4 -- PHP version -- : 5.6.27 -- Browser(s) name and version -- : Firefox 49.0.2  Hello, found several discussions about that, but no one leading to a concrete solution for the problem/request.  Product options are additional products added to the main products. Since the options are real products in HikaShop, they have also their product images. Actually is not possible to show the image next to the optional product in the &quot;options&quot; list.  But, for each optional product we have the &quot;description&quot; displayed in a tooltip. If i add an image in the description field, the image is not displayed.  Tried to look at the code and I found why, working through overrides.  file:  option.php line 126  Actually, due to the &quot;strips&#95;tags&quot; PHP function, all the HTML tages are stripped and plain text is shown in the tooltip.  If I try to use &quot;allowable&#95;tags&quot; function coupled with strip&#95;tags, in order to allow the image tags, it doesn't work.  If i remove &quot;strips&#95;tags&quot; I see all the HTML code (product name + link to the image). Please remember that the image is included into the Product description (for each additional product). Output in the image attached.  What i'm not able to do is to display the &quot;result&quot; of the HTML code. If the code will be treated as HTML, the image will be displayed in the tooltip.  Can you please help with this? Thanks!")*

Hi Nicolas,
I've attached the screen shots, I removed all display modifications before changing the code. I've attached the the before, after and what I'm trying to achieve.

Thanks
Ian

- [ ![WhatImlookingfor.jpg](/forum/attachment/60008) ](/forum/attachment/60008 "...lookingfor.jpg") [ ](/forum/attachment/60008?download=1 "...lookingfor.jpg")
- [ ![Screenshotwithcodechange.png](/forum/attachment/60009) ](/forum/attachment/60009 "...codechange.png") [ ](/forum/attachment/60009?download=1 "...codechange.png")
- [ ![Screenshotwithoutcodechange.png](/forum/attachment/60010) ](/forum/attachment/60010 "...codechange.png") [ ](/forum/attachment/60010?download=1 "...codechange.png")

Last edit: 1 year 11 months ago by [ianspeed](/forum/user/1602-ianspeed "View ianspeed's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODcxOTMtZGlzcGxheS1wcm9kdWN0LW9wdGlvbi1zLWltYWdlLWluLXRoZS10b29sdGlwP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14265
-
-

1 year 11 months ago [\#364560](#364560) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Display product option's image in the tooltip](/forum/26-product-category-display/887193-display-product-options-image-in-the-tooltip#364560 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.4 -- PHP version -- : 5.6.27 -- Browser(s) name and version -- : Firefox 49.0.2  Hello, found several discussions about that, but no one leading to a concrete solution for the problem/request.  Product options are additional products added to the main products. Since the options are real products in HikaShop, they have also their product images. Actually is not possible to show the image next to the optional product in the &quot;options&quot; list.  But, for each optional product we have the &quot;description&quot; displayed in a tooltip. If i add an image in the description field, the image is not displayed.  Tried to look at the code and I found why, working through overrides.  file:  option.php line 126  Actually, due to the &quot;strips&#95;tags&quot; PHP function, all the HTML tages are stripped and plain text is shown in the tooltip.  If I try to use &quot;allowable&#95;tags&quot; function coupled with strip&#95;tags, in order to allow the image tags, it doesn't work.  If i remove &quot;strips&#95;tags&quot; I see all the HTML code (product name + link to the image). Please remember that the image is included into the Product description (for each additional product). Output in the image attached.  What i'm not able to do is to display the &quot;result&quot; of the HTML code. If the code will be treated as HTML, the image will be displayed in the tooltip.  Can you please help with this? Thanks!")*

Hi,

So the modification does what it says it does:
It displays the description of the option product. It's just that you have the same description in the description of the option product as the description of the main product.

The simplest, to do what you want is:
- create a custom field of the table "product" and the column name "product_option_label" and of the type "WYSIWYG" via the menu Display&gt;Custom fields.
- change the view override to use instead the code: Code:

&lt;span class="hikashop_option_name"&gt;&lt;?php echo $optionInfo-&gt;product_option_label.$optionInfo-&gt;product_name. $options; ?&gt;&lt;/span&gt;

- then, edit the option product settings, and in the "product_option_label" custom field, enter the img tag for the image of the product when used as an option of another product.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODcxOTMtZGlzcGxheS1wcm9kdWN0LW9wdGlvbi1zLWltYWdlLWluLXRoZS10b29sdGlwP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.406 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
