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

#   Hide options with price 0 from cart, checkout, etc

##

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

Less More

- Posts: 6
- Thank you received: 0
-
-

10 years 6 months ago [\#241205](#241205) by [vincentducate](/forum/user/35951-vincentducate "View vincentducate's Profile")  *[Hide options with price 0 from cart, checkout, etc](/forum/27-checkout/884736-hide-options-with-price-0-from-cart-checkout-etc#241205 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.5.1  How can I hide product options with price 0 in the cart, checkout, etc  I'll give an example.  A webshop customer orders a cabinet. As an option he can have some holes drilled to put some cables through. So he can select the number of holes he wants eg none, 1 hole, 2 holes,.... If he selects none, the option shouldn't appear in the checkout.  Regards, Vincent")* was created by *[vincentducate](/forum/user/35951-vincentducate "View vincentducate's Profile")*

-- HikaShop version -- : 2.6.1
-- Joomla version -- : 3.5.1

How can I hide product options with price 0 in the cart, checkout, etc

I'll give an example.

A webshop customer orders a cabinet. As an option he can have some holes drilled to put some cables through. So he can select the number of holes he wants eg none, 1 hole, 2 holes,.... If he selects none, the option shouldn't appear in the checkout.

Regards,
Vincent

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NDczNi1oaWRlLW9wdGlvbnMtd2l0aC1wcmljZS0wLWZyb20tY2FydC1jaGVja291dC1ldGM/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: 86584
- Thank you received: 14325
-
-

10 years 5 months ago [\#241209](#241209) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hide options with price 0 from cart, checkout, etc](/forum/27-checkout/884736-hide-options-with-price-0-from-cart-checkout-etc#241209 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.5.1  How can I hide product options with price 0 in the cart, checkout, etc  I'll give an example.  A webshop customer orders a cabinet. As an option he can have some holes drilled to put some cables through. So he can select the number of holes he wants eg none, 1 hole, 2 holes,.... If he selects none, the option shouldn't appear in the checkout.  Regards, Vincent")*

Hi,

If an option product doesn't have any characteristic, if you select no, the option won't appear in the checkout/cart.
So I suppose that your optionproduct has a characteristic with several values. And in that case, the system doesn't add a "no" choice and only display the choices based on the variants of the product, and it doesn't which one is the one you don't want to display, if there is one.
So the solution instead, is to remove that choice (by removing the variant from the option product), and add the code: Code:

$this-&gt;values[] = JHTML::_('select.option', 0,JText::_('HIKASHOP_NO'));

before the line: Code:

$defaultValue=array();

in the file "option" of the view "product" via the menu Display&gt;Views so that this extra "no" choice will act as the no choice when the product doesn't have any characteristic.

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

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

Less More

- Posts: 6
- Thank you received: 0
-
-

10 years 5 months ago [\#241262](#241262) by [vincentducate](/forum/user/35951-vincentducate "View vincentducate's Profile")  Replied by *[vincentducate](/forum/user/35951-vincentducate "View vincentducate's Profile")* on topic *[Hide options with price 0 from cart, checkout, etc](/forum/27-checkout/884736-hide-options-with-price-0-from-cart-checkout-etc#241262 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.5.1  How can I hide product options with price 0 in the cart, checkout, etc  I'll give an example.  A webshop customer orders a cabinet. As an option he can have some holes drilled to put some cables through. So he can select the number of holes he wants eg none, 1 hole, 2 holes,.... If he selects none, the option shouldn't appear in the checkout.  Regards, Vincent")*

This works fine.
Is it also possible to set 'NO' as the default variant because now it's taking the first one in the list as the default.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NDczNi1oaWRlLW9wdGlvbnMtd2l0aC1wcmljZS0wLWZyb20tY2FydC1jaGVja291dC1ldGM/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: 86584
- Thank you received: 14325
-
-

10 years 5 months ago [\#241284](#241284) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hide options with price 0 from cart, checkout, etc](/forum/27-checkout/884736-hide-options-with-price-0-from-cart-checkout-etc#241284 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.5.1  How can I hide product options with price 0 in the cart, checkout, etc  I'll give an example.  A webshop customer orders a cabinet. As an option he can have some holes drilled to put some cables through. So he can select the number of holes he wants eg none, 1 hole, 2 holes,.... If he selects none, the option shouldn't appear in the checkout.  Regards, Vincent")*

Sure. Change the code:
(int)$value
to:
''
in that same view file and that should do it.

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

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