Charge per place without multiplying the price

1-I need help with categories that are charged by the number of people… I added an attribute "price/person but when booking it does not multiply the initial price by the number of people… and finally how to hide the original price when you added a price/person ad attribute to not have both fields in the ad addition

2- Also there is a short code to change the size of the title in ads ?
3-Finally, users mostly use their mobile, for the blog is there a possibility to have a carousel slideshow to scroll rather than an article below the other? Thank you

  1. Please describe the issue in detail, which price extra type do you use and how it should affect the price. By default, the “per place” extra is multiplied by the number of places (guests).

2, 3. Unfortunately there are no such options, these would require customizations.

@ihor
To answer your request for precision: I have a category of accommodation rental by the day and there everything works wonderfully … and for the other category “meals” I activated the time slot option, and I added a price/person attribute but I understood that it does not multiply when booking- I wish that when booking we can determine the number of dishes ordered and that the price/person is simply multiplied- thank you again



Please try to use HivePress setting instead of the custom attribute. Please try to enable the Allow multiple places per booking setting in HivePress/Settings/Bookings. It will add Minimum places per booking and Maximum places per booking attributes which are optional for vendors. Also, this setting adds the field Places to the booking make form. Then booking price will count per number which is set by a user in the field Places in the booking make form

Great, I did as you said, indeed it multiplies by the number of places, but the concern is that it is good for the category based on time slots, but suddenly it also multiplies the category “housing rental” based on the number of nights and not on the number of people occupying the accommodation… Is there a way to choose the category? or another workaround? Thank you

Please try this PHP snippet to hide fields to set places per booking in categories that are not set in Time Categories setting in HivePress/Settings/Bookings

add_filter('hivepress/v1/forms/listing_update', 'custom_hide_booking_fields', 1000, 2);
add_filter('hivepress/v1/forms/booking_make', 'custom_hide_booking_fields', 1000, 2);

function custom_hide_booking_fields($fields, $form){
	$listing = null;
	
	if(strpos(current_filter(), 'listing') !== false){
		$listing = $form->get_model();
	}elseif(strpos(current_filter(), 'booking') !== false){
		$listing = hivepress()->request->get_context('listing');
	}
		
	if(!$listing){
		return $fields;
	}
		
	if(!hivepress()->booking->is_time_enabled($listing)){
		unset($fields['fields']['_quantity'], $fields['fields']['booking_min_quantity'], $fields['fields']['booking_max_quantity']);	
	}
		
	return $fields;
}
1 Like