Free and Premium WordPress Plugins & Themes Forums WordPress Plugins Hotel Booking Display order of items on the checkout page
- This topic has 5 replies, 3 voices, and was last updated 2 weeks ago by J. Davis.
- AuthorPosts
- February 24, 2020 at 8:21 am #918867Ryan LabelleParticipant
Hi. I created a post but I think it was removed? I’m reposting this..
I would like to change the display order of some parts of the checkout form.
For example, we would like to put the price breakdown under the number of guests.
It believe that this is coming from:
wp-content/plugins/motopress-hotel-booking/includes/shortcodes/checkout-shortcode/step-checkout.phpand I’ve tried to use the templating system to override in the child theme but it’s not working for me. I guess this only works for files under /templates?
Is there a way to do this?
I’m handy with WP / php but I was wondering if you could point me in the right direction.
Thank you.
March 12, 2020 at 8:36 am #929270Mary EvansParticipantHi Ryan,
It is not possible to override the plugin safely for further updates and move the price breakdown inside of that blocks you captured on the screenshot. We can move it to be before Booking Details http://prntscr.com/reay7d or after that block and before the coupon field http://prntscr.com/reazar
Best Regards,
M. EvansSeptember 10, 2024 at 12:34 pm #1666171Oscar KommerenParticipantHi,
Is it still impossible to change the order of different elements of the checkout page?
Kind regards
OscarSeptember 13, 2024 at 6:26 am #1667725J. DavisKeymasterHi Oscar,
All the sections of the checkout page can be found at \motopress-hotel-booking\includes\shortcodes\checkout-shortcode\step-checkout.php
Every section has its priority at the end of the line. You should remove the action and add it with a new priority.
Here is an example of how to move the “coupon” section to the very bottom (priority was 20 became 45):
add_action(‘wp_head’,’remove_render_Coupon’);function remove_render_Coupon(){ remove_action( 'mphb_sc_checkout_form', array( '\MPHB\Views\Shortcodes\CheckoutView', 'renderCoupon' ), 20 ); } add_action( 'mphb_sc_checkout_form', array( '\MPHB\Views\Shortcodes\CheckoutView', 'renderCoupon' ), 45 );
This code can be added to the functions.php file of your Theme or by using a Code Snippets plugin.
September 16, 2024 at 1:10 pm #1669202Oscar KommerenParticipantHello J Davis,
Thanks for you response I will try using this.
Can this also be used to put certain elements in a left or right column?Kind regards
OscarSeptember 29, 2024 at 11:47 pm #1674660J. DavisKeymasterHi Oscar, You will need to apply the custom CSS styles to change the alignment of sections.
- AuthorPosts
- You must be logged in to reply to this topic.