- Posts: 30
- Thank you received: 0
Set quantity field default value to 0...
- zaratustra27
-
Topic Author
- Offline
Less
More
12 years 6 months ago #147586
by zaratustra27
Set quantity field default value to 0... was created by zaratustra27
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
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
Please Log in or Create an account to join the conversation.
12 years 6 months ago #147611
by Xavier
Replied by Xavier on topic Set quantity field default value to 0...
Hi,
You have to edit the view "product / quantity" via the menu Display > Views and add the code:
After:
You have to edit the view "product / quantity" via the menu Display > Views and add the code:
Code:
$min = 0;
Code:
if($min<=0){
$min=1;
}
Please Log in or Create an account to join the conversation.
Time to create page: 0.138 seconds