Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

change default quantity to 0

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 03-07-2022, 11:52 AM
 
keystone keystone is offline
 

X-Adept
  
Join Date: Jul 2006
Location: USA
Posts: 776
 

Default change default quantity to 0

Hi, I'm using the quantity text box instead of the drop down for the quantity amount on my products. I want to set the default amount to 0 but can't seem to get it to work. Currently it is set to 1.

I've been looking at this line of code...

/ideal_responsive/customer/main/buy_now.tpl
Code:
value="{$product.appearance.min_quantity|default:"1"}

If I change the "1" to "0" nothing happens. If I delete $product.appearance.min_quantity and enter a "0" it works however I was hoping someone could tell me where this variable is being pulled from so I could change it in the actual variable.

I've also tried to change the "minimum order quantity" on an actual product edit page from 1 to 0 but when I hit "apply changes" it defaults back to 1.

This is in x-cart version 4.7.11
Thanks.
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3
mods:
reCaptcha
running on UNIX

www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2
mods:
reCaptcha
cdseo pro
running on UNIX
Reply With Quote
  #2  
Old 03-08-2022, 04:35 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,132
 

Default Re: change default quantity to 0

Because you cannot have quantity of 0 for order so minimum is 1. The min_quantity is set in func.product.php within the "appearance" function however I wouldn't change that as it is used in other places as well and you may end up having errors loading pages. You can change the whole expression
Code:
{$product.appearance.min_quantity|default:"1"}


to 0 if you want to
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 03-14-2022, 06:55 AM
 
www.cheapglasses.net www.cheapglasses.net is offline
 

Advanced Member
  
Join Date: Dec 2015
Posts: 76
 

Default Re: change default quantity to 0

I still have a lot of x-cart classic Licenses not sold out yet! too Bad!!!


x-cart 5 needs to pay yearly, too bad either!
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:43 AM.

   

 
X-Cart forums © 2001-2020