Coupons not deducting in cart


  • Default avatar
    chill_e_g    
     7 years ago
    0

    Hi hope someone can assist, coupons are not adding to the cart, the confirmation message displays, but no discount / coupon is applied.

    www.shop.scrapbookstudio.co.za
    Coupon Code : TEST
  • Your avatar
    seyi    
     7 years ago
    0

    I do not see the coupon field in your shopping cart.
  • Default avatar
    chill_e_g    
     7 years ago
    0

    So sorry, please check again, I enabled coupon usage.
  • Your avatar
    seyi    
     7 years ago
    0

    Ok, so added a product to the cart and in the cart view, before adding a coupon I see there is already a coupon there ' Free Shipping - No Coupon Allowe' with a discount of 1.  The total shows 1199.  If I delete the coupon, the total then shows 1200.  So it seems to be discounting. I tried adding TEST, but it added that coupon again, is it the same?

    Vzh4Xps.png
  • Default avatar
    chill_e_g    
     7 years ago
    0

    That is a coupon that gets added when cost is over 1000, try a product with a smaller amount, TEST coupon is 10%
  • Your avatar
    seyi    
     7 years ago  last edited 7 years ago
    0

    Ok, product total is now 110.  When I enter TEST, I get error 'Coupon code not found. Please try again.'

    Might be easier if you can send a private message with temp admin access so I can look around.

    Thanks for the access.

    What is the plugin plg_system_vm2_cart?   I think this is where the problem is.  Unfortunately, cannot disable it because the cart goes blank if I do.  We know coupons work because bonus rules adds a coupon to the cart and it is correctly deducted.  My guess is plg_system_vm2_cart is not correctly adding the coupon to the cart.
  • Default avatar
    chill_e_g    
     7 years ago
    0

    I have no idea, a bit over my head, who do I need to contact for support?
  • Your avatar
    seyi    
     7 years ago  last edited 7 years ago
    0

    If you can send a private message with temp ftp access, I can have a look.

    This is a very similar problem to the one you had 2 years ago:
    https://awodev.com/forum/awocoupon/help-section/error-20#post7697

    Bonus rules is interferring and refreshing the page before AwoCoupon has a chance to process the discount.  So updated the code so vm_bonus does not do that any more.  In
    www/templates/[YOUR_TEMPLATE]/html/com_virtuemart/cart/default_cart.php, around line 31, changed:
     <button class="btn btn-primary details-button button" type="submit" name="setcoupon" title="<?php echo JText::_('COM_VIRTUEMART_SAVE'); ?>"  ><?php echo JText::_('COM_VIRTUEMART_SAVE'); ?></button>


    to this
     <button class="btn btn-primary details-button button" type="submit" value="1" name="setcoupon" title="<?php echo JText::_('COM_VIRTUEMART_SAVE'); ?>"  ><?php echo JText::_('COM_VIRTUEMART_SAVE'); ?></button>


    And in www/plugins/system/bonus/bonus.php, around line 81 is this:
    <?php
                $isCheckout 
    $app->input->get('checkout',0);
                if ($isCheckout) {
                    //VmbonusHelperFrontUtils::bonusDebug("Bonus PLugin : onAfterRoute : Exiting becouse of checkout.",'warning');
                    return;
                }
    ?>


    After that added this:
    <?php
                $isSetCoupon 
    $app->input->get('setcoupon',0);
                if ($isSetCoupon) {
                    //VmbonusHelperFrontUtils::bonusDebug("Bonus PLugin : onAfterRoute : Exiting becouse of checkout.",'warning');
                    return;
                }
    ?>

  • Default avatar
    chill_e_g    
     7 years ago
    0

    Awesome, I cannot thank you enough