Bug when using vmonepage


  • Default avatar
    info423    
     9 years ago
    0

    I am using the vmonepage plugin (http://vmonepage.com/) for my cart. When I add a random coupon name (one which doesn't exists) I always get the coupon is added successfully, but nothing is happening because the coupon doesn't exists.

    I've fixed that for me with adding an else statement in helpers/estore/virtuemart/couponhandler.php on line 246, that else statement is returning a value (error message). Then the problem is fixed.

    Can you add this change in the next version of AwoCoupon?
  • Your avatar
    seyi    
     9 years ago
    0

    Hello,

    I tested the opc you are using and that fix did not work for me. Well it worked in that I received the correct error for coupons that do not exist, but then coupons that did exist stopped working.
  • Default avatar
    info423    
     9 years ago
    0

    I tested it with two kinds of codes (coupon and gift) and it is working well. My code is as follows:

    <?php
                    
    if($_code!=$_awo_displaying_coupon) return JText::_('COM_VIRTUEMART_COUPON_CODE_INVALID');
                    
    //if(strpos($_code,',')===false) return JText::_('COM_VIRTUEMART_COUPON_CODE_INVALID');
                
    }
            } else {
                return 
    'Error';
            }
            
    //------END   VIRTURMART COUPON SYSTEM ----------------------------------------------------------------------------------------------
    ?>
  • Your avatar
    seyi    
     9 years ago
    0

    Hello,

    After more testing, I see why it works now. The code you added does not actually do anything, if you remove it, it should still work.

    In AwoCoupon->configuration, you set 'Enable store coupon' to 'yes'. Because of that setting, the processing is a little different, which is why it works. If you set it to 'no', then it should stop working, and the extra code you added would stop all your coupons from working.