When using automatic discount prices in checkout not show


  • Default avatar
    john71    
     9 years ago
    0

    When using automatic discount, product prices in checkout are not shown. Prices are only visible after clicking the update button from any product in the cart??? Buy X get Y works fine. Products are added. Filling the coupon code myself works fine, but when automatic discount enabled there are no prices shown...

    2.2.9 Pro
    VM 2.6.6

    Regards, John
  • Your avatar
    seyi    
     9 years ago
    0

    Hello,

    Yes, I can produce this problem if all of the below apply:
    - using virtuemart 2.6.6 or higher
    - using automatic coupon code in AwoCoupon
    - in store, set the 'Minimum purchase order value for your shop' to greater than 0

    If that is your case also, then this should fix it.

    In www/administrator/components/com_awocoupon/helpers/estore/virtuemart/couponhandler.php, around line 190 is this
    <?php
            
    if(method_exists($calculator'setCartPrices')) $calculator->setCartPrices(array()); //this line deletes the cache    
    ?>


    Comment it out, like this
    <?php
            
    //if(method_exists($calculator, 'setCartPrices')) $calculator->setCartPrices(array()); //this line deletes the cache    
    ?>


    That should fix it
  • Default avatar
    john71    
     9 years ago
    0

    Yes and No...

    Your solution works, but:

    - To be sure: I commented out two times. One on line 379 and line 1577 ????? Is this correct? No line 190...

    - in store, set the 'Minimum purchase order value for your shop' to greater than 0. When I have = 0, also this problem.

    - Buy X get Y. The value of Y is visible in the cart. But the total amount to pay minus the value of Y (you get this for free) is only visible when you log in or click pay as guest? Is this correct? I like to see it before loggin.

    Thank you for your fast response, John
  • Your avatar
    seyi    
     9 years ago
    0

    Those are not the lines I have, seems the line numbers have doubled because I have the setCartPrices logic on 190 and 794. In anycase, it is NOT correct to remove the second setCartPrices. This affects buy x get y as I see you are having problems with now. Please uncomment the second and test again.
  • Default avatar
    john71    
     9 years ago
    0

    I uncomment the second line. Not the solution for buy X get Y discount problem.

    I don't see the discount when product X and Y are in the basket. I have to login or click pay as guest to see the discount with the correct total amount = product x minus value product y. It seems the automatic discount coupon code is activated after login...
  • Your avatar
    seyi    
     9 years ago
    0

    I need more info, does this happen for only automatic discounts or if you put in the code manually?