Free and Premium WordPress Plugins & Themes Forums WordPress Plugins Hotel Booking Client info in admin mail
- This topic has 6 replies, 2 voices, and was last updated 1 year, 9 months ago by J. Davis.
-
AuthorPosts
-
June 18, 2018 at 7:00 pm #690061Christine RosParticipant
Hello again,
You’ve help me to set guest field required, in my use it is translate in name + specie + sex of animal, but how to get this info field in the mail received by admin like %customer_first_name% tag. I really need these information…
Thanks for help.
Christine
June 19, 2018 at 2:55 pm #690378J. DavisKeymasterHi Christine,
Thank you for your question. There is no email tag for Full Guest name field. You can see it while editing Booking only. We’ll review your suggestion to create an email tag for this field though. Thank you for your feedback.
If you need to get some additional information via email you can try re-naming other field where email tag is available e.g. ‘Notes’.best regards,
JohnJune 19, 2018 at 6:52 pm #690498Christine RosParticipantHi,
Well, by now, making guest field required is useless…
If I want animals details in mail, you should help me to make the additional note required instead of guest field – i have to make this field display none too, like children field.
So ???June 21, 2018 at 9:03 am #691059J. DavisKeymasterHi Cristine,
Thank you for your reply. Please try adding the code below to functions.php file of the child theme in order to make Notes field required:
add_action( 'wp_head', 'remove_renderCustomerDetails' ); function remove_renderCustomerDetails(){ remove_action( 'mphb_sc_checkout_form', array( '\MPHB\Views\Shortcodes\CheckoutView', 'renderCustomerDetails' ), 40 ); } add_action( 'mphb_sc_checkout_form', 'renderCustomerDetails', 40 ); function renderCustomerDetails(){ ?> <section id="mphb-customer-details" class="mphb-checkout-section"> <h3 class="mphb-customer-details-title"><?php _e( 'Your Information', 'motopress-hotel-booking' ); ?></h3> <p class="mphb-required-fields-tip"> <small> <?php printf( __( 'Required fields are followed by %s', 'motopress-hotel-booking' ), '<abbr title="required">*</abbr>' ); ?> </small> </p> <?php do_action( 'mphb_sc_checkout_form_customer_details' ); ?> <p class="mphb-customer-name"> <label for="mphb_first_name"> <?php _e( 'First Name', 'motopress-hotel-booking' ); ?> <abbr title="<?php _e( 'Required', 'motopress-hotel-booking' ); ?>">*</abbr> </label> <br /> <input type="text" id="mphb_first_name" name="mphb_first_name" required="required" /> </p> <p class="mphb-customer-last-name"> <label for="mphb_last_name"> <?php _e( 'Last Name', 'motopress-hotel-booking' ); ?> <abbr title="<?php _e( 'Required', 'motopress-hotel-booking' ); ?>">*</abbr> </label> <br /> <input type="text" name="mphb_last_name" id="mphb_last_name" required="required" /> </p> <p class="mphb-customer-email"> <label for="mphb_email"> <?php _e( 'Email', 'motopress-hotel-booking' ); ?> <abbr title="<?php _e( 'Required', 'motopress-hotel-booking' ); ?>">*</abbr> </label> <br /> <input type="email" name="mphb_email" required="required" id="mphb_email" /> </p> <p class="mphb-customer-phone"> <label for="mphb_phone"> <?php _e( 'Phone', 'motopress-hotel-booking' ); ?> <abbr title="<?php _e( 'Required', 'motopress-hotel-booking' ); ?>">*</abbr> </label> <br /> <input type="text" name="mphb_phone" required="required" id="mphb_phone" /> </p> <?php if ( MPHB()->settings()->main()->isRequireCountry() ) : ?> <p class="mphb-customer-country"> <label for="mphb_country"> <?php _e( 'Country of residence', 'motopress-hotel-booking' ); ?> <abbr title="<?php _e( 'Required', 'motopress-hotel-booking' ); ?>">*</abbr> </label> <br /> <select name="mphb_country" required="required" id="mphb_country"> <option value=""></option> <?php foreach ( MPHB()->settings()->main()->getCountriesBundle()->getCountriesList() as $countryCode => $countryLabel ) { ?> <option value="<?php echo esc_attr( $countryCode ); ?>"> <?php echo $countryLabel; ?> </option> <?php } ?> </select> </p> <?php endif; // country ?> <?php if ( MPHB()->settings()->main()->isRequireFullAddress() ) : ?> <p class="mphb-customer-state"> <label for="mphb_state"> <?php _e( 'State', 'motopress-hotel-booking' ); ?> <abbr title="<?php _e( 'Required', 'motopress-hotel-booking' ); ?>">*</abbr> </label> <br /> <input type="text" name="mphb_state" required="required" id="mphb_state" /> </p> <p class="mphb-customer-city"> <label for="mphb_city"> <?php _e( 'City', 'motopress-hotel-booking' ); ?> <abbr title="<?php _e( 'Required', 'motopress-hotel-booking' ); ?>">*</abbr> </label> <br /> <input type="text" name="mphb_city" required="required" id="mphb_city" /> </p> <p class="mphb-customer-address1"> <label for="mphb_address1"> <?php _e( 'Address', 'motopress-hotel-booking' ); ?> <abbr title="<?php _e( 'Required', 'motopress-hotel-booking' ); ?>">*</abbr> </label> <br /> <input type="text" name="mphb_address1" required="required" id="mphb_address1" /> </p> <p class="mphb-customer-zip"> <label for="mphb_zip"> <?php _e( 'Postcode', 'motopress-hotel-booking' ); ?> <abbr title="<?php _e( 'Required', 'motopress-hotel-booking' ); ?>">*</abbr> </label> <br /> <input type="text" name="mphb_zip" required="required" id="mphb_zip" /> </p> <?php endif; // full address ?> <p class="mphb-customer-note mphb-required-fields-tip"> <label for="mphb_note"><?php _e( 'Notes', 'motopress-hotel-booking' ); ?> <abbr title="<?php _e( 'Required', 'motopress-hotel-booking' ); ?>">*</abbr></label><br /> <textarea name="mphb_note" id="mphb_note" rows="4" required="required"></textarea> </p> </section> <?php }
Also add the style below to style.css file of Child Theme in order to remove Guest Name field (make sure you have removed code that makes this field required):
.mphb-guest-name-wrapper{ display:none; }
September 4, 2019 at 1:39 pm #849397J. DavisKeymasterHello,
We are happy to announce about release of new Hotel Booking 3.6.1 version where we have added new tags for email templates: Price Breakdown, Country, State, City, Postcode, Address, Full Guest Name. We notify you as you requested this feature. Here are the other improvements added with 3.6.0 and 3.6.1 version https://motopress.com/products/hotel-booking/#release-notes
Thank you for collaboration. Do not hesitate to contact us if you have any further question
best regards,
J. DavisFebruary 21, 2023 at 5:37 am #1418080Zsolt HalászParticipantHello!
I tried this function and it still works very well, but I need the guest address without “Country of residence” and “State” marked as required fields.
Is it possible to make it with function?
Thank you for your help.
February 23, 2023 at 1:58 am #1419259J. DavisKeymasterHi Zsolt,
Thanks for your question. You may add some default values to the following fields by editing the function e.g. ‘-‘ or ‘no’ and then hide the fields with a custom CSS style.
Or you may use the Checkout Fields Editor addon to edit/add custom fields https://motopress.com/products/hotel-booking-checkout-fields/best regards,
John Davis -
AuthorPosts
- You must be logged in to reply to this topic.