Answer the question
In order to leave comments, you need to log in
Is it possible to make the final discount less than 10%?
Can it be implemented in such a way that during the final pricing, the total final discount will never be more than 10%?
Answer the question
In order to leave comments, you need to log in
catalog/model/total/total.php - model responsible for the Total
In it you need to:
1. Get subtotal - $this->cart->getSubTotal(); (it most likely already takes into account the discount for the customer group)
2. Check the customer group $this->customer->getCustomerGroupId();
3. Calculate the desired total with a 10% discount, suppose we call the variable $totalten
4. Replace
'text' => $this->currency->format(max(0, $total)),
'value' => max(0, $total),
'text' => $this->currency->format(max(0, $total, $totalten)),
'value' => max(0, $total, $totalten),
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question