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

#   Product options with pricing in radio button

##

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

Less More

- Posts: 27
- Thank you received: 0
-
-

14 years 5 months ago [\#52482](#52482) by [sylph](/forum/user/7663-sylph "View sylph's Profile")  *[Product options with pricing in radio button](/forum/4-how-to/52482-product-options-with-pricing-in-radio-button#52482 "Hello,  I'm trying to change the product options ( that will affect the &quot;price with options&quot; ) to radio button instead of drop down. However I can't find the option to change it just like the product characteristic.  I tried to modify the code at option.php, changing from $html = JHTML::&#95;('select.genericlist', $this-&gt;values, $map, 'class=&quot;inputbox&quot; size=&quot;1&quot; onchange=&quot;hikashopChangeOption();&quot;', 'value', 'text', (int)$value,$id );  to  $html = JHTML::&#95;('select.radiolist', $this-&gt;values, $map, 'class=&quot;inputbox&quot; size=&quot;1&quot; onclick=&quot;hikashopChangeOption();&quot;', 'value', 'text', (int)$value, $id );  but that doesn't work. The options changed to radiobutton, but the pricing doesn't change. Could you guide me on this? Thank you very much!")* was created by *[sylph](/forum/user/7663-sylph "View sylph's Profile")*

Hello,

I'm trying to change the product options ( that will affect the "price with options" ) to radio button instead of drop down.
However I can't find the option to change it just like the product characteristic.

I tried to modify the code at option.php, changing from
$html = JHTML::_('select.genericlist', $this-&gt;values, $map, 'class="inputbox" size="1" onchange="hikashopChangeOption();"', 'value', 'text', (int)$value,$id );

to

$html = JHTML::_('select.radiolist', $this-&gt;values, $map, 'class="inputbox" size="1" onclick="hikashopChangeOption();"', 'value', 'text', (int)$value, $id );

but that doesn't work. The options changed to radiobutton, but the pricing doesn't change. Could you guide me on this? Thank you very much!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzUyNDgyLXByb2R1Y3Qtb3B0aW9ucy13aXRoLXByaWNpbmctaW4tcmFkaW8tYnV0dG9uP3RtcGw9bWFya2Rvd24=) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86576
- Thank you received: 14318
-
-

14 years 5 months ago [\#52545](#52545) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Product options with pricing in radio button](/forum/4-how-to/52482-product-options-with-pricing-in-radio-button#52545 "Hello,  I'm trying to change the product options ( that will affect the &quot;price with options&quot; ) to radio button instead of drop down. However I can't find the option to change it just like the product characteristic.  I tried to modify the code at option.php, changing from $html = JHTML::&#95;('select.genericlist', $this-&gt;values, $map, 'class=&quot;inputbox&quot; size=&quot;1&quot; onchange=&quot;hikashopChangeOption();&quot;', 'value', 'text', (int)$value,$id );  to  $html = JHTML::&#95;('select.radiolist', $this-&gt;values, $map, 'class=&quot;inputbox&quot; size=&quot;1&quot; onclick=&quot;hikashopChangeOption();&quot;', 'value', 'text', (int)$value, $id );  but that doesn't work. The options changed to radiobutton, but the pricing doesn't change. Could you guide me on this? Thank you very much!")*

I think that it's because the javascript code in hikashopChangeOption at the bottom of that view file needs to be adapted to handle radio selection instead of dropdown selection.
For a dropdown, you can directly do a ".value" on the main element. For radio, you will have to do a loop on each radio element to see which one is selected.

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

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

Less More

- Posts: 27
- Thank you received: 0
-
-

14 years 5 months ago [\#52597](#52597) by [sylph](/forum/user/7663-sylph "View sylph's Profile")  Replied by *[sylph](/forum/user/7663-sylph "View sylph's Profile")* on topic *[Re: Product options with pricing in radio button](/forum/4-how-to/52482-product-options-with-pricing-in-radio-button#52597 "Hello,  I'm trying to change the product options ( that will affect the &quot;price with options&quot; ) to radio button instead of drop down. However I can't find the option to change it just like the product characteristic.  I tried to modify the code at option.php, changing from $html = JHTML::&#95;('select.genericlist', $this-&gt;values, $map, 'class=&quot;inputbox&quot; size=&quot;1&quot; onchange=&quot;hikashopChangeOption();&quot;', 'value', 'text', (int)$value,$id );  to  $html = JHTML::&#95;('select.radiolist', $this-&gt;values, $map, 'class=&quot;inputbox&quot; size=&quot;1&quot; onclick=&quot;hikashopChangeOption();&quot;', 'value', 'text', (int)$value, $id );  but that doesn't work. The options changed to radiobutton, but the pricing doesn't change. Could you guide me on this? Thank you very much!")*

Hi Nicolas,

Thank you very much for your reply. I managed to change the js, and now the pricing change but when I add to cart, the new pricing does not reflect on the cart.
Example, if I select "large" for a product, my product is now selling at $10. When I click "Add to cart", it shows "$5" which is the price for the small item.

I am still working on this, do let me know if you have any advice.
Appreciate your support so far, thanks again!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzUyNDgyLXByb2R1Y3Qtb3B0aW9ucy13aXRoLXByaWNpbmctaW4tcmFkaW8tYnV0dG9uP3RtcGw9bWFya2Rvd24=) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86576
- Thank you received: 14318
-
-

14 years 5 months ago [\#52672](#52672) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Product options with pricing in radio button](/forum/4-how-to/52482-product-options-with-pricing-in-radio-button#52672 "Hello,  I'm trying to change the product options ( that will affect the &quot;price with options&quot; ) to radio button instead of drop down. However I can't find the option to change it just like the product characteristic.  I tried to modify the code at option.php, changing from $html = JHTML::&#95;('select.genericlist', $this-&gt;values, $map, 'class=&quot;inputbox&quot; size=&quot;1&quot; onchange=&quot;hikashopChangeOption();&quot;', 'value', 'text', (int)$value,$id );  to  $html = JHTML::&#95;('select.radiolist', $this-&gt;values, $map, 'class=&quot;inputbox&quot; size=&quot;1&quot; onclick=&quot;hikashopChangeOption();&quot;', 'value', 'text', (int)$value, $id );  but that doesn't work. The options changed to radiobutton, but the pricing doesn't change. Could you guide me on this? Thank you very much!")*

I would have to look at the page in order to give an advice on that problem since it doesn't use anymore the core code of HikaShop.

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

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

Less More

- Posts: 27
- Thank you received: 0
-
-

14 years 5 months ago [\#52719](#52719) by [sylph](/forum/user/7663-sylph "View sylph's Profile")  Replied by *[sylph](/forum/user/7663-sylph "View sylph's Profile")* on topic *[Re: Product options with pricing in radio button](/forum/4-how-to/52482-product-options-with-pricing-in-radio-button#52719 "Hello,  I'm trying to change the product options ( that will affect the &quot;price with options&quot; ) to radio button instead of drop down. However I can't find the option to change it just like the product characteristic.  I tried to modify the code at option.php, changing from $html = JHTML::&#95;('select.genericlist', $this-&gt;values, $map, 'class=&quot;inputbox&quot; size=&quot;1&quot; onchange=&quot;hikashopChangeOption();&quot;', 'value', 'text', (int)$value,$id );  to  $html = JHTML::&#95;('select.radiolist', $this-&gt;values, $map, 'class=&quot;inputbox&quot; size=&quot;1&quot; onclick=&quot;hikashopChangeOption();&quot;', 'value', 'text', (int)$value, $id );  but that doesn't work. The options changed to radiobutton, but the pricing doesn't change. Could you guide me on this? Thank you very much!")*

Hi Nicolas,

Have managed to solve the issue. The thing is we have to use back "$this-&gt;values" instead of own values, though the array is the same. Unsure why, but it seems that when add to cart the system will check back if that particular array value is selected or not.

Thanks for your help so far! ![:)](/media/kunena/emoticons/3.png ":)")

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

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