Yoriel79 Posted May 3, 2011 Posted May 3, 2011 Hi.In OrderController.php (around line 56 ) I have replacethis /* Check minimal amount */ $currency = Currency::getCurrency((int)self::$cart->id_currency); $orderTotal = self::$cart->getOrderTotal(); $minimalPurchase = Tools::convertPrice((float)Configuration::get('PS_PURCHASE_MINIMUM'), $currency); if ($orderTotal < $minimalPurchase) { $this->step = 0; $this->errors[] = Tools::displayError('A minimum purchase total of').' '.Tools::displayPrice($minimalPurchase, $currency). ' '.Tools::displayError('is required in order to validate your order.'); } by /* Check minimal amount */ $currency = Currency::getCurrency((int)self::$cart->id_currency); $nbProds = self::$cart->getnbProducts(); $minimalPurchase = Tools::convertPrice((float)Configuration::get('PS_PURCHASE_MINIMUM')); if ($nbProds < $minimalPurchase) { $this->step = 0; $this->errors[] = Tools::displayError('A minimum purchase total of').' '.Tools::displayPrice($minimalPurchase, $currency). ' '.Tools::displayError('is required in order to validate your order.'); } It works! but if I activate the debug mode in confing.inc.php, my website get me the following message,"Warning: Missing argument 1 for CartCore::getNbProducts(), called in /Applications/MAMP/htdocs/prestashop/controllers/OrderController.php on line 59 and defined in /Applications/MAMP/htdocs/prestashop/classes/Cart.php on line 448" What is the problem? What can I do?Sorry for my english,Thanks. Share this post Link to post Share on other sites More sharing options...
Yoriel79 Posted May 4, 2011 Posted May 4, 2011 Its works!!!Thank you very much.Finally I replaced /* Check minimal amount */ $currency = Currency::getCurrency((int)self::$cart->id_currency); $orderTotal = self::$cart->getOrderTotal(); $minimalPurchase = Tools::convertPrice((float)Configuration::get('PS_PURCHASE_MINIMUM'), $currency); if ($orderTotal < $minimalPurchase) { $this->step = 0; $this->errors[] = Tools::displayError('A minimum purchase total of').' '.Tools::displayPrice($minimalPurchase, $currency). ' '.Tools::displayError('is required in order to validate your order.'); } for /* Check minimal amount */ $nbProds = self::$cart->nbProducts(); $minimalPurchase = Configuration::get('PS_PURCHASE_MINIMUM'); if ($nbProds < $minimalPurchase) { $this->step = 0; $this->errors[] = Tools::displayError('A minimum purchase of').' '.Tools::displayError($minimalPurchase). ' '.Tools::displayError('products is required in order to validate your order.'); } Thank you. Share this post Link to post Share on other sites More sharing options...
Malk Posted December 9, 2011 Posted December 9, 2011 hello - what does this do exactly ? my default currency is set fo USD but I would like to set my minimum sales at 20 EUR Share this post Link to post Share on other sites More sharing options...
PierPier Posted January 20, 2012 Posted January 20, 2012 Hi, I posted a similar question here: http://www.prestashop.com/forums/topic/151341-minimal-order-quantity-per-order/ have you any idea to solve my issue? Share this post Link to post Share on other sites More sharing options...
neohai Posted July 25, 2013 Posted July 25, 2013 Where you put the queantities? Share this post Link to post Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now