• Resolved notobella

    (@notobella)


    Hello,
    I am trying to organize this display in two columns:
    column 1 = booking details & pricing breakdown
    column 2 = customer information

    I started with attempting to reorganize the content with hooks:

    /* HOOKS
    if(!function_exists(‘remove_my_action’)){
    function remove_my_action(){
    remove_action( ‘mphb_sc_checkout_form’, array( ‘\MPHB\Views\Shortcodes\CheckoutView’, ‘renderBookingDetails’ ), 20, 2 );
    remove_action( ‘mphb_sc_checkout_form’, array( ‘\MPHB\Views\Shortcodes\CheckoutView’, ‘renderCustomerDetails’ ), 40 );
    remove_action( ‘mphb_sc_checkout_form’, array( ‘\MPHB\Views\Shortcodes\CheckoutView’, ‘renderTotalPrice’ ), 50 );
    remove_action( ‘mphb_sc_checkout_form’, array( ‘\MPHB\Views\Shortcodes\CheckoutView’, ‘renderPriceBreakdown’ ), 30 );
    }
    }
    add_action( ‘mphb_sc_checkout_form’, ‘my_renderBookingDetails’, 10, 2);
    add_action( ‘mphb_sc_checkout_form’, ‘my_renderCustomerDetails’, 30);
    add_action( ‘mphb_sc_checkout_form’, ‘my_renderTotalPrice’, 40);
    add_action( ‘mphb_sc_checkout_form’, ‘my_renderPriceBreakdown’, 50);
    */

    But these did not work at all. Ultimately, it would be easiest to combine the two sections into one div and float it left with the other section floated right – which I am fine with but I am unsure where to include my div wrapper tags.

    Any help would be appreciated.
    Thank you!

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support dimned

    (@dimned)

    Hi @notobella,
    You may try removing actions in the following way:

    add_action ('wp_head','remove_my_action_theme');
    
    function remove_my_action_theme(){
    remove_action( 'mphb_sc_checkout_form', array( '\MPHB\Views\Shortcodes\CheckoutView', 'renderBookingDetails' ), 10, 2 );
    remove_action( 'mphb_sc_checkout_form', array( '\MPHB\Views\Shortcodes\CheckoutView', 'renderCustomerDetails' ), 40 );
    remove_action( 'mphb_sc_checkout_form', array( '\MPHB\Views\Shortcodes\CheckoutView', 'renderTotalPrice' ), 50 );
    remove_action( 'mphb_sc_checkout_form', array( '\MPHB\Views\Shortcodes\CheckoutView', 'renderPriceBreakdown' ), 30 );
    }

    You may try to change the order of all the fields and then use CSS to place it in 2 columns.
    If you wish to modify the HTML part of each section you may find each function described at \wp-content\plugins\motopress-hotel-booking\includes\views\shortcodes\checkout-view.php

Viewing 1 replies (of 1 total)
  • The topic ‘Reorganize Checkout Display’ is closed to new replies.