Replacing Woocommernce 'add to cart' with request a quote button

Hello everyone,
What I am trying to do is replace the add to cart button in woocommerce on some, but not all products, with a request a quote button. I found a plugin for woocommerce called ‘Request a Quote’ which does the job and allows uers to instead fill out a request a quote form.

The problem is that it is throwing an error for anyone viewing as a guest. The error is as follows:
Uncaught Error : Class ‘WC_Product_Addons_Helper’ not found in /home/262427.cloudwaysapps.com/jezhvczbwx/public_html/wp-content/plugins/woocommerce-request-a-quote/front/class-afrfq-front.php on line 168

  • check_required_addons()
    wp-content/plugins/woocommerce-request-a-quote/front/class-afrfq-front.php:367
  • afrfq_custom_add_to_quote_button()
    wp-includes/class-wp-hook.php:288
  • apply_filters()
    wp-includes/class-wp-hook.php:312
  • do_action()
    wp-includes/plugin.php:478
  • do_action()
    wp-content/plugins/woocommerce/templates/content-product.php:65
  • require()
    wp-includes/template.php:724
  • load_template()
    wp-content/plugins/woocommerce/includes/wc-core-functions.php:195
  • wc_get_template_part()
    wp-content/plugins/woocommerce/templates/single-product/related.php:37
  • include()
    wp-content/plugins/woocommerce/includes/wc-core-functions.php:249
  • wc_get_template()
    wp-content/plugins/woocommerce/includes/wc-template-functions.php:1924
  • woocommerce_related_products()
    wp-content/plugins/woocommerce/includes/wc-template-functions.php:1887
  • woocommerce_output_related_products()
    wp-includes/class-wp-hook.php:288
  • apply_filters()
    wp-includes/class-wp-hook.php:312
  • do_action()
    wp-includes/plugin.php:478
  • do_action()
    wp-content/plugins/woocommerce/templates/content-single-product.php:72
  • require()
    wp-includes/template.php:724
  • load_template()
    wp-content/plugins/woocommerce/includes/wc-core-functions.php:195
  • wc_get_template_part()
    wp-content/plugins/woocommerce/templates/single-product.php:36
  • include()
    wp-includes/template-loader.php:98
  • require_once()
    wp-blog-header.php:19
  • require()
    index.php:17

The current woo layout is not in themer but in the default BB theme. I tried to use themer but it does not seem to register the change on certain products that are being changed by the Request a Quote plugin.

Anyone with any ideas about this or perhaps you know of another solution to accomplish this task?

Thanks in advance.

Hi Jeff,

The BB theme uses the WooCommerce templates and therefore, this is likely not a theme issue, but a problem with the plugin request quote plugin.

Do you get the same errors if you switch to another theme such as Twenty Nineteen? If you do, then I would contact the plugins support team and have them take a closer look.

Thanks Danny,

Yeah it seems it is a conflict between Request a Quite and the Woocommerce Addons plugins. Hopefully they can offer some insight.

No problem and thanks for keeping us informed. :slight_smile: