Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combined Commission Issue #687

Closed
imMrRAW opened this issue Nov 3, 2019 · 4 comments
Closed

Combined Commission Issue #687

imMrRAW opened this issue Nov 3, 2019 · 4 comments

Comments

@imMrRAW
Copy link

imMrRAW commented Nov 3, 2019

If i select FLAT commission and set it to 10SEK, and then go to Edit Product and set the price to 10 it says "You Earn: 0kr".

If i select PERCENTAGE and set it to 10%, and review the price calculation again it says "You Earn: 9kr" - all fine the also.

If i set COMBINED commission where the percentage is 0% and FLAT is 10kr" it says "You Earn: 0kr".

HOWEVER - if i change the percentage to 10% and leave FLAT at 10kr it says "You Earn 10kr".

So, by using combined with a value that goes beneath 0.0kr will cause the calculation to be wrong.
But the issue doesn't really stop there - the commission will be wrong in the system as well.

It will give the Vendor 10SEK and the Owner of the site 0SEK.

This is a BIG issue!

@saimonh3
Copy link
Contributor

saimonh3 commented Nov 3, 2019

@imMrRAW Thanks, the point you raised is valid and we'll definitely work on it. But my only question is, what's the point of using combined commission while you're not honoring both of the fields?

@imMrRAW
Copy link
Author

imMrRAW commented Nov 3, 2019

@imMrRAW Thanks, the point you raised is valid and we'll definitely work on it. But my only question is, what's the point of using combined commission while you're not honoring both of the fields?

The only reason here was to show the bahaviour - in a real world - you would, as you say - use both fields.
If not, then it's pointless to use combined.
However, if you use the "Combined" and only specify one field, it will work.
It's the two fields in combination that enables the bug.

saimonh3 added a commit to saimonh3/dokan that referenced this issue Nov 5, 2019
@imMrRAW
Copy link
Author

imMrRAW commented Nov 9, 2019

This hasn't been resolved yet.

I did the changes, but the calculation-issue is still in the "Edit Product"-view.
I set combined commission to 10% + 10SEK
In Edit Product, if you set to 1SEK, or up to 11SEK it says vendor will get all.

It should prevent the vendor to send a product that wont give the store owner it's commission.

earning

@saimonh3
Copy link
Contributor

saimonh3 commented Nov 9, 2019

@imMrRAW It will be fixed once Dokan Pro is released. Meanwhile make the changes in dokan-pro/includes/functions.php line no: 662 and make it something like this. Thanks.

$earning  = (float) $product_price - $total_earning;

carbon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants