Enable Store Coupons is not working


  • Default avatar
    barbara4    
     5 years ago
    0

    After upgrading AwoCoupon to the latest version, I have found that the Enable Store Coupons feature is not working as it should.

    If I enter a coupon code that exists in AwoCoupon, everything works.

    If I enter a coupon code that does not exist in AwoCoupon, but exists in HikaShop and is disabled, everything works and it says the coupon is invalid.

    If I enter a coupon code that does not exist in AwoCoupon, and doesn't exist in HikaShop, everything works and it says the coupon is invalid.

    If I enter a coupon code that does not exist in AwoCoupon, and exists in HikaShop and is enabled, the checkout screen processes like it will apply the coupon but doesn't.

    So at the moment the only coupons that actually function as they should are ones in AwoCoupon.

    Anyone else have this issue or know how to fix it?

    Joomla 3.8.11
    HikaShop 3.5.1
    AwoCoupon 3.5.6.3
    PHP 7.1.21

  • Your avatar
    seyi    
     5 years ago
    0

    Hi, I have tested these versions and this scenario and not getting the error you are receiving.  Possible to test it directly?  You can send me admin access via private message.
  • Default avatar
    barbara4    
     5 years ago
    0

    I sent you a private message with the information you need.
  • Your avatar
    seyi    
     5 years ago
    0

    Thanks for the access.  I find the issue has to do with incorrect casting of a variable, which does not affect most servers.  Must be a setting in your php.  So to fix, I updated the file
    www/administrator/components/com_awocoupon/helper/estore/hikashop/class-awocoupon-helper-estore-hikashop-discount.php
    around line 160, changed

    <?php
            $hikashop_coupons 
    $this->session_get'hikashop_coupons''' );
    ?>

    to
    <?php
            $hikashop_coupons 
    $this->session_get'hikashop_coupons', array() );
    ?>

    That seeks to have fixed the issue.
  • Default avatar
    barbara4    
     5 years ago
    0

    I have verified that the problem is now fixed.  Thank you!