• Hello, I would like the “Add to quote” button to be above the “add to cart” button, I already tried to create the code for the code snippet, but it didn’t work. What would be the php code that I could use and effectively work? Thanks

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Alberto Ruggiero

    (@witcher83)

    Hello @likemyweb ,

    i see the button duplicated. Could you please paste here the code you have used to display the other button? I think it needs some small adjustments.

    Thread Starter Like My Web

    (@likemyweb)

    Hello! Sorry to late the answer! I did paste this code in code snippet plugin:

    function rearrange_yith_quote_button() {
    if( class_exists(‘YITH_YWRAQ_Frontend’) ) {
    $yith_frontend = YITH_YWRAQ_Frontend::get_instance();
    remove_action( ‘woocommerce_after_add_to_cart_button’, array( $yith_frontend, ‘print_button’ ), 15 );
    add_action( ‘woocommerce_before_add_to_cart_button’, ‘custom_print_button’, 10 );
    }
    }
    add_action(‘wp’, ‘rearrange_yith_quote_button’);

    function custom_print_button() {
    global $product;
    $yith_frontend = YITH_YWRAQ_Frontend::get_instance();
    ob_start();
    $yith_frontend->print_button();
    $button = ob_get_clean();
    $button = str_replace(‘<a ‘, ‘<a id=”unique-quote-button” ‘, $button);
    echo $button;
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Button “Add to quote” before “add to cart”’ is closed to new replies.