Commission Rate display

Hello,

I want to display the following:

When i set 10% commission to the user on vendors.
In the dashboard it says: revenue is for example: 20 euro

Balance is then 18 euro

Is there a way I can show the host that they pay 10%?
It’s a bit strange that I can’t display it to the user. And is t possible to change the name to whatever i want? Like service fee ?

Many thanks!

Please try this PHP snippet

add_filter(
	'hivepress/v1/templates/vendor_dashboard_page/blocks',
	function($blocks, $template){
		$vendor = $template->get_context('vendor');
		
		if(!$vendor){
			return $blocks;
		}
		
		$commission_rate = $vendor->get_commission_rate() ? $vendor->get_commission_rate() : get_option('hp_vendor_commission_rate');
		
		if(!$commission_rate){
			return $blocks;
		}
		
		return hivepress()->helper->merge_trees(
					[ 'blocks' => $blocks ],
					[
						'blocks' => [
							'page_content' => [
								'blocks' => [
									'vendor_commission_rate' => [
										'type'   => 'content',
										'content' => '<p><b>Commission rate: </b>'.$commission_rate.'%</p>',
										'_order' => 5,
									],
								],
							],
						],
				]
				)['blocks'];
	},
	1000,
	2
);

Exist the possibility of to debit the comission rate at the column revenue?

I’d like that the two information were the same.

Screenshot by Lightshot

It’s possible, but this would require further customizations - we plan to add all these details to the order totals and possibly the monthly chart. The balance may not be equal to profit because it may be paid out anytime, while the chart would show the profit for past 30 days (currently it shows the revenue only).

1 Like

Will these customizations be in the next update?

Yes, these changes are planned for the next Marketplace update (showing commission fees, profit etc. in the order details and possibly the monthly chart).

Perfect, ihor!

Thanks.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.