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

#   Changing default option selction to Yes

##

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

Less More

- Posts: 139
- Thank you received: 1
-
-

11 years 1 month ago [\#218418](#218418) by [abasel](/forum/user/6302-abasel "View abasel's Profile")  *[Changing default option selction to Yes](/forum/26-product-category-display/880074-changing-default-option-selction-to-yes#218418 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.5.4  How do I default an option selection to yes (instead of the No)?")* was created by *[abasel](/forum/user/6302-abasel "View abasel's Profile")*

-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.5.4

How do I default an option selection to yes (instead of the No)?

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

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

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 1 month ago [\#218447](#218447) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Changing default option selction to Yes](/forum/26-product-category-display/880074-changing-default-option-selction-to-yes#218447 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.5.4  How do I default an option selection to yes (instead of the No)?")*

Hi,

You can edit the view "product / option" and add the code: Code:

$value = $optionElement-&gt;product_id;

Right after: Code:

if(!$optionElement-&gt;product_published &#124;&#124; (!$this-&gt;config-&gt;get('show_out_of_stock',1) &amp;&amp; $optionElement-&gt;product_quantity==0)) continue;

[ www.hikashop.com/support/support/documen...ize-the-display.html](http://www.hikashop.com/support/support/documentation/153-customize-the-display.html)

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

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

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

Less More

- Posts: 139
- Thank you received: 1
-
-

11 years 1 month ago [\#218559](#218559) by [abasel](/forum/user/6302-abasel "View abasel's Profile")  Replied by *[abasel](/forum/user/6302-abasel "View abasel's Profile")* on topic *[Changing default option selction to Yes](/forum/26-product-category-display/880074-changing-default-option-selction-to-yes#218559 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.5.4  How do I default an option selection to yes (instead of the No)?")*

Perfect, thanks ![:cheer:](/media/kunena/emoticons/2.png ":cheer:")

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