Awo Coupon and Hikamarket


  • Default avatar
    rene54    
     10 years ago
    0

    Hi seyi,

    I upgraded all awodev components to latest version as well as hikashop and hikamarket to the latest versions.

    I I use AwoCoupon Pro, it creates the order in hikashop correclty with the specified coupon discount.

    Hikashop also creates the subsale in hikamarket with the correct awocoupon code, but the discount is not applied in the hikamarket order (subsale).
    Therefore, all prices are wrong in the hikamarket order.

    I guess hikamarket (hikashop) did maybe some modifications, so that the awocoupon discount is not added correctly.

    Can you please fix this issue, so that the hikamarket subsale order is correctly.

    Thanks and br
  • Your avatar
    seyi    
     10 years ago
    0

    Hello,

    I was able to produce the smae problem with Hikashop coupons. So I contacted them, and there is a problem, here is the solution the proposed:

    in www/administrator/components/com_hikamarket/classes/order.php, around line 959 is this
    <?php
                        
    if(isset($products[$product->product_id])) {
                            
    $vendor_coupon_total += (int)$product->cart_product_quantity * (float)$product->prices[0]->price_value;
                        }
    ?>


    Change it to this
    <?php
                        
    foreach($products as $p) {
                            if(
    $p['id'] != (int)$product->product_id)
                                continue;
                            
    $vendor_coupon_total += (int)$product->cart_product_quantity * (float)$product->prices[0]->price_value;
                        }
    ?>


    I assume this will also be in the next update of Hikamarket.