Build a product table with WooCommerce add to quote buttons

September 23, 2020 9 comments

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 two excellent Request a Quote plugins that allow 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, there are two plugins that work well with it:

  1. NP Quote Request WooCommerce – this free plugin (Learn more.)
  2. YITH WooCommerce Request A Quote plugin – free and premium, requires a code snippet (below) to use it with the product table. (Learn more.)

Plugin 1 – NP Quote Request WooCommerce

This free WooCommerce quote request plugin lets you replace your ‘Add to cart’ buttons with ‘Request Quote’ buttons. If you’re including add to cart buttons in the product table then they will automatically change into Request Quote buttons so that customers can add products to their quote as required.

When you set up NP Quote Request in this way then it works with WooCommerce Product Table automatically, with no further configuration needed. Just make sure your product table includes an add-to-cart column and that you’re using the ‘Button’ add to cart button style.

Plugin 2 – YITH WooCommerce Request a Quote

YITH have kindly provided some custom code that allows you to display the request a quote buttons from their plugin in WooCommerce Product Table.

WooCommerce add to quote plugin

This video shows the working ‘Request a Quote’ buttons in the WooCommerce 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 snippets to add to the functions.php file in your theme or child theme. Choose a snippet depending on whether you’re using YITH’s free or premium add to quote plugin.

Code snippet for free YITH WooCommerce Request a Quote plugin

if ( 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();
 YITH_YWRAQ_Frontend()->print_button( $pid );
 return ob_get_clean();
 }
}

Code snippet for premium version of the YITH plugin

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();
 YITH_YWRAQ_Frontend()->print_button( $pid );
 return ob_get_clean();
 }
}

These code snippets will replace the short description column in WooCommerce Product Table with the YITH add to quote button. 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.

There’s a premium version of the YITH WooCommerce Request A Quote plugin which you can use to add extra features.

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.

These are our suggestions on how to allow customers to choose a quantity for their quote:

  • Remove the add to quote buttons from the table and instead, include a ‘button’ column in the product table linking through to the single product page where the customer can use the full quote functionality.
  • The second suggestion is only suitable if you are NOT allowing customers to purchase products and pay directly on your website at all. It’s a good idea if you only use your website for customers to request a quote, and then take the orders outside of your website. You can use the free WooCommerce Custom Add to Cart Button plugin to reword all the add to cart buttons to say ‘Request a Quote’, reword any other parts of your cart and checkout to make it obvious that they’re requesting a quote rather than placing an order, enable one of the free payment options in WooCommerce (e.g. cheque payments) and reword it to say that you will contact them with a quote, and disable shipping. Customers can then choose a quantity and add to the cart directly from the product table, and complete their order, but would actually be requesting a quote rather than placing an order. If you do this then you won’t need a separate WooCommerce Add to Quote plugin because you will be modifying WooCommerce itself to do this.

Does WooCommerce Product Table work with other Add to Quote plugins?

At the moment, NP Quote Request and YITH WooCommerce Request A Quote are the only add to quote plugins that we know WooCommerce Product Table is compatible with.

If you wish to use WooCommerce Product Table with any other WooCommerce add to quote plugins, we can’t guarantee that this will work. We’ve tested quite a few, and are not aware of any others that are compatible. However, we offer a full 30-day money back guarantee, so feel free to test it with other plugins. You can get a refund (or switch to one of the plugins mentioned in this article) if they don’t work together.

(Tip: Product tables are most likely to work with add to quote plugins that replace the built-in WooCommerce add to cart button. If they add extra buttons – in addition to add to cart – then they are unlikely to work in the product table. That’s why you have to add some custom code to use the YITH plugin with WooCommerce Product Table.)

Please let us know if you discover other WooCommerce add to quote plugins that work with product tables. We’d love to tell people about it, and can even publish a link to your site with a screenshot showing how you’re using the plugins!

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

Katie Keith

An active member of the global WordPress community, Barn2 Co-Founder Katie loves collaborating with other plugin companies. Her articles have been published on high profile sites including WPTavern, Torque and IndieHackers. She oversees all plugin support and deals with 'Tier 2' support requests about how to use Barn2's plugins in advanced ways.

9 Comments

  1. 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.

  2. 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?

  3. 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.

  4. 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.