Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WC Marketplace › Commission settings not working correctly – please help!
Tagged: Commission
- This topic has 16 replies, 4 voices, and was last updated 5 years, 2 months ago by CommunityCorals.
- AuthorPosts
- June 6, 2019 at 9:07 pm #66294CraigParticipant
Hi there – I’m adding to a closed conversation as I have discovered that the solution provided did not work.
in this thread
https://wclovers.com/forums/topic/commission-settings-not-working-correctly-please-help/
you recommended code snipet but I need further assistance.My commission settings are intended to recover the paypal fees which in Canada are 2.9%+ $0.30 / transaction:
So I’m using the “Percent + Fixed” commission settingAnd with the code snippet you provided what appears to be happening is that the “fixed” portion is being doubled.
See the attached screenshots:
the transfer to the vendor should have been:
1.05 – .33 = .72
2.10 – .36 = 1.74
3.15 – .39 = 2.76
total = 5.22
minus .32
total transfer = 4.90 paid to recipient
not 3.99it looks like the formula is charging 2 x 0.30 in each transaction?
because the fees reflected were
.63 (should be .33)
.66 (should be .36)
.69 (should be .39)Attachments:
You must be logged in to view attached files. - June 9, 2019 at 2:51 am #66557CraigParticipant
I’m wondering instead of a code snipet if there can be an option where the commission setting can be applied on a
“per item” basis
or “per vendor total” basis - June 10, 2019 at 8:40 pm #66833WCFM ForumMember
HI,
Please add this line to your site for the purpose –
add_filter( 'wcfmmp_is_allow_commission_fixed_per_unit', '__return_false' );
Thank You
- June 18, 2019 at 3:32 am #68210CraigParticipant
Hi there,
This new code did not quite work. it is closer though. I hope you can please help with this.
It looks like the tax portion of the sale is being captured in the commission because the commission based on the formula and what is actually deducted differs exactly but the tax amount.
My commission settings are intended to recover the paypal fees which in Canada are 2.9%+ $0.30 / transaction (I have commission sets at 3% + 0.30 see screenshot)
AND set “tax goes to vendor” (see screenshot)$3.15 is 3.00+.15 tax commission should = .39 actually deducted = .54 diff .15 (same amount as tax?)
$2.10 is 2.10+.10 tax commission should = .36 actually deducted = .46 diff .10 (same amount as tax?)
$1.05 is 1.00+.05 tax commission should = .33 actually deducted = .38 diff .05 (same amount as tax?)Attachments:
You must be logged in to view attached files. - June 29, 2019 at 7:55 am #70189WCFM ForumMember
HI,
$3.15 is 3.00+.15 tax commission should = .39 actually deducted = .54 diff .15 (same amount as tax?)
$2.10 is 2.10+.10 tax commission should = .36 actually deducted = .46 diff .10 (same amount as tax?)
$1.05 is 1.00+.05 tax commission should = .33 actually deducted = .38 diff .05 (same amount as tax?)– This calculation is right, as “Tax Goes to vendor”, so it’s adding “Tax cost” with calculated commission.
Now, you may apply commission rule on “Tax Cost” as well by adding this line to your child theme’s functions.php –
add_filter( 'wcfmmp_is_allow_commission_on_tax', '__return_true' );
Thank You
- June 30, 2019 at 5:05 pm #70393CraigParticipant
Hi, thanks for providing your snippets but we have been trying to fix this for over 2 months. and i think the original post message has been lost.
All I want to do for commission on our site is recover the merchant services costs (we are using paypal)
PayPal charges 2.9%+0.30 on every transaction total (weather it has taxes, for shipping costs – paypal does not care. they just charge the transaction fee on the total).We also have settings that the tax and shipping all go to the vendor.
Basically our site revenue is membership fees only and to recover the costs of the merchant service fees for “shopping cart transactions” and “payout requests”.
I’m not confident the code you have provided me is correct. can you please confirm.
Thanks
- July 4, 2019 at 4:43 am #70918WCFM ForumMember
HI,
That code is right.
These two line required to apply commission rule on shipping and tax cost –
add_filter( 'wcfmmp_is_allow_commission_on_tax', '__return_true' ); add_filter( 'wcfmmp_is_allow_commission_on_shipping', '__return_true' );
But, still there will be an issue for commission amount – 2.9% + .3
Problem will come for “Fixed Part” of the commission rule.
Fixed part calculated for “per item” basis. So you will see Admin commission is generated 2.9% + .9 (if shipping and tax both are there), or 2.95 + .6 (if only tax or shipping is there)
Now, if you think tax and shipping will be there for all orders, then set commission rule – 2.9% + .1
Thank You
- September 13, 2019 at 4:18 am #81408MakersParticipant
I would personally welcome something like this as an added feature for commission settings.
add_filter( ‘wcfmmp_is_allow_commission_on_tax’, ‘__return_true’ );
add_filter( ‘wcfmmp_is_allow_commission_on_shipping’, ‘__return_true’ ); - September 13, 2019 at 5:20 am #81411MakersParticipant
What is the final code solution to this issue? I’ve read through this thread and Craig’s previous thread regarding this issue, but don’t really see a final code snippet solution…
I’d also like to charge the exact same commission structure that Craig has explained in his previous posts/threads.
With regards to the .30 fixed portion of the commission once per vendor per order so each vendor that has sold items in a specific order would only be charged once for the .30 fixed portion per order no matter how many items that vendor sold in that specific order. The thinking behind this is, because Stripe and Paypal both charge 2.9% plus .30 per transaction.
I pieced this code below together from the two threads regarding this issue I could find. Can you please paste a complete code that would accomplish what both Craig and I are explaining? Thank you!
https://wclovers.com/forums/topic/commission-settings-not-working-correctly-please-help/
https://wclovers.com/forums/topic/commission-settings-not-working-correctly-please-help-2/add_filter( ‘wcfmmp_is_allow_commission_on_tax’, ‘__return_true’ );
add_filter( ‘wcfmmp_is_allow_commission_on_shipping’, ‘__return_true’ );add_filter( ‘wcfmmp_order_item_quantity’, function( $quantity, $product_id, $variation_id, $item_price, $vendor_id, $order_id ) {
return 1;
}, 50, 6 ); - September 13, 2019 at 8:24 am #81419MakersParticipant
Some initial testing… With one vendor and one product for now… I ran several transaction tests. Commissions set to Percentage and fixed
When I added the code below to my functions.php file the percentage calculated correctly for everything, but the fixed rate of .30 tripled for some unknown reason.
add_filter( ‘wcfmmp_is_allow_commission_on_tax’, ‘__return_true’ );
add_filter( ‘wcfmmp_is_allow_commission_on_shipping’, ‘__return_true’ );adding this code below did nothing that I could tell.
add_filter( ‘wcfmmp_order_item_quantity’, function( $quantity, $product_id, $variation_id, $item_price, $vendor_id, $order_id ) {
return 1;
}, 50, 6 );This is actually a major issue because these little bits could add up to a whole lot of missing revenue and potentially angry vendors. I feel the community would benefit greatly if you guys were to come up with a comprehensive solution for this issue, because in a micro transaction situation the miscalculations add up very quickly.
Best Regards
- September 17, 2019 at 11:06 pm #82198WCFM ForumMember
Hi,
You require this code for the purpose-
function wcfmmp_commission_rule_fix( $commission_rule ) { if( isset( $commission_rule['fixed'] ) ) $commission_rule['fixed'] = 0; return $commission_rule; } add_filter('wcfmmmp_shipping_commission_rule', 'wcfmmp_commission_rule_fix'); add_filter('wcfmmmp_tax_commission_rule', 'wcfmmp_commission_rule_fix');
Thank You
- September 17, 2019 at 11:22 pm #82199MakersParticipant
Thank you for your response I appreciate this. @Craig might find this code helpful.
After testing regarding this we’re leaning towards using the commission structure in combination with the withdrawal methods already provided to us with WCFM. Still testing the best methods to be honest.
Thanks again!
- September 19, 2019 at 5:41 pm #82469WCFM ForumMember
You are welcome:)
Feel free to as me if you have any confusion or queries.
Thank you and have a great day 🙂
- October 9, 2019 at 6:13 pm #85835CommunityCoralsParticipant
Hello, there are so many code lines that I missed the correct one to solve the issue. I also would like to charge % + fixed to cover paypal fees. I charge my admin commission just on product not on shipping. No tax calculation.
So what I need: Calculation of fixed part of the commission once per vendor and order.
What would be the snippet for this please?
Thanks
Dominique - October 10, 2019 at 11:54 am #85967CommunityCoralsParticipant
I guess I also have to mention that shipping cost goes to admin. Maybe that´s the reason why the presented snippets don´t work for me?
- October 12, 2019 at 1:16 pm #86487WCFM ForumMember
HI,
So what I need: Calculation of fixed part of the commission once per vendor and order.
– You do not require that code for the purpose. Use this code snippet –
add_filter( 'wcfmmp_is_allow_commission_fixed_per_unit', '__return_false' );
Thank You
- October 20, 2019 at 12:43 pm #87790CommunityCoralsParticipant
Hello,
unfortunately this just doesn´t do the job. Please find attached screenshots. The fixed commission of 5 € is still applied on every line item of the order.
I really urgently need a solution to just apply it once per order and vendor.
Thanks
DominiqueAttachments:
You must be logged in to view attached files.
- AuthorPosts
- You must be logged in to reply to this topic.