tinama Posted December 14, 2016 Share Posted December 14, 2016 (edited) Hello, Of default, in preferences > orders, the "minimum purchase total required in order to validate the order" is tax excl., while I'd like to set it with tax included. I have an e-commerce:. - done with 1.6.1.5 version; - what has products with different taxes (4%, 10% and 22%), - order process type: standard (5 steps); - enable guest checkout: yes How can fix that feature? Thanks Edited December 14, 2016 by tinama (see edit history) Link to comment Share on other sites More sharing options...
Kostars1 Posted June 12, 2019 Share Posted June 12, 2019 Hi! Here is how to solve it with 1.7 Edit file src/Adapter/Cart/CartPresenter.php find following code and change $productsTotalExcludingTax to $totalCartAmount so the minimum amount or Cart is TAX included Below is code already with changes return array( 'products' => $products, 'totals' => $totals, 'subtotals' => $subtotals, 'products_count' => $products_count, 'summary_string' => $summary_string, 'labels' => $labels, 'id_address_delivery' => $cart->id_address_delivery, 'id_address_invoice' => $cart->id_address_invoice, 'is_virtual' => $cart->isVirtualCart(), 'vouchers' => $vouchers, 'discounts' => $discounts, 'minimalPurchase' => $minimalPurchase, 'minimalPurchaseRequired' => ($this->priceFormatter->convertAmount($totalCartAmount) < $minimalPurchase) ? $this->translator->trans( 'A minimum shopping cart total of %amount% (tax excl.) is required to validate your order. Current cart total is %total% (tax excl.).', array( '%amount%' => $this->priceFormatter->convertAndFormat($minimalPurchase), '%total%' => $this->priceFormatter->convertAndFormat($totalCartAmount), ), 'Shop.Theme.Checkout' ) : '', ); 2 1 Link to comment Share on other sites More sharing options...
Courage2000 Posted April 9, 2020 Share Posted April 9, 2020 (edited) Thank you. For 1.7.6.4 the needed modification is in src/Adapter/Presenter/Cart/Cartpresenter.php Search 'minimalPurchaseRequired' => ($productsTotalExcludingTax < $minimalPurchase) ? Replace with 'minimalPurchaseRequired' => ($totalCartAmount < $minimalPurchase) ? Don't forget to edit the language file for taxes text. Edited April 9, 2020 by Courage2000 (see edit history) 1 1 Link to comment Share on other sites More sharing options...
Luigi Donato Posted July 25, 2023 Share Posted July 25, 2023 On 4/9/2020 at 4:09 PM, Courage2000 said: Thank you. For 1.7.6.4 the needed modification is in src/Adapter/Presenter/Cart/Cartpresenter.php Search 'minimalPurchaseRequired' => ($productsTotalExcludingTax < $minimalPurchase) ? Replace with 'minimalPurchaseRequired' => ($totalCartAmount < $minimalPurchase) ? Don't forget to edit the language file for taxes text. Sorry if I bring this topic up again, but it's first on Google and I think it's leading a lot of people astray.. There is a problem here I think, I haven't tried the code, but you are comparing a price including tax, with a minimum purchase which is tax free.. That's not good. Link to comment Share on other sites More sharing options...
endriu107 Posted July 25, 2023 Share Posted July 25, 2023 I think value from $minimalPurchase is saved in DB ps_configuration table in PS_PURCHASE_MINIMUM so it store just value without information it is with tax or without tax. 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