Build a Product Table with WooCommerce Add to Quote Buttons

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. YITH have kindly provided some custom code that allows you to display the request a quote buttons from their plugin in WooCommerce 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 is a way to use the YITH WooCommerce Request A Quote plugin with WooCommerce Product Tables. I will tell you how to do this in a minute.

WooCommerce add to quote plugin

This demo 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:

  • This is a developer-level task and is not covered by the plugin support that comes with WooCommerce Product Table. If you need help using the above code, then you either need to contact YITH support or ask a developer to do it 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.

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, YITH WooCommerce Request A Quote is the only add to quote plugin that we know WooCommerce Product Table is compatible with.

The only other plugin we’re aware of is WooCommerce Request a Quote plugin from CodeCanyon. This works perfectly with WooCommerce Product Table. It works by replacing the add to cart buttons in the product table, instead of adding extra buttons. However, customers have recently told us that this plugin is no longer supported, so we’d recommend using the YITH plugin instead.

WooCommerce Product Table Add to Quote Buttons

WooCommerce Product Table with the CodeCanyon Request a Quote plugin

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!

Next steps

We hope you enjoy using YITH WooCommerce Request A Quote and WooCommerce Product Table to create table layouts with add to quote buttons.