piR-web Posted November 6, 2018 Share Posted November 6, 2018 Bonjour, Je suis sur Prestashop 1.6 et j'aimerais mettre un montant minimal de commande à 300 euros (jusqu'ici tout va bien) sauf si dans le panier un des produit à un prix unitaire inférieur à 1 euros. Cela doit se passer dans OrderOpcController.php /* Check minimal amount */ $currency = Currency::getCurrency((int)$this->context->cart->id_currency); $minimal_purchase = Tools::convertPrice((float)Configuration::get('PS_PURCHASE_MINIMUM'), $currency); if ($this->context->cart->getOrderTotal(false, Cart::ONLY_PRODUCTS) < $minimal_purchase) { return '<p class="warning">'.sprintf( Tools::displayError('A minimum purchase total of %1s (tax excl.) is required to validate your order, current purchase total is %2s (tax excl.).'), Tools::displayPrice($minimal_purchase, $currency), Tools::displayPrice($this->context->cart->getOrderTotal(false, Cart::ONLY_PRODUCTS), $currency) ).'</p>'; } Quelqu'un aurait-il une idée ? Merci Link to comment 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