Jump to content

Discount codes another discounts


Recommended Posts

Hi everyone
Hopefully someone can help me!
I want to be able to create discount codes for £5 off and more to send to customers but how can I do this?? Also I would like to maybe have something like spend £40 and get 5% off the order?? Is there anyway to do this on my prestashop?
Thanks
Fordie

Link to comment
Share on other sites

Hi

To make vouchers with say £5 off, you just go to vouchers in back office and click Money off instead of percent in the dropdown when creating voucher.

To give customers a discount for say spend £50 get 5% off or Spend £100 get 10% off just modify you cart file in
"classes/cart.php" with the following code:

if ($order_total >= 50 AND $order_total < 100) $order_total *= 95/100; /* For a purchase between 50 and 100, 5% discount */
if ($order_total >= 100 AND $order_total < 500) $order_total *= 90/100; /* For a purchase between 100 and 500, 10% discount */
if ($type == 5) return $shipping_fees;
if ($type == 6) return $wrapping_fees;
if ($type == 3) $order_total += $shipping_fees + $wrapping_fees;
if ($order_total < 0 AND $type != 2) return 0;

Its about hafl way down, original code will look like this:
if ($type == 5) return $shipping_fees;
if ($type == 6) return $wrapping_fees;
if ($type == 3) $order_total += $shipping_fees + $wrapping_fees;
if ($order_total < 0 AND $type != 2) return 0;

Link to comment
Share on other sites

  • 3 months later...
×
×
  • Create New...