1

Guys i want to apply discount on every 3 product pack, For example if customer bought 3 product from a specific category he will get $5 discount. But if he buy 4 or 5 products from same category then discount should apply on 3 pack. And remaining 2 product price will be same.

And same discount will be applied for multiple of 3 , 6 ,9 , 12, 15 and so on..

Thanks for the help..

1
  • Magento version? Commented Feb 19, 2018 at 16:20

1 Answer 1

0

This post can help you http://excellencemagentoblog.com/blog/2012/01/27/magento-add-fee-discount-order-total/

Here they are adding the extra fees so instead of that you have to decrease the price from grand total.

$address->setGrandTotal($address->getGrandTotal() - $address->getFeeAmount()); $address->setBaseGrandTotal($address->getBaseGrandTotal() - $address->getBaseFeeAmount()); 

Also before that, you have to fetch all the products from current cart.

Check the product category and check their quantity and category type.

Calculate the amount of discount you want to deduct from the grand total.

Best of luck.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.