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

#   Code Showing on Product Options Combo Box

##

- **[Manuel TT](/forum/user/29324-manuel-tt "View Manuel TT's Profile")**
- [![Manuel TT's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar29324.jpg)](/forum/user/29324-manuel-tt "View Manuel TT's Profile") Topic Author
- [ Offline](/forum/user/29324-manuel-tt)

Less More

- Posts: 36
- Thank you received: 5
-
-

4 years 20 hours ago [\#346430](#346430) by [Manuel TT](/forum/user/29324-manuel-tt "View Manuel TT's Profile")  *[Code Showing on Product Options Combo Box](/forum/26-product-category-display/905321-code-showing-on-product-options-combo-box#346430 "-- HikaShop version -- : 4.6.2 -- Joomla version -- : 3.10.11 -- PHP version -- : 7.4.33  Hello,  Just wanted to report that, under a very specific Hikashop configuration and product setup, HTML code showed up on the combo box for selecting product options (see image attached). I turned Joomla debug mode on and set Joomla error reporting to maximum and no error was shown reported.  This occurred with a product (P) that had a Characteristic (C) where the first value of C was 0 (the digit zero) and P had P has it's own characteristic. After finding this out I tested placing P as an option in another unrelated product and the same thing (code showing up on combo box for selecting product options) happened. So I do think this 'display error' happens when a product option is displayed where it's value is 0 (the digit zero). Not surprising given the 'powers' of zero in coding ;).  I don't have a problem with this, just changed the characteristic value to &quot;0.0&quot; and all is OK (thankfully the code didn't take 0.0 as meaning 0!). I also tested with 1 has a characteristic value (to rule out this happened with single digit strings) and no problem in this case.  Though a minor and easy to circumvent 'error' I share this because it might lead the Dev team to find and fix other similar occurrences that could have more serious effects. I'm sure you'll have a good laugh when you find how this come about in the code :)")* was created by *[Manuel TT](/forum/user/29324-manuel-tt "View Manuel TT's Profile")*

-- HikaShop version -- : 4.6.2
-- Joomla version -- : 3.10.11
-- PHP version -- : 7.4.33

Hello,

Just wanted to report that, under a very specific Hikashop configuration and product setup, HTML code showed up on the combo box for selecting product options (see image attached).
I turned Joomla debug mode on and set Joomla error reporting to maximum and no error was shown reported.

This occurred with a product (P) that had a Characteristic (C) where the first value of C was 0 (the digit zero) and P had P has it's own characteristic. After finding this out I tested placing P as an option in another unrelated product and the same thing (code showing up on combo box for selecting product options) happened.
So I do think this 'display error' happens when a product option is displayed where it's value is 0 (the digit zero). Not surprising given the 'powers' of zero in coding ![;)](/media/kunena/emoticons/24.png ";)").

I don't have a problem with this, just changed the characteristic value to "0.0" and all is OK (thankfully the code didn't take 0.0 as meaning 0!). I also tested with 1 has a characteristic value (to rule out this happened with single digit strings) and no problem in this case.

Though a minor and easy to circumvent 'error' I share this because it might lead the Dev team to find and fix other similar occurrences that could have more serious effects.
I'm sure you'll have a good laugh when you find how this come about in the code ![:)](/media/kunena/emoticons/3.png ":)")

---

VC22

- [ ![hikashop-value-0-in-options.png](/forum/attachment/55890?download=1) ](/forum/attachment/55890?download=1 "...in-options.png") [ ](/forum/attachment/55890?download=1 "...in-options.png")

The following user(s) said Thank You: [nicolas](/forum/user/63-nicolas "View nicolas's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDUzMjEtY29kZS1zaG93aW5nLW9uLXByb2R1Y3Qtb3B0aW9ucy1jb21iby1ib3g/dG1wbD1tYXJrZG93bg==) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86359
- Thank you received: 14294
-
-

4 years 16 hours ago [\#346433](#346433) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Code Showing on Product Options Combo Box](/forum/26-product-category-display/905321-code-showing-on-product-options-combo-box#346433 "-- HikaShop version -- : 4.6.2 -- Joomla version -- : 3.10.11 -- PHP version -- : 7.4.33  Hello,  Just wanted to report that, under a very specific Hikashop configuration and product setup, HTML code showed up on the combo box for selecting product options (see image attached). I turned Joomla debug mode on and set Joomla error reporting to maximum and no error was shown reported.  This occurred with a product (P) that had a Characteristic (C) where the first value of C was 0 (the digit zero) and P had P has it's own characteristic. After finding this out I tested placing P as an option in another unrelated product and the same thing (code showing up on combo box for selecting product options) happened. So I do think this 'display error' happens when a product option is displayed where it's value is 0 (the digit zero). Not surprising given the 'powers' of zero in coding ;).  I don't have a problem with this, just changed the characteristic value to &quot;0.0&quot; and all is OK (thankfully the code didn't take 0.0 as meaning 0!). I also tested with 1 has a characteristic value (to rule out this happened with single digit strings) and no problem in this case.  Though a minor and easy to circumvent 'error' I share this because it might lead the Dev team to find and fix other similar occurrences that could have more serious effects. I'm sure you'll have a good laugh when you find how this come about in the code :)")*

Hi,

Thanks for the report !

Add the code: Code:

if($selectionMethod == 'generic') $text = strip_tags($text);

before the line: Code:

$this-&gt;row =&amp; $variant;

in the file components/com_hikashop/views/product/tmpl/option.php and it will fix the problem. We'll add the change on our end for the next version of HikaShop too.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDUzMjEtY29kZS1zaG93aW5nLW9uLXByb2R1Y3Qtb3B0aW9ucy1jb21iby1ib3g/dG1wbD1tYXJrZG93bg==) 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.059 seconds

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