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

#   Variants - Set default value and product display

##

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

Less More

- Posts: 158
- Thank you received: 6
-
-

12 years 1 month ago [\#175171](#175171) by [artisanwebandprint](/forum/user/6555-artisanwebandprint "View artisanwebandprint's Profile")  *[Variants - Set default value and product display](/forum/32-content-creation/872244-variants-set-default-value-and-product-display#175171 "-- url of the page with the problem -- :   offerings.myartisanweb.com  -- HikaShop version -- : 2.3.3 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.3.28 -- Error-message(debug-mod must be tuned on) -- : n/a  Good day,  I have two questions:  1. How do I change the default value from unlimited to 0 for the variants found in my characteristic Ring Size? Typically they will have 2-3 sizes in stock, so it would be easier for them to add new products to their site if all of the ring size variants were set to 0 as the quantity instead of the default which is unlimited.  2. The ring quantity is set to &quot;unlimited&quot; so the characteristic &quot;Ring Size&quot; controls the inventory. However, when all ring sizes sell out in a particular ring it still shows up in the list of available rings on the front-end. Is there a little line of PHP that I could add that would say something like &quot;Any products in the category of &quot;Rings&quot; that have no variant quantities in stock under characteristics &quot;Ring Size&quot; do not display&quot;? An example of a ring that sold out but is still showing can be seen here:   screencast.com/t/beklXm65H  - I get this message: Ring Size No values found. Instead, I'd rather the ring not show up as available. I do have &quot;Display out of stock products&quot; toggled to &quot;no&quot;  Thanks,  Dawn")* was created by *[artisanwebandprint](/forum/user/6555-artisanwebandprint "View artisanwebandprint's Profile")*

-- url of the page with the problem -- : [ offerings.myartisanweb.com](http://offerings.myartisanweb.com)
-- HikaShop version -- : 2.3.3
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.3.28
-- Error-message(debug-mod must be tuned on) -- : n/a

Good day,

I have two questions:

1. How do I change the default value from unlimited to 0 for the variants found in my characteristic Ring Size? Typically they will have 2-3 sizes in stock, so it would be easier for them to add new products to their site if all of the ring size variants were set to 0 as the quantity instead of the default which is unlimited.

2. The ring quantity is set to "unlimited" so the characteristic "Ring Size" controls the inventory. However, when all ring sizes sell out in a particular ring it still shows up in the list of available rings on the front-end. Is there a little line of PHP that I could add that would say something like "Any products in the category of "Rings" that have no variant quantities in stock under characteristics "Ring Size" do not display"? An example of a ring that sold out but is still showing can be seen here: [ screencast.com/t/beklXm65H](http://screencast.com/t/beklXm65H) - I get this message: Ring Size No values found. Instead, I'd rather the ring not show up as available. I do have "Display out of stock products" toggled to "no"

Thanks,

Dawn

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

12 years 1 month ago [\#175258](#175258) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Variants - Set default value and product display](/forum/32-content-creation/872244-variants-set-default-value-and-product-display#175258 "-- url of the page with the problem -- :   offerings.myartisanweb.com  -- HikaShop version -- : 2.3.3 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.3.28 -- Error-message(debug-mod must be tuned on) -- : n/a  Good day,  I have two questions:  1. How do I change the default value from unlimited to 0 for the variants found in my characteristic Ring Size? Typically they will have 2-3 sizes in stock, so it would be easier for them to add new products to their site if all of the ring size variants were set to 0 as the quantity instead of the default which is unlimited.  2. The ring quantity is set to &quot;unlimited&quot; so the characteristic &quot;Ring Size&quot; controls the inventory. However, when all ring sizes sell out in a particular ring it still shows up in the list of available rings on the front-end. Is there a little line of PHP that I could add that would say something like &quot;Any products in the category of &quot;Rings&quot; that have no variant quantities in stock under characteristics &quot;Ring Size&quot; do not display&quot;? An example of a ring that sold out but is still showing can be seen here:   screencast.com/t/beklXm65H  - I get this message: Ring Size No values found. Instead, I'd rather the ring not show up as available. I do have &quot;Display out of stock products&quot; toggled to &quot;no&quot;  Thanks,  Dawn")*

Hi,

1. There is two things to do here. First, edit the column "product_quantity" of the table hikashop_product of your database via your phpmyadmin and set the default to 0 instead of -1. Second, before adding the characteristics to your main product, set the quantity of the main product to 0. Then, when you save the product with the new characteristics, all the variants should have their quantity to 0.

2. No, changing the code for that is quite complex.
The best in that case is to put the total stock in the main product. That way, that stock will also be decremented as well as the variant when it is purchased and thus you'll reach 0 in the main product when all the variants stock is 0 and in that case the main product won't display on the listing.

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

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

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

Less More

- Posts: 158
- Thank you received: 6
-
-

12 years 1 month ago [\#175600](#175600) by [artisanwebandprint](/forum/user/6555-artisanwebandprint "View artisanwebandprint's Profile")  Replied by *[artisanwebandprint](/forum/user/6555-artisanwebandprint "View artisanwebandprint's Profile")* on topic *[Variants - Set default value and product display](/forum/32-content-creation/872244-variants-set-default-value-and-product-display#175600 "-- url of the page with the problem -- :   offerings.myartisanweb.com  -- HikaShop version -- : 2.3.3 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.3.28 -- Error-message(debug-mod must be tuned on) -- : n/a  Good day,  I have two questions:  1. How do I change the default value from unlimited to 0 for the variants found in my characteristic Ring Size? Typically they will have 2-3 sizes in stock, so it would be easier for them to add new products to their site if all of the ring size variants were set to 0 as the quantity instead of the default which is unlimited.  2. The ring quantity is set to &quot;unlimited&quot; so the characteristic &quot;Ring Size&quot; controls the inventory. However, when all ring sizes sell out in a particular ring it still shows up in the list of available rings on the front-end. Is there a little line of PHP that I could add that would say something like &quot;Any products in the category of &quot;Rings&quot; that have no variant quantities in stock under characteristics &quot;Ring Size&quot; do not display&quot;? An example of a ring that sold out but is still showing can be seen here:   screencast.com/t/beklXm65H  - I get this message: Ring Size No values found. Instead, I'd rather the ring not show up as available. I do have &quot;Display out of stock products&quot; toggled to &quot;no&quot;  Thanks,  Dawn")*

Brilliant! It worked perfectly.

Note for other readers. For answer #1, Nicolas recommends to edit the column "Product Quantity", here is a screenshot of where to do that in PHPMyAdmin:

[ ![&#91;img](http://content.screencast.com/users/MyArtisanWeb/folders/Snagit/media/8c986802-b15e-4349-89a0-8f5fa7079d23/10.14.2014-14.48.png) ](http://content.screencast.com/users/MyArtisanWeb/folders/Snagit/media/8c986802-b15e-4349-89a0-8f5fa7079d23/10.14.2014-14.48.png "&#91;img")

Dawn

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

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