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

#   Set quantity field default value to 0...

##

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

Less More

- Posts: 30
- Thank you received: 0
-
-

12 years 8 months ago [\#147586](#147586) by [zaratustra27](/forum/user/7005-zaratustra27 "View zaratustra27's Profile")  *[Set quantity field default value to 0...](/forum/26-product-category-display/866497-set-quantity-field-default-value-to-0#147586 "Hi,  Is there a way to set quantity field default value to 0?  I have a product list page where all products have their own 'Add to cart buton', each button with its respective quantity field with the +/- controls and stuff, but client wants it to display 0 instead of 1, is there a way of changing such value?  I noticed when I fill manually the field to 0 and try to increase quantity by clicking on '+' button, value jumps to 2 directly.  Thanks a lot!  -- url of the page with the problem -- :   ameri-lab.com/index.php/services  -- HikaShop version -- : 2.3.0 Starter -- Joomla version -- : 3.2.3 -- PHP version -- : 5.4.23 -- Browser(s) name and version -- :FF27.0.1 -- Error-message(debug-mod must be tuned on) -- : No error")* was created by *[zaratustra27](/forum/user/7005-zaratustra27 "View zaratustra27's Profile")*

Hi,

Is there a way to set quantity field default value to 0?

I have a product list page where all products have their own 'Add to cart buton', each button with its respective quantity field with the +/- controls and stuff, but client wants it to display 0 instead of 1, is there a way of changing such value?

I noticed when I fill manually the field to 0 and try to increase quantity by clicking on '+' button, value jumps to 2 directly.

Thanks a lot!

-- url of the page with the problem -- : [ ameri-lab.com/index.php/services](http://ameri-lab.com/index.php/services)
-- HikaShop version -- : 2.3.0 Starter
-- Joomla version -- : 3.2.3
-- PHP version -- : 5.4.23
-- Browser(s) name and version -- :FF27.0.1
-- Error-message(debug-mod must be tuned on) -- : No error

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

12 years 8 months ago [\#147611](#147611) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Set quantity field default value to 0...](/forum/26-product-category-display/866497-set-quantity-field-default-value-to-0#147611 "Hi,  Is there a way to set quantity field default value to 0?  I have a product list page where all products have their own 'Add to cart buton', each button with its respective quantity field with the +/- controls and stuff, but client wants it to display 0 instead of 1, is there a way of changing such value?  I noticed when I fill manually the field to 0 and try to increase quantity by clicking on '+' button, value jumps to 2 directly.  Thanks a lot!  -- url of the page with the problem -- :   ameri-lab.com/index.php/services  -- HikaShop version -- : 2.3.0 Starter -- Joomla version -- : 3.2.3 -- PHP version -- : 5.4.23 -- Browser(s) name and version -- :FF27.0.1 -- Error-message(debug-mod must be tuned on) -- : No error")*

Hi,

You have to edit the view "product / quantity" via the menu Display &gt; Views and add the code: Code:

$min = 0;

After: Code:

if($min&lt;=0){ $min=1; }

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

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