Set quantity field default value to 0...

  • Posts: 30
  • Thank you received: 0
11 years 5 months ago #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

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 5 months ago #147611

Hi,

You have to edit the view "product / quantity" via the menu Display > Views and add the code:

$min = 0;
After:
		if($min<=0){
			$min=1;
		}

Please Log in or Create an account to join the conversation.

Time to create page: 0.066 seconds
Powered by Kunena Forum