# Discount on a discounted order

## Recommended Posts

Hi...

I need to customize my presta... i'm using prestashop 1.6.0.9.

My customer asked me to enable multiple Discount on an order

For example

My user "A" have got 3 discount rule: 50% 10% and 10% on total order

My user "A" add to cart some product for a total of 100\$

With his 3 discount rule him have to pay only 40,5\$ (100\$ -50% = 50\$ - 10% = 45 - 10% = 40,5\$)

If I set 3 discount rule normally my prestashop wrong calculation is: (100\$ - 50\$ -10\$ -10\$ = 30\$)

How can i do this?

Ramio

##### Share on other sites

I've found where order discount is calculated

On cart.php (lines 1525-1551) and on cart_rule.php (line 841-850)

For every rule, prestashop calculate % reduction on total order price reading this value from

\$order_total = \$context->cart->getOrderTotal(\$use_tax, Cart::ONLY_PRODUCTS, \$package_products);

Now i think i need to decrease this value everytime a % reduction is calculated

Someone can help me?

Thanks

Ramio

## Create an account

Register a new account