Buy X Get Y with discounted price only on Y


  • Default avatar
    philippe27    
     5 years ago  last edited 5 years ago
    0

    Hello, I want customers to have a discount on product B if they already have product A in the cart.
    The calculation on the discount must only be done on product B. Product A price and product A VAT amount must remain unchanged. Only product B price and product B VAT amount must change. How can I achieve that with AwoCoupon Pro Version: 3.5.6.8?
    I am using Hikashop 4.
  • Your avatar
    seyi    
     5 years ago
    0

    It depends, if the customer buys 1 of A and can get a discount an any quantity of B, then you cannot use a buy x get y, instead use a combination coupon:

    Coupon A: value: 0, product: product A, discount type: specific
    Coupon B: value: [the discount], product: product B, discount type: specific
    Coupon C: combination coupon where you add coupons A and B and set process type to only if ALL apply

    Then give out coupon C.
  • Default avatar
    philippe27    
     5 years ago
    0

    I understand both methods. AwoCoupon Configuration is set to "Calculate the discount before tax (Coupons)", which is the correct lawful setting in our case.
    However, trying both of these methods, the VAT calculation for the discount is still split among product A and B. Product A and product B have different VAT values, for example one is 5,5% and the other one 18%, which leads to have two VAT amounts listed on checkout. We need the VAT for product A to remain unchanged with or without coupon. If the discount is only applied on product B, then the VAT amount should only change for product B, which is not the case, it also changes VAT amount for product A.
    How do we fix that?
  • Your avatar
    seyi    
     5 years ago
    0

    Hello,

    Would have to see exactly how Hikashop is setup.  Is it possible to send a private message with temp admin access to have a look?

  • Default avatar
    philippe27    
     5 years ago
    0

    I sent you a private message with admin access.
    On our side, we tried to debug and found the cause in AwoCoupon:

    1) the coupon is indeed calculated on the correct product (product B). This is correct.

    2) but the coupon is then applied globally for the tax calculation when it should only be calculated on product B.
    See administrator\components\com_awocoupon\helper\estore\hikashop\class-awocoupon-helper-estore-hikashop-discount.php on line 375

    Please advise.
  • Your avatar
    seyi    
     5 years ago
    0

    Hello,

    Sending you an updated tile.