- Posts: 306
- Thank you received: 42
Commission based on customer payment method
10 years 7 months ago - 10 years 7 months ago #230723
by trevsmiff
Commission based on customer payment method was created by trevsmiff
-- HikaShop version -- : 2.6.1
-- HikaMarket version -- : 1.6.7
-- Joomla version -- : 3.4.8
I have been asked to build a multi-vendor site with the following requirements:
To do this I guess would require a filter in the commission area that selects the commission rate based on the method of payment used.
Would this work?
Can it be done?
Thanks
Trevor
-- HikaMarket version -- : 1.6.7
-- Joomla version -- : 3.4.8
I have been asked to build a multi-vendor site with the following requirements:
- The customer can pay using any method set up ( PayPal, Stripe, Cheque, BACS etc)
- The main vendor receives the payment
- Main-vendor then pays sub-vendors after deducing commission and fees from payment provider (ie PayPal)
To do this I guess would require a filter in the commission area that selects the commission rate based on the method of payment used.
Would this work?
Can it be done?
Thanks
Trevor
Last edit: 10 years 7 months ago by trevsmiff.
Please Log in or Create an account to join the conversation.
10 years 7 months ago #230740
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Commission based on customer payment method
Hi,
There is no such built-in option in HikaMarket to do so, specially because commission rules can be set on products.
But it is possible to implement it using a small custom plugin.
With the two trigger "onBeforeMarketCalculateVendorPrice" "onAfterMarketCalculateVendorPrice", you can change dynamically the content or completely override how the commission is processed.
www.hikashop.com/support/documentation/1...CalculateVendorPrice
Depending your current commission rules ; you can simply use the "onAfterMarketCalculateVendorPrice" trigger and subtract the 3.5% payment charge of the $ret variable (which contains the final vendor price).
Regards,
There is no such built-in option in HikaMarket to do so, specially because commission rules can be set on products.
But it is possible to implement it using a small custom plugin.
With the two trigger "onBeforeMarketCalculateVendorPrice" "onAfterMarketCalculateVendorPrice", you can change dynamically the content or completely override how the commission is processed.
www.hikashop.com/support/documentation/1...CalculateVendorPrice
Depending your current commission rules ; you can simply use the "onAfterMarketCalculateVendorPrice" trigger and subtract the 3.5% payment charge of the $ret variable (which contains the final vendor price).
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
10 years 7 months ago #230758
by trevsmiff
Replied by trevsmiff on topic Commission based on customer payment method
Thanks Jerome, that looks promising.
As the commission adjustment will vary according to the method of payment that the customer used is there a way of retrieving the payment method within the trigger functions?
regards
Trevor
As the commission adjustment will vary according to the method of payment that the customer used is there a way of retrieving the payment method within the trigger functions?
regards
Trevor
Please Log in or Create an account to join the conversation.
10 years 7 months ago #230767
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Commission based on customer payment method
Hi,
In the trigger, you have access to the Vendor order object, which contains the order payment method (and order payment id).
Regards,
In the trigger, you have access to the Vendor order object, which contains the order payment method (and order payment id).
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: trevsmiff
Please Log in or Create an account to join the conversation.
10 years 7 months ago #230778
by trevsmiff
Replied by trevsmiff on topic Commission based on customer payment method
Thanks again Jerome.
Time to roll up my sleeves and get my hands dirty!
regards
Trevor
Time to roll up my sleeves and get my hands dirty!
regards
Trevor
Please Log in or Create an account to join the conversation.
10 years 7 months ago #231062
by trevsmiff
Replied by trevsmiff on topic Commission based on customer payment method
I managed to get it working and have attached a copy if anyone wants to use it.
regards
Trevor
This attachment is hidden for guests.
Please log in or register to see it.
Please log in or register to see it.
regards
Trevor
The following user(s) said Thank You: Jerome
Please Log in or Create an account to join the conversation.
Moderators: Obsidev
Time to create page: 0.192 seconds