2

I'm using Prestashop 1.6.1

A customer is asking to create a single voucher that makes a discount of 5€ if the cart is having 2 items and 7€ if it has 3 items(or more).

I'm newbie to prestashop development and i've been trying for 2 days with no results.

Any tips to follow?, what hook should i use? or maybe i should alter the core files.

Any suggestion is much apreciated.

Thanks

  • Have you tried cart rules? 1. Create cart rule for 2 products ( http://prntscr.com/b8ydxq ) , create another cart rule for 3 products, create another cart rule for 4 products. And set priority. Maybe it is not good idea if you gonna use 50 cart rules, but for a few its really good solution, not? – elPresta May 27 '16 at 05:42
  • The problem here is that it should be the same voucher code – Digital_Ajdir May 27 '16 at 08:09

1 Answers1

0

Sadly PrestaShop doesn't have quantity base discount so you must edit core files to achieve this. Edit "/controllers/admin/AdminCartRulesController.php" to add field for quantity and for front edit "/controllers/front/OrderController.php".

FMEModules
  • 126
  • 2
  • Thanks for your reply, I suggested to the customer to make a % discount instead, if he dosn't agree i'll have to make it by changing these files. Cheers – Digital_Ajdir May 27 '16 at 08:13