[SOLVED] "Market Commissions mode" wrong calculations

  • Posts: 205
  • Thank you received: 12
4 years 6 months ago #318985

-- HikaShop version -- : 4.3.0
-- HikaMarket version -- : 3.0.3
-- Joomla version -- : 3.9.18
-- PHP version -- : 7.2.30

Here is our problem with "TAXES AND FEES OPTIONS"

Our settings...



If Global fee is unchecked, NO commissions are charged!

TEST 1 (Product price 300$) commission 5%


Our commission...


The commission here should be 15$




TEST 2 (Product price 600$) commission 2%


Our commission...


The commission here is correct




TEST 3 (Product price 30$) commission 10%


Our commission...


The commission here should be 3$




Please advise...

Thank you in advance!

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

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
4 years 6 months ago #319012

Hello,

Thank you for that detailed report.
Please download HikaMarket 3.1.0 to fix that issue.

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: 205
  • Thank you received: 12
4 years 6 months ago #319052

The commissions are now charged fine as long as the "Group" field is set to all

If we try to set a commissions that apply only to different user groups something goes wrong!

Example...

We have 2 user groups for vendors. One for vendors without subscription (Vendor) and one for vendors with subscription (Vendor+)

We need to charge "Vendors" for a 100$ sale with a 10% commission
and...
we want to charge the "Vendor+" for a 100$ sale with a 5% commission

Here things are confused

"Vendor" sells 100$ product and he is charged with 10$ commission. This is correct.
"Vendor+" sells 100$ product and he is charged with 10$ commission. This is not correct! He should be charged with a 5$ commission.

Please advise.

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

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
4 years 6 months ago #319053

Hello,

Would it be possible to have more details about your "Vendor+" test vendor ?
We need to understand what are the available groups for that vendor and reproduce your configuration in our end.

In the HIkaMarket fee class ; the function to load the fees for a vendor is using the groups stored in the "vendor access", so all fee rules which are for groups that the vendor do not have, would not be load in the list.

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: 205
  • Thank you received: 12
4 years 6 months ago #319077

Thank you for your reply...
Instead of reproducing the whole configuration at your end... may i send you the backend and frontend credentials to check?

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

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
4 years 6 months ago #319081

Hello,

I don't need the whole configuration, just your fees rules and the groups of your test vendor.
Our support forum is also interesting because other HikaMarket users with the same kind of problem will be able to find their answers.

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: 205
  • Thank you received: 12
4 years 6 months ago #319096

Fees settings...



VENDOR ACL...


VENDOR + ACL...


Vendors from both Groups ("Vendor" and "Vendor+") are charged with 10% fee when the make a sale, when "Vendor" should be charged with 10% and "Vendor+" should be charged with 5%.

Attachments:

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

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
4 years 6 months ago #319137

Hello,

The issue is related to the "Global fee" setting which was not handle in one place of the algorithm.
In the file "administrator/components/com_hikamarket/classes/fee.php" you need to replace

	$fee->fee_group = (int)$fee->fee_group;
	if($fee->fee_type != 'config')
By
	$fee->fee_group = (int)$fee->fee_group;
	if($fee->fee_type != 'config' && $fee->fee_type != 'config_global')
And the vendor group filtering will be enable for a fee rule using "Global fee".
I will add that fix in HikaMarket and include a new unit-test for that case.

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: 205
  • Thank you received: 12
4 years 6 months ago #319141

Thank you for your reply...

We replaced the code as suggested but... unfortunately the situation is the same. The same commission is charged to everyone.

Tested as "Vendor+" -> commission charged 5% (correct)
Tested as "Vendor" -> commission charged 5% (it should be 10%)

Please advise...
Thank you in advance

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

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
4 years 6 months ago #319168

Hello,

Since I can't reproduce your issue in my local website, I would require credentials to your website.
Because I would need to check the patch you applied, a FTP access will also be required for debugging.
Please use the "contact us" form to send us private information (with a link/URL of that forum thread so the support team will know what do to with the credentials)

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.
Last edit: 4 years 6 months ago by Jerome.

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

  • Posts: 205
  • Thank you received: 12
4 years 6 months ago #319173

Thank you for your reply.
Credentials have been sent to you by PM.
Thank you.

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

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
4 years 6 months ago #319185

Hello

Please use the "contact us" form to send us private information (with a link/URL of that forum thread so the support team will know what do to with the credentials)

I don't receive PM and they are all deleted automatically.

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: 205
  • Thank you received: 12
4 years 6 months ago #319192

Sent again through "contact us" form

The following user(s) said Thank You: Jerome

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

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
4 years 6 months ago #319204

Hello,

You do have the patch in your website but I can't understand your test.
For the last two orders, I check the vendor configuration and saw that your vendor do have the two groups in the same time :
pasteboard.co/J8xD96Y.png
By having the two groups, the "best" rate will be used by HikaMarket.

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: liaskas

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

  • Posts: 205
  • Thank you received: 12
4 years 6 months ago #319216

Yes you are right!

Issue is resolved.

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

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