10 percent discount on all orders over £100 regardless of coupon usage.


  • Default avatar
    natastna2    
     13 years ago
    0

    Hello and thanks for your time in reading this. I've been pulling my hair out over trying to get Virtuemart to accept a 10 percent discount on all orders over £100 and I thought I had solved it by adding:

    $total += $subtotal;
    $seeddiscountprice = 100;
    $seeddiscountpercent = 0.1;
    if ($total > $seeddiscountprice) {
    $total = $total - ($total * $seeddiscountpercent);
    } else {
    $product_price = $price["product_price"];
    }

    into line 125ish of my basket.php but I have recently discovered that this discount promptly disappears at the order review page and the confirmation email also shows the incorrect amount. I would be more than happy to purchase your extension if I am able to automatically reduce the order total by 10 percent for all orders over 100. I also need this to be in addition to coupon use. So a customer could have a 15 percent coupon which they would use but they would also receive the automatic 10 percent off as well if their order is above the 100. I realise this might not be quite in the gist of what your extension is about but I've tried and failed at this so many times now I would happily pay you for the answer. Thanks again for your time. Ant.
  • Your avatar
    seyi    
     13 years ago
    0

    that is just for display. You would need to add that code there and also in ro_basket.php (the confirmation page). Then for saving the discount in the database, you would also need to edit class/ps_checkout.php, probably function calc_order_totals. Hope that helps. If you need more help, you can send me a private message for a customized solution.