Build a product table with WooCommerce add to quote buttons

January 21, 2021

WooCommerce product table with request a quote buttons

'Customers often ask if our bestselling Product Table plugin works with any WooCommerce 'add to quote' plugins. In this article, I'll share an excellent Request a Quote plugin that allows customers to add products to their shortlist directly from the product table

What is an Add to Quote plugin?

If you're listing products in a table, you might want customers to request a quote instead of buying online. This is essential if you provide bespoke services or custom pricing which varies for each customer.

A WooCommerce add to quote plugin provides 'add to quote' buttons, which you can use in addition to or instead of the usual add to cart buttons. Your customers can select as many products as they like, choose the quantity, and create a bespoke list. They can then view the list and submit the quote request to you.

Which WooCommerce Add to Quote plugin can I use with product tables?

Most add to quote plugins don't work with WooCommerce Product Tables straight out of the box. However, our friends at YITH have kindly provided a code snippet which allows you to use their YITH WooCommerce Request A Quote with product tables.

WooCommerce add to quote plugin
This video shows the 'Request a Quote' buttons in the product table. When you add a product to the quote, it is added to a list.

How to use YITH Request a Quote with WooCommerce Product Table

YITH have provided the following snippet to add to the functions.php file in your theme or child theme. This will only work with the premium version of YITH Request a Quote.

if ( defined( 'YITH_YWRAQ_PREMIUM' ) && function_exists( 'YITH_YWRAQ_Frontend' ) && class_exists( 'WC_Product_Table_Plugin' ) ) {
   add_filter( 'wc_product_table_data_short_description', 'add_to_quote_button_in_table', 99, 2 );
   function add_to_quote_button_in_table( $short_description, $pid ) {
      ob_start();
      $product_to_show = wc_get_product( $pid ); ?>        

         <div class="ywraq_container_add_to_quote">
         <?php         

         if ( $product_to_show->is_type( 'variation' ) ) {
            ?>
                <style type="text/css">
                   .ywraq_container_add_to_quote .cart {
                        display: none !important;
                    }
                </style>
            <?php
            global $product;            

            Barn2PluginWC_Product_TableHook_Manager::woocommerce_variation_add_to_cart();
         }
         YITH_YWRAQ_Frontend()->print_button( $pid ); ?>
        </div>
      <?php      return ob_get_clean();
   }
}

This will replace the short description column in WooCommerce Product Table with a YITH add to quote button for each product. If you want to use the short description column for something else then you can modify the code to hook into a different column of the product table.

A few notes:

  • These code snippets only work with simple products and not variations.
  • This is a developer-level task and is not covered by the plugin support that comes with WooCommerce Product Table or YITH Request a Quote. If you need help using the above code snippets, then you would need to hire a developer to get them working for you.
  • Don't edit your main parent theme, as your customizations will be lost when you update the theme in future. If you're using an off-the-shelf theme then you will need to create a child theme and add the code there instead.
  • The Add to Quote buttons only work with the standard usage of WooCommerce Product Table. They are not compatible with the lazy load option, so you must leave this disabled.
Need professional assistance?
We've partnered with Codeable to provide our customers with expert help if required.

Can I hide the add to cart button?

Some people like to use add to quote buttons alongside the usual add to cart buttons. Others like to remove the add to cart button completely so that the only option is to request a quote.

The YITH WooCommerce Request A Quote plugin has an option to hide the add to cart button. This does not work with WooCommerce Product Table and will remove the add to cart button from the single product page. You can easily remove the add to cart buttons from your product tables - simply don't include an add to cart column when you add columns to the product tables.

Where can customers see their quote request?

WooCommerce Request a Quote PluginThe YITH WooCommerce Request A Quote plugin comes with a 'Request a Quote' page. This lists the products you have added to the quote request, and includes a form to submit the request.

When a customer uses the product table to add an item to the quote, a link to the Request a Quote page will appear in place of the button. This makes it really easy for them to add multiple products to the quote and then click to review the quote.

You can also link to this page from your navigation menu. Alternatively, you can add a button linking to the page above/below the product table.

The premium version of the YITH WooCommerce Request A Quote plugin also has many extra features. This lets you customize the quote features to your exact needs.

Can customers choose a quantity for their quote request?

Unfortunately the quantity picker in WooCommerce Product Table will not work with the YITH Request a Quote buttons. This is because the quantity picker appears in the add to cart column, whereas you have to add the quote buttons to another column, and the two columns don't relate to each other.

Instead, customers should use the 'Add to Quote' buttons in the product table to built their quote. This will add a quantity of '1' to the quote for each product. When they click through to the quote page, they can modify the quantity of each product as required.

Where to get the plugins

We hope you enjoy using Request a Quote plugins with WooCommerce Product Table to create table layouts with add to quote buttons.

WooCommerce Product Table
Build a Product Table with WooCommerce Add to Quote Buttons on your site

11 Comments

  1. Ghilan
    June 2, 2021 Reply

    Hi Dear,
    Do you have any alternative solution for use quote button in product table with enable lazy load option, because I have more than 1000 products and I need for lazy load.

    • Edge
      June 2, 2021 Reply

      Hello, Ghilan. I'm afraid not, as the YITH WooCommerce Request A Quote plugin's Add to Quote buttons only work with the default usage of WooCommerce Product Table and as mentioned are not compatible with the lazy load option.

      You could look into using the NP Quote Request WooCommerce plugin by Neah Plugins with WooCommerce Product Table on your site with WooCommerce, which another customer has successfully used together on their site, and check whether or not it works with lazy load enabled.

  2. Nama Moonga
    August 26, 2020 Reply

    Hi i would like to use your Woocommerce plugins for my Woodworks furniture store project. i need to achieve the below work flow when generating a quote for a client and be able to invoice / place order later. Unfortunately i don't see A4 quotes supported , i would need product image, attributes listed below need to appear on the quote aswell. question is will these attributes and variation details show up on that quote/invoice and which of your plugins can i use with Woocommerce?

    • Edge
      August 26, 2020 Reply

      Hi, Nama. Thanks for your interest in WooCommerce Product Table, which you can use with WooCommerce and the YITH WooCommerce Request A Quote plugin to create and send a quote from your site.

      I hope you'll understand that it is the request a quote plugin that has the functions of generating the quote and is responsible for the product data that is displayed in it. Hence I suggest that you contact the YITH WooCommerce Request A Quote plugin's support for the best advice about this.

      Alternatively, another customer has shared information with us that you can also use the NP Quote Request WooCommerce plugin by Neah Plugins with WooCommerce Product Table on your site with WooCommerce, so you could also look into that plugin and see if the quote/invoice it generates can include the product data that you want.

      I hope this makes sense and helps. Let me know if you have any other questions. You can also contact us via our dedicated Support Center.

  3. Loren Nelson
    August 7, 2018 Reply

    Hi Katie: The Code snippet above for free YITH WooCommerce Request a Quote plugin does not replace the short description column in WooCommerce Product Table with the YITH add to quote button. What could I be doing wrong? Thank you, Loren

    • Katie Keith
      August 7, 2018 Reply

      Hi Loren, please make sure you have used the correct snippet for the free YITH plugin since there are two different ones depending on whether you're using free or Pro. If that doesn't work, then you will need to reach out to YITH support since they provided the code snippet.

      • Loren
        August 7, 2018 Reply

        Thank you Katie:

        I contacted YITH support. They initially replied that since WooCommerce Product Table is not their product they could not help me. After contacting them again, the support person is checking with the developers. As soon as I hear back I'll update you on the response. In the meantime, I continue my search for a product table with "request a quote" button solution.

        -Loren

        • Katie Keith
          August 8, 2018

          Hi Loren, YITH have definitely helped our other customers with this and it was they who sent us the code snippet, so hopefully they will be able to get this working for you. Are you sure you're using the code snippet for the free plugin rather than the premium one, and that you've added it to the right place?

  4. Mark
    October 5, 2017 Reply

    Can you use the product table and quote feature to have both an 'Add to cart' and 'Add to Quote/Wishlist/enquiry'?

    • Katie Keith
      October 5, 2017 Reply

      Hi Mark, no this isn't possible because the Request a Quote plugin replaces the Add to Cart buttons throughout your store.

  5. Mark Woodman
    October 5, 2017 Reply

    Can you use the product table and quote feature to have both an 'Add to cart' and 'Add to Quote/Wishlist/enquiry'?

Please share your thoughts...

Your email address will not be published.