Hi,
Paypal adaptive use the "paypal email" of the vendors to work correctly.
If the vendor does not have paypal, the main vendor (your account) will receive his part and the classical system will be use for the vendor.
So, if a vendor does not have paypal account, the main problem of the paypal fees will stay using paypal adaptive (because it will be the same than with paypal classic)
But for the other vendors, the fess will be paid by themself, so it will work fine.
The next HikaMarket build will be during December, after the HikaShop release.
The modification of the order class is really smal.
You have to edit the file "administrator/com_hikamarket/classes/order.php" and replace in the function "calculateVendorPrice":
$config = hikamarket::config();
if($vendor_id <= 1)
return 0.0;
foreach($products as $product) {
if($product->order_product_quantity == 0)
continue;
if($config->get('calculate_vendor_price_with_tax', false)) {
By:
$config = hikamarket::config();
if($vendor_id <= 1)
return 0.0;
$do = true;
JPluginHelper::importPlugin('hikamarket');
$dispatcher = JDispatcher::getInstance();
$dispatcher->trigger('onBeforeMarketCalculateVendorPrice', array($vendor_id, &$ret, &$products, &$fees, $coupon, $v_order, &$do));
if(!$do)
return $ret;
foreach($products as $product) {
if($product->order_product_quantity == 0)
continue;
if($config->get('calculate_vendor_price_with_tax', false)) {
And
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;
By:
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;
}
$dispatcher->trigger('onAfterMarketCalculateVendorPrice', array($vendor_id, &$ret, &$products, &$fees, $coupon, $v_order));
return $ret;
With this modification you will be able to have your own processing algorithm.
Using the "$v_order" object you can check the payment method used (so check if it is paypal) and with the array "$products" you can know the total net price of the vendor's products (like it is done in the function).
You custom plugin can modify the value of the variable "$ret" in order to change the vendor price, removing the 3.9% of the total net price.
Regards,