Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the neve domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/hosting/domains/c2q.hostin.gr/public_html/wp-includes/functions.php on line 6121
Cart to Quote For WooCommerce Documentation – Cart to Quote Demo
Skip to content

Documentation

Cart to Quote for WooCommerce

Installation


There are two way to upload and activate the plugin:

A. The recommended way

  1. Extract the content of the plugin
  2. Upload the created folder via FTP in your /wp-content/plugin/
  3. Go to Plugins
  4. Activate the plugin

B. The normal way (make sure that the PHP upload limit is over 50MB and the PHP timeout limit is high enough depending on your internet connection speed)

  1. Extract the zip file you have downloaded.
  2. Login to your administration panel (ex. http://www.yourdomain.com/wp-admin).
  3. Go to Plugins → Add New.
  4. At the top of the page click the “Upload Plugin” link
  5. Click choose file (or what your browser uses to navigate to your files)
  6. From the extracted files of step one (1) navigate to and select woo-variations-table.zip and click “Install Now
  7. You may be asked to confirm your wish to install the Plugin.
  8. If this is the first time you’ve installed a WordPress Plugin, you may need to enter the FTP login credential information. If you’ve installed a Plugin before, it will still have the login information. This information is available through your web server host.
  9. Click Proceed to continue with the installation. The resulting installation screen will list the installation as successful or note any problems during the install.
  10. If successful, please click Activate Plugin to activate it.
  11. If you get an error, please de-activate WooCommerce, activate the plugin and re-activate WooCommerce

Features


  • Integrates with any theme by using the default Woocommerce design
  • Supports “Woocommerce Product Add-Ons” plugin
  • Works for both logged in and guest users
  • Per user role access to the “add to quote” button
  • Can be limited to logged in users only
  • User friendly and self-explanatory administration panel fully integrated with Woocommerce.
  • Orders alike quotes administration; native WordPress plugin. Quotes is a custom post type
  • Admin can create quotes for existing users or anyone but just knowing his/her email address
  • Ability to add your custom attachment to any quote and send to the customer
  • Auto creates PDF attachment with the quote details to be sent to the customer
  • The admin can edit and approve or decline any quote request
  • Quote expiry, reminder and follow up date can be set per quote
  • Easily edit the content of each email via the plugin options
  • No need for another plugin; it works out of the box with WordPress and Woocommerce
  • Compatible with Woocommerce Variations to Table – Grid
  • Easily translatable via .po / .mo files.
  • Available translations: English, Greek

Requirements


  • WordPress 5.0+
  • Woocommerce 7+
  • PHP 7.4+, 8+

Usage


Plugin Settings

In order to setup the Cart to Quote for Woocommerce plugin navigate from your WordPress administration panel to “Woocommerce → Settings” and click on the Cart to Quote Tab.

Settings
  1. Always prompt for log in: Disallow access to guests and prompt for log in even in single quotes.
  2. Require account: Allow access to the plugin functionality, but require login to submit quote list.
  3. Add quotes list on my account: Add the quotes list before the orders list on Woocommerce my account page.
  4. Remove add to quote button on product: Removes the “add to quote” button on the single product page.
  5. Remove add to quote button from product archives: Removes the “add to quote” button on the product archives list/loop page.
  6. Add quotelist icon to menu: This will add an icon with a mini quote list dropdown on hover.
  7. Cart page button: Setup the quote button on the cart page. IMPORTANT! If you are using blocks for your checkout page, use the shortcode  to place the button.
  8. Show the “add to quote button” for these roles only: Restricts the “add to quote” button to these roles only. It also means that you require a user to be logged in, in order to see the button and add products in the quote list.
  9. Customize “add to quote” text: You can fill in the text for the “add to quote” button. Leave empty for default.
  10. Remove add to cart button from the whole site: Attempts to remove the “add to cart” button from everywhere on your site.
  11. Attempts to remove all Woocommerce prices from the whole site: Removes the prices from everywhere on your site.
  12. Disallow user remarks: Users will not be able to add remarks (notes) to quotes, if you check this.
  13. Empty cart before adding quote items: The cart will be emptied before adding quote items to it when the user accepts a quote.
  14. Days to remember user’s quote list: How many days should the plugin remember the users quote list when the user is logged out (default is 100). Basically is the cookie life.
  15. New quote email notification: Here you may insert an email address to receive new quote requests notification, eg. the shop manager email address.
  16. Email user on frontend new quote: Email quote details to the user that is submitting the new quote from the frontend.
  17. Text before the quote list on the reminder email: Here you may enter any custom text that will be inserted before the quote list on the quote reminder email that is sent to the customer.
  18. Text after the quote list on the reminder email: Here you may enter any custom text that will be inserted after the quote list on the quote reminder email that is sent to the customer.
  19. Text before the quote list on the follow up email: Here you may enter any custom text that will be inserted before the quote list on the quote follow up email that is sent to the customer.
  20. Text after the quote list on the follow up email: Here you may enter any custom text that will be inserted after the quote list on the quote follow up email that is sent to the customer.
  21. PDF Logo: Drag and drop or “Add Media” to the editor in order to customize the logo on the PDF that is sent as attachment to the customer on the quote list creation.
  22. PDF Company Address: The address of your company that you may want to display on the PDF with the quote details.
  23. PDF Text Before Product’s Table: Any text that you want to be displayed on the PDF, before the table with the list of the quoted products.
  24. PDF Page Footer: Any text that you want to be displayed on the PDF footer.
  25. PDF Headers Background Color: Any color that you would like as background in the PDF (table) headers.
  26. PDF Links Color: Any color that you would like for any links on the PDF.
  27. PDF Style: Here you may enter any CSS rules to be applied to the PDF (do NOT include <style></style>).
  28. You are ready to go! *** Save Changes ***

Quotes Administration


In order to create or edit any quote navigate from your WordPress administration panel to “Woocommerce → Quotes“. The functionality is the same as any WordPress Custom Post Type.

Quotes Management


  • Add a quote buy clicking on the “add Quote” button
  • If you already have quotes created you may edit, quick edit, trash or view any quote. Just hover on the quote title for the links to show up.

Quotes Editing


  • User: You may add a user by start typing on the User field. An AJAX search will be ran on the background for already registered users and you will be prompt to select one if anyone is found. If the user does not exist you may type his email and the select it. YOu will be prompt to fill in his/her details. It is not obligatory to add the details of the user.
  • On the next area you may select the products you want to add to the quote or edit the existing ones. In the same way start typing the title or SKU of the product and you will be prompt to select on of the results that are found. All fields bu the quantity will be autofilled for you after you select a product.
  • You may enter the profit margin by editing each individual product. Look for the “Unit Cost” field.
  • To add more product click on the plus (+) sign on the end of each row.
  • To remove a product click on the (x) sign on the start of each row.
  • To enter an expiry, reminder and follow up date click on any of the three fields. A calendar will pop up.
  • You may keep notes for admins only on the “Admin Notes” textarea.
  • If the quote was submitted bya user and the user added some remarks (notes), those will be displayed on the “User Notes” textarea.
  • On the sidebar you may select nad/or change the status of the quote.
  • You may add an attachment to the quote by clicking on the “Add File” button. The default WordPress media manager will pop up. This attachment will be sent to the user on quote submission.
  • If you are editing a quote then you will have two additional options.
  • “Send status notification to user” (self explanatory).
  • “Send New Quote Notification to USer” in case you want to resend the email that was sent to him/her when the quote was first created.

Quotes Frontend


Users, depending on your settings, will be able to add products in their quotes list and ask for quotes. They will be able to ask for a quote and see their quotes on the “My Account” page.

For Developers


Templating

You may override any of the plugin templates in the same way you do for woocommerce. Just copy the file in “your-theme-directory/c2q/”.

eg. if you want to override the single-quote.php and your theme is “storefront-child” then create a folder named “c2q” in “/wp-content/themes/storefront-child/” and copy the file “single-quote.php” in there. Now you may edit it as preferred.

Hooks

Many hooks are in place. Please search the code for a full list. Below are some of them.

Actions
/woo-cart-to-quote/functions/quote.php (6 hits)
    Line 304:   '. do_action('c2q_before_table_body_pdf', $post_id) .'
    Line 378:   $body .= do_action('c2q_before_table_footer_pdf', $post_id);
    Line 403:   $footer .= do_action('c2q_before_table_end_pdf', $post_id);
    Line 410:   $footer .= do_action('c2q_after_table_end_pdf', $post_id);
    Line 635:   $out = do_action('c2q_quotelist_notices') .'
    Line 712:   do_action('c2q_after_quotelist_form', $data, $c2q_is_empty);
/woo-cart-to-quote/templates/single-quote.php (5 hits)
    Line 21:   do_action( 'c2q_before_main_content' );
    Line 43:   do_action( 'c2q_before_quote_table', get_the_ID() ); 
    Line 53:   do_action( 'c2q_after_quote_table', get_the_ID() ); 
    Line 65:   do_action( 'c2q_after_main_content' );
    Line 74:   do_action( 'woocommerce_sidebar' );
Filters
/woo-cart-to-quote/classes/frontend.php (12 hits)
 Line 84: echo apply_filters('c2q_quotes_list_header', '<h2>'. __('Recent Quotes', 'c2q') .'</h2>');
 Line 162: 'post_status' => apply_filters('c2q_submitted_quote_status', 'publish')
 Line 230: $adminmail = apply_filters('c2q_emailnewquote_adminmail', get_option('wc_settings_tab_c2q_emailnewquote'));
 Line 231: $subject = apply_filters('c2q_emailnewquote_subject', __( 'You have a new quote request'), 'c2q');
 Line 232: $message = apply_filters('c2q_emailnewquote_message', __('You have a new quote request:', 'c2q')).' '.get_the_permalink($id);
 Line 244: $subject = apply_filters('c2q_usermailnewquote_subject', __( 'Your quote information'), 'c2q');
 Line 245: $message = apply_filters('c2q_usermailnewquote_message', __('Thank you for submiting a new quote request. We will contact you soon with an awesome offer!', 'c2q'))."\n".site_url();
 Line 287: $adminmail = apply_filters('c2q_emailremindquote_adminmail', get_option('wc_settings_tab_c2q_emailnewquote'));
 Line 288: $subject = apply_filters('c2q_emailremindquote_subject', __( 'You have a new quote reminder'), 'c2q');
 Line 289: $message = apply_filters('c2q_emailremindquote_message', __('You have a quore review reminder:', 'c2q')).' '.admin_url('post.php?post='. intval($_POST['post_id']) .'&action=edit');
 Line 319: update_post_meta($post->ID, 'c2q_quoted_status', apply_filters('c2q_cancelled_front_status', 'cancelled', $post));
 Line 342: update_post_meta($post->ID, 'c2q_quoted_status', apply_filters('c2q_rejected_front_status', 'rejected', $post));
 /woo-cart-to-quote/classes/metaboxes.php (1 hit)
 Line 795: $subject = __('New quote from', 'c2q').' '.wp_specialchars_decode(apply_filters( 'woocommerce_email_from_name', get_option( 'woocommerce_email_from_name' )));
 /woo-cart-to-quote/classes/widgets.php (2 hits)
 Line 37: echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ). $args['after_title'];
 Line 43: echo apply_filters('quotelist_widget_output', $out, $instance);
 /woo-cart-to-quote/classes/woo.php (1 hit)
 Line 433: return apply_filters( 'wc_settings_tab_c2q_settings', $settings );
 /woo-cart-to-quote/functions/cron.php (2 hits)
 Line 40: $subject = __('Do not miss this offer by', 'c2q').' '.wp_specialchars_decode(apply_filters( 'woocommerce_email_from_name', get_option( 'woocommerce_email_from_name' )));
 Line 110: $subject = __('Last chance to get this offer by', 'c2q').' '.wp_specialchars_decode(apply_filters( 'woocommerce_email_from_name', get_option( 'woocommerce_email_from_name' )));
 /woo-cart-to-quote/functions/pages.php (2 hits)
 Line 21: $quotes_overview_args = apply_filters('quotes_overview_args', $quotes_overview_args);
 Line 42: $quotelist_args = apply_filters('quotelist_args', $quotelist_args);
 /woo-cart-to-quote/functions/quote.php (21 hits)
 Line 51: $header = '<table class="'. apply_filters('c2q_single_quote_table_class','table shop_table shop_table_responsive products_table', $post_id) .'">
 Line 56: $header_arr = apply_filters('c2q_single_quote_table_header', array (
 Line 68: $header .= '<th class="'. apply_filters('c2q_single_quote_th_class', $class, $post_id) .' '. ($class=='product' ? '' : 'text-right') .'">'. $text .'</th>';
 Line 129: $body_array[$c2q_product['id'].'_'.$i] = apply_filters('c2q_single_quote_table_body', $body_array[$c2q_product['id'].'_'.$i], $c2q_product);
 Line 135: $body_array = apply_filters('c2q_quotes_table_body', $body_array, $post_id, $c2q_quoted_products);
 Line 173: $footer_array = apply_filters('c2q_quotes_table_footer', $footer_array, $post_id, $c2q_quoted_products);
 Line 193: $hide_buttons = apply_filters('c2q_hide_buttons_statuses', array(
 Line 245: $subfooter_array = apply_filters('c2q_quotes_table_subfooter', $subfooter_array, $post_id, $c2q_quoted_products); 
 Line 279: $header = '<table class="'. apply_filters('c2q_single_quote_table_class','table shop_table shop_table_responsive products_table', $post_id) .'">
 Line 284: $header_arr = apply_filters('c2q_single_quote_table_header_pdf', array (
 Line 297: $header .= '<td class="header '. apply_filters('c2q_single_quote_th_class', $class, $post_id) .'">'. $text .'</td>';
 Line 365: $body_array = apply_filters('c2q_single_quote_table_body_pdf', $body_array, $post_id, $c2q_product);
 Line 395: $footer_array = apply_filters('c2q_single_quote_table_footer_pdf', $footer_array, $post_id);
 Line 468: $out = apply_filters('quotelist_mini_output', $out, $data);
 Line 584: $header = apply_filters('c2q_quotelist_header', array(
 Line 650: $body_array = apply_filters('c2q_quotelist_body', $body_array);
 Line 671: $footer_array = apply_filters('c2q_quotelist_footer', array_reverse(array_pad($footer_array, count($body_array[$row->ID]), '')));
 Line 707: $out = apply_filters('quotelist_output', $out, $data);
 Line 833: $data = apply_filters('quotelist_data', $data, $instance);
 Line 973: $attr[$index][] = esc_html( apply_filters( 'woocommerce_variation_option_name', $term->name ) );
 Line 1047: $statuses = apply_filters('c2q_statuses', array (
 /woo-cart-to-quote/functions/shortcodes.php (6 hits)
 Line 48: $header = apply_filters('c2q_quotes_overview_header',array(
 Line 102: $body_array[get_the_ID()] = apply_filters('c2q_single_quote_overview_body', $body_array[get_the_ID()], $post_id);
 Line 103: $extra_body_info[get_the_ID()] = apply_filters('c2q_single_quote_extra_info', $extra_body_info[get_the_ID()], $post_id);
 Line 107: $body_array = apply_filters('c2q_quotes_overview_body', $body_array);
 Line 108: $extra_body_info = apply_filters('c2q_quotes_extra_info', $extra_body_info);
 Line 134: $out = apply_filters('c2q_no_quotes', __('You have no quotes', 'c2q'));
 /woo-cart-to-quote/functions/templates.php (6 hits)
 Line 67: $from_address = sanitize_email(apply_filters( 'woocommerce_email_from_address', get_option( 'woocommerce_email_from_address' )));
 Line 68: $from_name = wp_specialchars_decode(apply_filters( 'woocommerce_email_from_name', get_option( 'woocommerce_email_from_name' )));
 Line 70: $to = apply_filters( 'c2q_email_to', $to);
 Line 71: $subject = apply_filters( 'c2q_email_subject', $subject);
 Line 72: $body = apply_filters( 'c2q_email_body', $body);
 Line 75: $headers[] = apply_filters( 'woocommerce_email_headers', 'Content-Type: text/html; charset=UTF-8');
 /woo-cart-to-quote/templates/emails/email-footer.php (1 hit)
 Line 36: <?php echo wpautop( wp_kses_post( wptexturize( apply_filters( 'woocommerce_email_footer_text', __('Powered by Quote2Cart for Woocommerce', 'c2q') ) ) ) ); ?>
 /woo-cart-to-quote/templates/emails/quote-pdf.php (1 hit)
 Line 131: font-family: <?php echo apply_filters('c2q_pdf_font_family', '"dejavusans"'); ?>;
 /woo-cart-to-quote/woo-cart-to-quote.php (1 hit)
 Line 29: if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {

Frequently Asked Questions


  1. Are variable products supported? Yes, they are.
  2. Will it work with this (any not tested by us) plugin? Please ask!
  3. I need this change on the plugin. Will you do it for me? If this is a change that will benefilt all buyers, we may consider it. If it is a customization, then we are sorry, but this is not included on the support.
  4. How many quotes can it handle? This really depends on the server and site optimization.

Changelog


1.0.17 13 Aug 2024
  • Feature: Added menu icon and mini quote list dropdown option.
  • Fix: PHP code clean up
  • Fix: Added PHP conditions to avoid errors
1.0.16 04 Oct 2023
  • Fix: PHP 8 compatibility
1.0.15 11/25/2021
  • Fix: Resolved conflict with “Google Doc Embedder” plugin
1.0.14 11/22/2021
  • Feature: Added PDF comment per quote
  • Feature: Added button on the cart page to merge or transfer the cart contents to the user’s quote list
1.0.13 11/05/2019
  • Fix: In some cases the plugins’ setting would not save
1.0.12 02/14/2019
  • Fix: In some cases displaying prices with tax would display a warning creating a wsod on post
  • Fix: Fixed JS error if the email does not exist in the user DB
  • Feature: Update select2 to latest version
1.0.11 09/06/2018
  • Fix: On some DB setups the product would not be added to the quotelist
1.0.10 08/01/2018
  • Fix: Added several checks in order to avoid errors from popping up
1.0.9 10/20/2017
  • Feature: Woocommerce v3.2 compatibility
  • Feature: Quote thank you message override
1.0.8 04/30/2017
  • Feature: Woocommerce v3.0 compatibility
  • Feature: Per product disable “add to cart” button
  • Feature: New quotes option to CC email to the quote author
1.0.7 01/19/2017
  • Feature: Added the option to customize the text on the email headers
  • Feature: Added the option to customize the footer of the emails
  • Fix: Fixed quotelist widget link on WPML sites
  • Fix: Quote PDF in some occasions was not attached due to server lag
1.0.6 01/03/2017
  • Feature: Added “Woocommerce Product Addons” plugin support
  • Feature: Added description per product on quotes via backend
  • Feature: Better Avada theme compatibility
  • Feature: Added image on quote lists
  • Feature: SKU search on backend
  • Feature: Made the list price and cost editable on backend
  • Fix: Prevent last product row deleting on admin
  • Fix: PDF was not attached if the user was not registered
  • Fix: Some text was not translatable
1.0.5 10/23/2016
  • Feature: Added the option to remove prices from your site
1.0.4 09/13/2016
  • Feature: Added compatibility with additional popular themes
  • Feature: Better button enabling checks on variable products
  • Bug: Force Font Awesome load if missing
1.0.3 09/09/2016
  • Feature: Added support for ajax refreshing of the quotelist widget
  • Bug: Fixed some PHP warnings
1.0.2 08/23/2016
  • Feature: Enable/disable “add to quote” functionality per product
  • Feature: Made easier to understand that adding a user during the quote creation is optional
  • Bug: In some installations, woocommerce select2 version was conflicting when editing or creading quotes
  • Bug: Fixed some typos
1.0.1 08/19/2016
  • Bug: Missing comma was preventing DB table from being created
  • Bug: Added some checks to remove warnings for undifined indexes
1.0.0 08/15/2016
  • Initial release

Sources and Credits


This plugin uses the following libraries