Purchase X Get Y Issue


  • Default avatar
    sebastian8    
     9 months ago
    0

    Hi,

    We have an 'Purchase X Get Y' gift automatically applied to our customers.  The discount is 100%, but as the discount is taken off at the end, some users are confused as they don't want to "pay" for the gift. When they try to delete the item the website starts loading and will never stop "loading".


    Please fix so that:

    1) either item Y gets removed form the cart (which is not great), or

    2) create a pop-up stating that the unit has a 100% discount applied and cannot be removed.


    many thanks.

  • Your avatar
    seyi    
     9 months ago
    0

    Hello,

    So you are having an issue where the website continues to load until it errors out?  How did you create the buy x get y coupon?
  • Default avatar
    sebastian8    
     9 months ago
    0

    Hi Seyi,

    the website seems to never time out, it just continues forever to load.

    Buy X Get Y is set up like this:

    buy 1 product from within virtuemart category X, get 1 specific product with 100% discount.

    No further restrictions or settings applied.

  • Your avatar
    seyi    
     9 months ago
    0

    ok, and when the customer removes the buy x product which qualifies, and then tries to remove the get y product, this is when the error happens?
  • Default avatar
    sebastian8    
     9 months ago
    0

    the error only happens when Y is removed before X.

  • Your avatar
    seyi    
     9 months ago
    0

    Ok, I was not able to reproduce this with Virtuemart checkout but was able to reproduce it with vp onepage checkout.  Is that what you are using?  If so, here is the fix that will stop it from loading forever:

    in the file: www/plugins/vmcoupon/awocoupon/awocoupon.php around line 84 is this:
    <?php
            
    if($isrefresh) {
    ?>


    Change it to this:
    <?php
            $is_vmonepagecheckout 
    class_exists('plgSystemVPOnePageCheckout') ? true false;
            if(!$is_vmonepagecheckout && $isrefresh) {
    ?>


  • Default avatar
    sebastian8    
     9 months ago
    0

    Yes, we're using VP onepage checkout. Many thanks!