Make Price optional and change its position

Hi to everyone,

I searched before asking and I found nothing replying to my question.

Is there a possibility to vendors to list a free thing ?

There is a default “Price” attribute on the listing creation page, and even if we chose “0”, there is still the “Buy Now” Button.

Another liked thing, Is it possible to move up or down the Price attribute too ? Or where I can find the code to edit for that ?

Thank you !
Julien

  1. Please try this PHP snippet Make the price field optional for marketplace listings #hivepress #marketplace · GitHub

  2. Please try this PHP snippet but please note that it can require further customization

add_filter(
	'hivepress/v1/templates/listing_view_page',
	function( $template ) {
		return hivepress()->helper->merge_trees(
			$template,
			[
				'blocks' => [
					'listing_attributes_primary' => [
						'_order' => '30',
					],
				],
			]
		);
	},
	1000
);
1 Like

Hi Yevhen,

It works perfectly thank you :slight_smile:

1 Like

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