How to calculate commision on net value ?

  • Posts: 77
  • Thank you received: 4
  • Hikashop Business
10 years 4 months ago #134675

Hi,
We have vendors with a specific commission per product.

How can I configure, that the amount for calculation of the vendor commission is calculated on the net value, e.g. by subtracting Paypal charges ?

Example:
Prodcuct price: 100 Euro
Vendor commission 20%

If the customers buy with invoice, the vendor should get 80 Euro
If the customers pays with paypal, the price for the vendor should be calculated : 100 Euro - 3.9% (Paypal) = 96.1 and therefore the vendor should get 80% of the net value of 96.1 = 76.88

I cant figure this out, where I can condfigure this.

Many thanks and br

Please Log in or Create an account to join the conversation.

  • Posts: 26007
  • Thank you received: 4004
  • MODERATOR
10 years 4 months ago #134741

Hi,

There is an option "vendor price with tax" in order to base the vendor price on the net value.
But I am not sure that it is what you really want to have.

You want to remove the paypal fees without using payment fees. There is no option for that... But in the next HikaMarket release it will be possible thanks to an HikaMarket plugin, to override the way that the vendor price is processed.
So you will be able to modify dynamically the vendor price during is processing, reading some information of the order to add/remove fees depending on your own algorithms.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 77
  • Thank you received: 4
  • Hikashop Business
10 years 4 months ago #134770

Hi Jerome,

Thanks for the quick answer.
It does not really help me.

I just want to subtract the paypal fees from the product_price. The vendor_net value should be the product_price minus the paypal fees I have to pay.
Or said in another way. I do not want to add paypal fees to the end customer, but to the vendor. The vendor shall pay the paypal fees.

Sometimes, order are paid by invoice and then, the vendor_price ist also the vendor_net value.

Is this already now somehow possible ?

What is the split fees option ?
It does not have an impact. Is this only used if I specify a paypal fee ?

Please Log in or Create an account to join the conversation.

  • Posts: 26007
  • Thank you received: 4004
  • MODERATOR
10 years 4 months ago #134777

Hi,

You can't remove something if you don't even know his value.
It is not possible to remove the paypal fee if you don't know it and HikaShop does not know what is the fee of paypal, you can't see it anywhere in HikaShop. For HikaMarket, it's the same thing.

But if you configure some payment fees in the payment methods, you can add a fee depending the payment method.
At this moment HikaShop and HikaMarket will have a value to work with.
The payment fees are added in the order like the shipping fees (also called "payment price" and "shipping price").
After that, you can use the option in HikaMarket in order to split the fees (payment or shipping) and HikaMarket will charge the different vendors depending their percentage in the order.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 77
  • Thank you received: 4
  • Hikashop Business
10 years 4 months ago #134785

Hi Jerome,

Maybe, there is a misunderstanding.

I know the fees. It is 3.9% of the product price.
But if I add this to the paypal plugin as a fee, it is also added to the order and the customer has to pay it.

I only want the hika market vendor to pay this fee and not the end customer who is buying the product..

Regards

Please Log in or Create an account to join the conversation.

  • Posts: 26007
  • Thank you received: 4004
  • MODERATOR
10 years 4 months ago #134811

Hi,

Yes, there is a misunderstanding.

Even if you know your paypal fee, like I said, HikaShop and HikaMarket doesn't.
You can't find this information in HikaShop or HikaMarket, it is something between you and paypal, it is something which is not visible or stored anywhere in HikaShop orders.
And more than that, the paypal fees are not just a percentage fee, there is also a flat fee for each orders.
The percentage fee can evolve with time, depending on the number of orders you made, you can renegotiate it with paypal.

That why I was telling you in my first post that you have to use a custom plugin for a custom vendor price processing.
I can give you the little modification to do in order to activate the triggers in the HikaMarket order class ; using a custom plugin will be the faster and easier way to implement it.

More than paypal, there is also the plugin "paypal adaptive" which allow you to pay several users in the same time (so you and your vendors). With "paypal adaptive" you can say who will pay the paypal fees.
So you can configure your paypal adaptive account to let the fees for the vendors. The customer will still pay the final price but you won't take the paypal fees for yourself.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 77
  • Thank you received: 4
  • Hikashop Business
10 years 4 months ago #134822

Paypal adaptive sounds very good But this would require that all vendors have paypal, right ?
I have a couple of vendors who do not have paypal.
Is this still possible then ?

If not, please send me the modification...
Or when will be the new hikamarket release that will implemetnt the triggers ?

Thank you !
Regards

Please Log in or Create an account to join the conversation.

  • Posts: 26007
  • Thank you received: 4004
  • MODERATOR
10 years 4 months ago #134836

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,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Moderators: Obsidev
Time to create page: 0.067 seconds
Powered by Kunena Forum