Display price extras by default

Hello!!
Is it possible for woocommerce extras to appear by default automatically when attributes are selected?
In this way we save time for the user, it is annoying to have to write them one by one, it is much more practical and improves the user experience if you only have to click

Gracias!!!

Please send more details about this issue, do you mean pre-filling some default extras for every added listing? Should these extras be editable or they are the same for all listings?

1 Like

pre-filling some default extras for every added listing?
Yes, please

hould these extras be editable or they are the same for all listings?
Yes, please

They will be some predetermined extras based on the attributes
In this way the Vendor only has to adjust the price of the extras once they have selected the attributes
It is a way to make an ad faster and improve the user experience using only “click” instead of writing one by one the attributes related to the extras.

Unfortunately, there’s no easy way to prevent editing extras, this would require a few snippets (e.g. for hiding the “x” for removing extras), but you can set default extras for newly created listings using this snippet:

add_action(
	'hivepress/v1/models/listing/create', 
	function($listing_id, $listing) {
		$listing->set_price_extras([['name' => 'Test', 'price' => 100]])->save_price_extras();
	},
	1000,
	2
);

I don’t know if I explained myself well, sorry…
I would like to use the same default attributes for all the ads and that the seller only has to put a price to each attribute by default.
That they can adjust a price to each independent attribute

Sorry, there’s no simple code snippet for this, it would require a custom implementation. If customizations beyond the available features are required for your site, please consider hiring someone for custom work https://fvrr.co/32e7LvY

I’ve tried to search for professionals on Fiverr, but they all say no…
I feel sad that the site is almost there, but I am missing certain settings that I am not able to solve by myself and I feel frustrated.
Please, would you be so kind as to recommend a professional?
I would appreciate it very much

1 Like

Sorry, there are a few urgent updates and we temporarily don’t offer customization services. If you find a developer familiar with WordPress in general, we can provide some guidance on implementation, HivePress framework is pretty easy to customize.

I can’t find… I’m thinking of refunding the total amount of the set of plugins that I paid for.
You must know someone who wants to work, please!
It doesn’t have to be from your team, a friend, colleague…

I’m sorry for the inconvenience, but we don’t advertise in-house customization services anywhere, we sell themes & extensions with a specific set of features (advertised on the demo site and theme page) and we guarantee these features (by fixing bugs and providing guidance about the features). We hope to start offering customization services soon, but at the moment this is not something that we can offer with the theme license. We also plan to launch the HivePress Experts program to recommend developers fully familiar with HivePress.

If there are only a few specific changes required you can also submit the requirements here https://forms.gle/XHCtFKMMc1g1xUp67 and we’ll check if we can implement these, postponing some of the HivePress updates.

Ok thanks!

1 Like

Hey yevhen, how can i set the extra price per booking?

It’s possible if you enable extras in HivePress/Settings/Listings/Selling, then hosts can define extras for their listings in the listing edit form. If you mean a common fee for all the bookings, you can try adding it as a custom tax in WooCommerce.

Oh sorry! I meant using code snippet. How could I set this?

Please try using the code snippet suggested by @yevhen above, it pre-defines price extras for a newly created listing. You can add this snippet via the Code Snippets plugin.

I’ve used code snippet suggested by @yevhen above, but I need to know how do I set that as a per booking price instead of per day as default.

Unfortunately there’s no such option yet, if you use day-based bookings, then the price will be multiplied by the number of days (or nights if there are nightly bookings), for time slot bookings the price is multiplied by the number of slots (if you allow booking more than 1 slot at once).

ihor,
I don’t know if I was able to be clear enough, but I have the code snippet below (with name and price), right? So, i need to add “per reservation” or “per guest per day” option on this. Isn’t it possible?

add_action(
	'hivepress/v1/models/listing/create', 
	function($listing_id, $listing) {
		$listing->set_price_extras([['name' => 'Test', 'price' => 100]])->save_price_extras();
	},
	1000,
	2
);

Please try this PHP snippet to set per booking as price extra type by default

add_action(
	'hivepress/v1/models/listing/create', 
	function($listing_id, $listing) {
		$listing->set_price_extras([['name' => 'Test', 'price' => 100, 'type' => 'per_order']])->save_price_extras();
	},
	1000,
	2
);
1 Like

It worked fine! Thanks