Weird behavior after login


  • Default avatar
    luc450    
     a year ago
    0

    Hi!

    I just discovered a weird bug when I use a coupon in a specific situation.

    The problem is that if I add a product and a coupon to my cart and then I login to an account, the product and the coupon are removed from the cart (witch is ok for me) but as soon as a I add a new product to the cart, I got a discount like the coupon was still there, but I don't see it. It's like the coupon is still calculated somewhere.

    So, in short :

    1. I add a product to the cart
    2. I add a coupon to the cart
    3. I login to any account (at this moment, the products and the coupons are removed from the cart, so the cart is totally empty)
    4. I add a product to the cart again
    5. The discount from the last coupon is automaticaly applied, but the coupon is not visible anywhere.

    Additionnal note : From there, if I try to add another coupon (no matter if it is the same or an other one), the last coupon become visible in the cart.

    So, what I want to do is only to remove the coupon entirely from the cart and calculation when I login to an account. Anyone could give me a hint on where do I need to check that?

    I am running virtuemart 2.6.6 and AwoCoupon 2.3.3.1
    Both have some custom works in it.

    Thanks in advance!

    P.S. Sorry if my English is bad. This is not my first language.
  • Your avatar
    seyi    
     a year ago
    0

    Hello,

    Not sure, I cannot produce the problem on vm 266. Have you tried disabling awocoupon and testing virtuemart coupons to see if it behaves the same way? Might be due to some customizations?
  • Default avatar
    luc450    
     a year ago
    0

    Hi,

    Thanks for your reply.
    I just tried with a vm coupon and everything works. This problem only happen with the coupons from AwoCoupons.

    Yes, this might be caused by some customization, but so far I can't see anything causing that.

    Do you have any hint of wich files I should check? Where does the coupon is suposed to be removed from the cart when I log a user? Maybe I can find the probem myself if I know where to search.

    Thanks! :)
  • Your avatar
    seyi    
     a year ago
    0

    Hello,

    In awocoupon pro, the coupon is removed from cart here:
    www/administrator/components/com_awocoupon/helpers/estore/virtuemart/couponhandler.php, function initialize_coupon