USPS Plugin Produces Free Shipping Over $50 | Awo Coupon Buy One Get One Should not Produce Free Shipping Less than $50


  • Default avatar
    peter15    
     2 years ago
    0

    Hello,

    I have set up my USPS Virtuemart plugin to give free shipping over $50. This is the default for orders over $50 that do not use a coupon.

    I have set up a Awocoupon for Buy One Get One Free. One customer purchased products whose intial value exceeded $50. However, when the coupon is applied the value becomes less than $50. Free shipping is automatically applied as conditional by my USPS plugin, I believe. I don't want this since I am already discounting product, and I still have to pay for shipping.


    My question is..

    Does AwoCoupon allow to discounts to be taken after shipping is applied?

    This issue may not pertain to AwoCoupon Pro, but I was wondering if someone can guide me on how to accomplish this.

    My other option would be to remove free shipping all together.

    Thank you!
  • Your avatar
    seyi    
     2 years ago
    0

    Hello,

    The free shipping is hanlded within your usps plugin, so you would have to make the modifications there. It is looking at the saleprice, and not the saleprice my discounts.

    For example, in the shipping plugin weight_countries, in function getCosts, this is the logic to determine free shipping:
    <?php
            
    if ($method->free_shipment && $cart_prices['salesPrice'] >= $method->free_shipment) {
    ?>


    This does not take into account coupons, I would change it to the below, (code borrowed from payment plugin standard)
    <?php
            $amount 
    $this->getCartAmount($cart_prices);
            if (
    $method->free_shipment && $amount >= $method->free_shipment) {
    ?>


    And that should do it.