100% AWOCoupon with taxcloud behavior change after upgrade to Hikashop 3.0.1


  • Default avatar
    dustin_j    
     7 years ago  last edited 7 years ago
    0

    We are using Hikashop with AWOCoupon and the Hikashop TaxCloud plugin to calculate tax. We have several 100% off coupons that are used by our admins to place orders. Before updating to Hikashop 3.0.1 the orders placed with these coupons would result in a zeroed out total. After updating to 3.0.1 tax is no longer zeroed out and the orders alway have a balance.


    Example (before update):

    Subtotal: $8.10

    Tax (5.5%): $0.45

    Coupon: $-8.55

    Total: $0.00


    Example (after update):

    Subtotal: $8.10

    Tax (5.5%): $0.45

    Coupon: $-8.10

    Total: $0.45


    We originally posted this question to Hikashop (Found here: https://www.hikashop.com/support/forum/taxes/890365-100-coupon-with-taxcloud-behavior-change-after-upgrade-to-3-0-1.html#270282).


    With Nicolas' help, we determined that the native coupons in Hikashop are correctly discounting the full total and that this issue is only occurring with AWOCoupon.


    How can we fix it so our 100% off coupons zero out the orders again?


    Using:

    Joomla 3.7.1

    Hikashop 3.0.1

    AWOCoupon 2.5.7


    Thank you,

    Dustin


    Any ideas? We receive many orders per day and this is causing some problems. Your guidance is greatly appreciated.
  • Your avatar
    seyi    
     7 years ago
    0

    Hello,

    The reason the tax is not taken into account is because the plugin for taxcloud is never triggered.  This trigger was taken out due to an infinite loop problem.  But I am not sure this is still a valid concern as the code has been improved since then.  So try this:

    in the file www/administrator/components/com_awocoupon/helpers/estore/hikashop/couponhandlercart.php, around line 450 is this:
    <?php
            
    //$dispatcher->trigger('onAfterCartProductsLoad', array( &$cart ) ); # comment out or infinite loop
    ?>


    Uncomment the line like this
    <?php
            $dispatcher
    ->trigger('onAfterCartProductsLoad', array( &$cart ) ); # comment out or infinite loop
    ?>


    This should fix the issue.
  • Default avatar
    dustin_j    
     7 years ago  last edited 7 years ago
    0

    Excellent. Thank you. That appears to have fixed the issue. The 100% off coupon I just tested after uncommenting zeroed out the total as expected.
    One additional question: Will this change be included in the next update for AWOCoupon or will I have to re-apply this fix after the next update?


    Thanks again.


  • Your avatar
    seyi    
     7 years ago
    0

    Hello,

    Yes, will be tested and added as long as there is no problems.