Vendor fees calculation

  • Posts: 43
  • Thank you received: 0
6 years 11 months ago #207574

-- HikaShop version -- : 2.5.0
-- HikaMarket version -- : 1.6.4

Hi,

I'm having some struggles with the fee calculations and vendor invoice generation in HikaMarket. The setup is such that only one vendor is allowed in cart, vendor receives all shipping and payment fees, and we get 5% of the order (products only).

When a 'test buyer' makes a 300 EUR order (300 products + 13,99 shipping + 78,50 taxes = 392,49), correct e-mail confirmations are sent to all parties (administrator, vendor, and buyer). The back- and front-end order summaries show, however a 'vendor total' value equivalent to 20% (78,50 EUR) of the total order. Am I correct in assuming that this is actually 'vendor total tax' value? Or is this the 'vendor fee', but incorrectly calculated? The other thing is that when looking at order summaries or vendor listing, the total value of the order doesn't add up - it seems to add the 'vendor total' value of 78,50 to the total order value of 392,49 = 470,99.

Once the vendor has confirmed (or paid and shipped) the order in the front-end, I tried to generate an invoice for the 5% fee that the vendor is supposed to pay. I got an error message saying 'invalid token'. Any idea why this is?

Thanks,
David

Attachments:
Last edit: 6 years 11 months ago by DavidThor.

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

  • Posts: 25343
  • Thank you received: 3922
  • MODERATOR
6 years 11 months ago #207594

Hi,

Because you have the button "generate invoice", it means that you are in market mode "vendor paid directly".
The value display by HikaMarket in that mode is the total that the vendor earn you, the money he have to pay you back for the order is has been paid (directly).

You have 20% for your vendor and your taxes are 20%. So that's logical that it is the same value.
But the taxes are added to the order while the fee is just a part of the order.

So about your calculation issue ; for what I see there is no issue.
But there is an issue with the button "generate invoice" which ask for a token and it looks like the token is not sent properly by the button.
I just open a ticket for that bug ; I'll update this thread as soon as possible with a fix.

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: 43
  • Thank you received: 0
6 years 11 months ago #207597

Hi,

But that is not correct. The value I have set up in HikaMarket configuration > Your vendor is a 5% fee, not 20%. I've tested changing the fee percentage to 0% and to 50% - but it still displays the same 'vendor total' amount. So, what am I missing?

Thanks,
David

Last edit: 6 years 11 months ago by DavidThor.

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

  • Posts: 25343
  • Thank you received: 3922
  • MODERATOR
6 years 11 months ago #207605

Hi,

If you change the configuration after the creation of the order ; the fees won't be modify.
The processing is made when the order is created, with the current configuration.
At that fee configuration is read from the product, from the vendor and from the global configuration.
www.hikashop.com/support/documentation/259-hikamarket-fees.html

Without more details about your entire configuration and about the order ; it will be difficult to give you a more precise answer.

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: 25343
  • Thank you received: 3922
  • MODERATOR
6 years 11 months ago #207645

Hi,

So, your configuration :
- Vendor paid directly
- Vendor price with tax : NO
- Apply fees on shipping : NO
- Shipping per vendor : YES
- Fee : 5%

One sample order :
* 1 product - 40€ + 10€ of tax
* shipping - 17.49€ (inc 3.49 of tax)
* total 67.49 (40+10+17.49)

You can see in the HikaMarket order that the vendor price for the product is 38€
It is the product price without tax minus the 5% fees (40€ * 0.05 = 2€)

So the vendor should give you that 2€ ; which are your fess for the transaction.
Now the returned price is currently the "shipping price minus the fees" (17.49€ - 2€ = 15.49€).
The "vendor paid directly" mode does not check the setting "shipping per vendor" ; it is something I will fix.
I need to perform further test but for the moment you should replace the two references :

	if(!$feeMode)
		$v_order->order_vendor_price = $v_order->order_vendor_price - $order->order_full_price;
By
	if(!$feeMode) {
		if($config->get('shipping_per_vendor', 1))
			$v_order->order_vendor_price = $v_order->order_vendor_price - $order->order_full_price - (float)$v_order->order_shipping_price;
		else
			$v_order->order_vendor_price = $v_order->order_vendor_price - $order->order_full_price;
	}
in the file "administrator/components/com_hikamarket/classes/order.php".
There is two or three other modifications for the other way than the vendor price is recalculate.

Now regarding your first message where I can't understand your number ; the best is to explain what you want so I could tell you what you have to configure.

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: 43
  • Thank you received: 0
6 years 11 months ago #207707

HI,

Yes, with the configuration the vendor should 'owe' us 2 EUR on the 40 EUR product sale (plus taxes if applicable - depends on the vendors location and VAT number and has nothing to do with whether or not the original market - buyer transaction had tax as this relates to the buyers location and VAT number). We're not applying the percentage on shipping or payment charges.

Jerome wrote: You can see in the HikaMarket order that the vendor price for the product is 38€
It is the product price without tax minus the 5% fees (40€ * 0.05 = 2€)

No, I cannot see this number anywhere.

Without the modification above, I got a 'vendor total' value of 15,50 EUR (Order: 1483C4B7).
With the modification (both instances), I got a 'vendor total' value of 32,99 EUR (Order: 1483C4D9)

Setting 'vendor price with tax' to YES, I get the following:

Without the modification above, I got a 'vendor total' value of 2,50 EUR (Order: 1483C5H3) - which seems right if tax is included.
With the modification (both instance), I got a 'vendor total' value of 19,99 EUR (Order: 1483C5F1)

I'm not sure if these values include tax or not as I'm getting the 'invalid token' error message in creating vendor invoices.

Last edit: 6 years 11 months ago by DavidThor.

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

  • Posts: 25343
  • Thank you received: 3922
  • MODERATOR
6 years 11 months ago #207733

Hi,

In the HikaShop backend, click on the order in order to see his details.
You will see the list of products in that order and you will see a special column named "vendor".
That column display the vendor name and the vendor price (if you're looking at the "sub sale", just the vendor price is displayed).

Can you please tell me what you want the result be ?
Because having various final prices that you can have does not help me much to understand what you want at last.

I'm getting the 'invalid token' error message in creating vendor invoices.

Yes, like I told you in my very first answer, I'm working on it and that's another issue...

But there is an issue with the button "generate invoice" which ask for a token and it looks like the token is not sent properly by the button.
I just open a ticket for that bug ; I'll update this thread as soon as possible with a fix.


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: 25343
  • Thank you received: 3922
  • MODERATOR
6 years 11 months ago #207740

Hi,

So, in the file "administrator/components/com_hikamarket/controllers/vendor.php", you have to replace

'display' => array('display', 'show', 'cancel', 'listing', 'admin', 'products', 'invoices', 'pay', 'paymanual', 'geninvoice', 'selection', 'useselection', 'getprice', 'searchfields', 'getvalues'),
By
'display' => array('display', 'show', 'cancel', 'listing', 'admin', 'products', 'invoices', 'pay', 'paymanual', 'geninvoice', 'dogeninvoice', 'selection', 'useselection', 'getprice', 'searchfields', 'getvalues'),

And also
	public function geninvoice() {
		return self::dopay();
	}
By
	public function geninvoice() {
		return self::pay();
	}

	public function dogeninvoice() {
		return self::dopay();
	}

Then in the file "administrator/components/com_hikamarket/views/vendormarket/view.html.php" you have to replace
'task' => 'geninvoice'
By
'task' => 'dogeninvoice'

And it would fix the issue with the invalid token.

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.
The following user(s) said Thank You: DavidThor

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

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