• Resolved matarelovejoy

    (@matarelovejoy)


    Hi,

    I have tried yith add to quote, and all related add to quote plugins but they seem not to work, and the reason being I am using Elementor Pro page builder and they are not supported. I understand with this hook woocommerce_after_add_to_cart_button I can add content after the add to cart button. Using that hook, can someone share with a function to add an “add to quote” button which will redirect to an add to quote page which pretty much looks the same as the cart page but instead of the proceed to checkout button, the button will be submit quote.

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @matarelovejoy,

    Well okay, here is the function.

    add_action('woocommerce_after_add_to_cart_button','zwk_additional_button');
    function zwk_additional_button() {
     
        echo '<a href="Place the url" target="_blank">add to quote</a>';    
    }

    You have to place URL in href.

    If you face any problem let know

    Thank You

    Thread Starter matarelovejoy

    (@matarelovejoy)

    Hi @zworthkey12vaibhav

    First and foremost, I would like to thank you so much for you understood my problem and you were quick to assist. I have added the function and a link is now appearing next to the button. How do I make it a button or inherit the css properties of the add to cart button? Please note that the buy unbranded is the add to cart button https://www.enigmapromotions.co.za/product/1-litre-tritan-water-bottle/ and https://imgur.com/WHizuG5

    Thread Starter matarelovejoy

    (@matarelovejoy)

    I have added a class to the a tag and then copy/pasted css code from the add to cart button so the issue of styling and redirecting to href is fixed.The href now redirects to a custom page I wanted to ask, on that page is there a way to identify the product title so that when the user submits the form I can know which product is the customer requiring a quotation for?

    Plugin Support Stuart Duff – a11n

    (@stuartduff)

    Automattic Happiness Engineer

    Hi @matarelovejoy,

    To create a button that is styled like your sites add to cart button you would need to duplicate the add to cart button HTML/CSS classes within the code for your quote button.

    To achieve this type of customization I’d recommend using Google Chrome Developer Tools. You can right click anywhere on your webpage to select ‘Inspect Element’, the HTML and CSS properties show up right in your browser. This will allow you to see the HTML the add to cart button uses and replicate that along with the CSS classes in your request a quite button HTML structure.

    I hope this helps.

    Thread Starter matarelovejoy

    (@matarelovejoy)

    Hi @stuartduff

    Thank you so much for the feedback, I so much appreciate it. I did that and it worked perfectly.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘custom add to quote button’ is closed to new replies.