Hi,
I wrote some modification but before releasing it, I want to be sure that it will not have side effects.
You can apply this patch manually by modifying the file "administrator/components/com_hikamarket/classes/order.php" and replace:
public function calculateVendorPrice($vendor_id, &$products, &$fees, $coupon = null) {
By:
public function calculateVendorPrice($vendor_id, &$products, &$fees, $coupon = null, $v_order = null) {
Then:
} elseif(bccomp($coupon->discount_percent_amount, 0, 5) !== 0) {
$ret *= floatval((100 - floatval($coupon->discount_percent_amount)) / 100);
}
}
return $ret;
}
By
} elseif(bccomp($coupon->discount_percent_amount, 0, 5) !== 0) {
$ret *= floatval((100 - floatval($coupon->discount_percent_amount)) / 100);
}
}
if(!empty($v_order)) {
if(!empty($v_order->order_payment_price))
$ret += $v_order->order_payment_price;
if(!empty($v_order->order_shipping_price))
$ret += $v_order->order_shipping_price;
}
return $ret;
}
And the last one:
if(empty($order->cart->coupon))
$order->cart->coupon = null;
$shopOrderClass->recalculateFullPrice($v_order, $v_order->cart->products);
$v_order->order_vendor_price = $this->calculateVendorPrice($vendor_id, $v_order->cart->products, $fees, $order->cart->coupon);
By
if(empty($order->cart->coupon))
$order->cart->coupon = null;
$shopOrderClass->recalculateFullPrice($v_order, $v_order->cart->products);
$v_order->order_vendor_price = $this->calculateVendorPrice($vendor_id, $v_order->cart->products, $fees, $order->cart->coupon, $v_order);
These modification will "push" the shipping and payment fees into the vendor total price.
At this moment, the sub-order will have nicer data.
Regards,