Issue with items with multiple tax amounts


  • Default avatar
    dave14    
     6 years ago
    0

    Hi, I am having an issue when I have got the discount applied, it applies automatically and works correctly so I am not sure if this is actually a Hikashop issue.

    When the basket has got 2 items one with a tax amount of 20% and the second item with 0% and the value of the basket is over the value of the discount trigger point everything appears to work correctly.

    However, when there are 3 or more items in the basket and 2 or more of the items are taxed at 20% the tax isn't correctly calculated.

    I can't work out where the error can be generated, if it's caused by Hikashop or AwoCoupon, I am just aware that Hikashop coupons can't handle multiple tax rates :(

    I hope you can assist me

    Regards,

    Dave

  • Your avatar
    seyi    
     6 years ago
    0

    Happy to look into this.

    Can you provide more detail on the shopping cart with incorrect totals?  Maybe images or a private message with instructions on how to duplicate it?
  • Default avatar
    dave14    
     6 years ago
    0

    I have just sent an email which includes images of the issue.

    Regards,

    Dave

  • Your avatar
    seyi    
     6 years ago
    0

    Thanks for the information.  Sent you a reply, basically could not reproduce.  I would need more information or access to try to figure out what is going on.
  • Default avatar
    dave14    
     6 years ago
    0

    Hi Seyi, I am happy to send you log-in details as it would be easier for you to see the overides that are in place. I will PM you details.

    Regards,

    Dave

  • Your avatar
    seyi    
     6 years ago
    0

    Ok, thanks for the access.  I was able to reproduce the error after playing around with some settings.  It had nothing to do with the overrides.  Here is the fix:

    in the file www/administrator/components/com_awocoupon/helpers/estore/hikashop/couponhandlercart.php, around line 394 is this:
    <?php
            
    foreach($cart->products as &$product) {
                $cart_products[] =& $product;
                if(isset($product->parent_product))
                    $cart_products[] =& $product->parent_product;
            }
    ?>


    Change it to this:
    <?php
            
    foreach($cart->products as &$product) {
                if(!isset($product->parent_product))
                    $cart_products[] =& $product;
            }
    ?>


    That should fix it.
  • Default avatar
    dave14    
     6 years ago
    0

    Many thanks for the fix, I can confirm that it works as expected now :)

    Regards,

    Dave