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

Setting a maximum order quantity for products

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-17-2015, 01:43 AM
  SamsonWebDesign's Avatar 
SamsonWebDesign SamsonWebDesign is offline
 

Senior Member
  
Join Date: Oct 2008
Location: East Sussex, UK
Posts: 101
 

Default Setting a maximum order quantity for products

Does anyone know a quick way I can use the minimum order quantity for products in X-Cart 4.7 and change it to be a maximum instead.

I'm guessing I can simply change the validation on that field to be greater than instead of less than but I'm struggling to find where that validation is carried out.

Any help appreciated.
__________________
Versions 4.1.11 to 4.6.4 ... when will the new versions end!

Custom X-Cart driven e-commerce sites, skins and installations at www.samsonwebdesign.co.uk
Reply With Quote
  #2  
Old 09-22-2015, 03:30 AM
  seyfin's Avatar 
seyfin seyfin is offline
 

X-Cart team
  
Join Date: May 2004
Posts: 1,223
 

Default Re: Setting a maximum order quantity for products

Actually, there are multiply lines of code that check the minimum order quantity for products, for example:

include/func/func.cart.php

Code:
// Update the quantities foreach ($productindexes as $productindex => $new_quantity) { ... $amount_min = func_query_first_cell("SELECT min_amount FROM $sql_tbl[products] WHERE productid='$productid'"); ... if ( $new_quantity >= $amount_min && !empty($active_modules['Egoods']) && !empty($cart['products'][$productindex]['distribution']) ) { $cart['products'][$productindex]['amount'] = 1; ... } }
__________________
Sincerely yours,
Sergey Fomin
X-Cart team
Chief support group engineer

===

Check this out. Totally revamped X-Cart hosting
http://www.x-cart.com/hosting.html

Follow us:
https://twitter.com/x_cart / https://www.facebook.com/xcart / https://www.instagram.com/xcart
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 08:19 AM.

   

 
X-Cart forums © 2001-2020