Discount depending on the number of days

Is it possible to set prices based on date range like in Airbnb? for example, the host set a 10% discount for a week duration booking or a 30% discount for a 1-month booking. and when the user selects on the calendar a range of 7 days or 30 days it will automatically show the price with the right discount.

Yes, if you also use Marketplace, please enable discounts in HivePress/Settings/Listings/Selling. This adds the ability to set discounts depending on the number of days in the listing form.

Thank you, I see now on the same page the option “Allow sellers to set pricing tiers”, can you explain more please about more about this feature and what is it doing and when should I use it?

Pricing tiers allow sellers to set different base prices for the same listing; these are displayed as Radio Buttons (e.g., Basic, Standard, Premium). Pricing extras allow sellers to define some extras for the base price; these are displayed as checkboxes so multiple extras can be selected (and only one tier).

Thank you for very clearly explaining. I also need to know what is “BOOKING OFFSET” and “BOOKING WINDOWS”.

Thank you.

And please I have another question and want to avoid opening a new post.

I want to change the text in the placeholder, and add a description in the extras area on the listing submit page.

I try this code but nothing happened.

add_filter(
	'hivepress/v1/forms/listing_submit',
	function( $form ) {
	
		if(isset($form['fields']['price_extras[name]'])){
			$form['fields']['price_extras[name]']['placeholder'] = 'Title (example:Breakfast)';
			$form['fields']['price_extras']['description'] = 'please choose if you provide any extra service';
		}
		
		return $form;
	},
	1000
	);
  1. Booking offset is the advance notice you need before the booking (in days), for example, if you set it to 1 then bookings will be made at least 1 day in advance before the check-in date (e.g. if you need 1 day to prepare for the booking). The booking window is the max number of days a booking can be made in advance, for example, if you set it to 180 then bookings can be made only 6 months in advance (so it is not possible to book something 10 years from now).

  2. Please try this PHP snippet

add_filter(
	'hivepress/v1/forms/listing_submit',
	function( $form ) {
		if(isset($form['fields']['price_extras'])){
			$form['fields']['price_extras']['fields']['name']['placeholder'] = 'Title (example:Breakfast)';
			$form['fields']['price_extras']['description'] = 'please choose if you provide any extra service';
		}
		
		return $form;
	},
	1000
);

Hello Yevhen, the code snippet doesn’t do anything to me either.

I’ve put it in with code snippet

Please make sure that the Allow sellers to add price extras setting in HivePress/Settings/Listings is activated

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