Enable Multiple Coupons settings?

  • Default avatar
     5 years ago

    Hi, what are the correct settings for Enable Multiple Coupons if I want to allow just 1 coupon but 2 gift certificates?

    I have:
    Enable Multiple Coupons [Yes]

    All [empty]
    Gift certificates [2]
    Coupons [1]

    Unfortunately, this does not do what I want, multiple coupons are still allowed.
    If I change 'Enable Multiple Coupons' to [No], only 1 gift certificate is allowed.

    Thanks for helping out, Peter
  • Your avatar
     5 years ago

    Hi Peter,

    Thanks, the logic is not catching the 1 case properly, here is a fix:
    in www/administrator/components/com_awocoupon/helpers/estorecouponhandler.php, around line 232 is this

    if(($multiple_coupon_max_coupon>&& count($multiple_coupons['coupon'])>1) || $multiple_coupon_max_giftcert>&& count($multiple_coupons['giftcert'])>) {

    Now change it to this:
    //if(($multiple_coupon_max_coupon>0 && count($multiple_coupons['coupon'])>1) || $multiple_coupon_max_giftcert>0 && count($multiple_coupons['giftcert'])>1 ) {
    if(1==1) {

    And it should work properly now