Virtuemart Shipment problem calculation the free shipment


  • Default avatar
    yaniv2    
     5 years ago  last edited 5 years ago
    0

    Hi,
    I have a problem with Awocopon and virtuemart shipping, if i use "Minimum Amount for Free Shipment" to manage free shipping for orders above X amount, its Looks like that not all the prices exist in the cartPrices Data.
    If i use By x Get y coupon, the free shipping not taking into account the discount and the new total amount for the cart and treat it like i add to the cart 3 separate product instead of 1 product and 2 for free (By 1 Get 2 free).
    So the free shipping is kick's in if the price of the cart is less then the "Minimum Amount for Free Shipment" because shipping plugin Not taking into account the discount.

    Product Price =100
    By x Get y = By 1 Get 2
    Minimum Amount for Free Shipment =300
    Cart: 3 product(1+ 2 free)=100
    Shipment think that the total price of the cart is 300 and kick's in the free shipment

    I get the print for $cart->cartPrices in the shipping plugin (Attached Pic NO1) you will see that there is no data for the billTotal parameter.
    If i print the data from the cart i get it correct(Attached Pic NO2). I tried it on my site on old virtuemart (3.2.1) and then i download the new virtuemart + joomla 3.9.11 and install the new Awocoupon newest version and it Still occurs. 
    It is bug? do i miss something?
    Thanks,
    yaniv

    Pic1




    Pic2
    96fHHZh.png
  • Your avatar
    seyi    
     5 years ago
    0

    Have you seen this blog post of how to get AwoCoupon working with free shipping for Virtuemart?
  • Default avatar
    yaniv2    
     5 years ago
    0

    Hi,
    yes but still no change.
    The $amount = $this->getCartAmount($cart_prices) gave me the same Total so the free shipment still kicks in when it doesn't need to yet.
    I think there is a bug because if you look on print in Pic NO1 you will see that the parameter "billTotal" is 0

    But with  $awosess = AC()->storediscount->get_coupon_session()
    You gave me a new Idea to approach it and maybe i can manage to do that, but i still think that the solution that you gave in the article not working.
    Thanks,
    yaniv