How To Turn WordPress WooCommerce Into A Quote/Wish List System

How To Turn WordPress WooCommerce Into A Quote/Wish List System

Problem/Desire Snapshot

Recently, I’ve been asked to develop an online product showcase store (Quote Store) that allows visitors to add products to their cart and submit an inquiry to the website manager instead of paying and getting the item.

See the finished quote store in action.

What I Decided To Do

I am not a savvy php coder in any way, but after searching up and down over the Internet, I came up with a way to make this task simple yet manageable. The WooCommerce plugin has a thorough and easy-to-manage admin framework. Additionally, the cart and checkout functions are also very handy for creating a system that takes an order from a visitor/customer, sends email notifications to store admins, and stores the order in the Order management tab for review. While I can’t generate a fully functionally plugin out of nothing, I have enough understanding of the php language that would allow me to tweak things around in an existing plugin, especially in one as well-crafted as WooCommerce. Therefore, I decided to make customizations to WooCommerce to give it a second purpose. I am glad that I went through the process, as now I have acquired a clearer picture on what the WooCommerce plugin functions as a whole.

 

Before You Begin

Therese several things you have to do and keep in mind before starting:

  • First off, download a copy of WooCommerce and install it to your WordPress site or just install it in the plugin store.
  • Backup your site’s directory in FTP and the database in phpMyadmin just in case anything goes wrong during the process.
  • Keep in mind that I used Version 2.1.1.12 as the framework to develop upon. Depending on the latest version of WooCommerce, locations of certain codex may change

-Use My Modified Code Out of the Box-

Feel free to download a copy of my modified WooCommerce code here. If you plan to just use this package out of the box, make sure to install WordPress the normal way first. Then access your FTP account and replace your WooCommerce folder located in /wp-content/plugins with the folder that you downloaded here. Run a test and you should be good to go.

If issues occur, try to change the default paths of your site to something else, and revert back. You may also replace the folder once again with the customized one, somehow that worked for me when I had an issue one time. All I did was to replace the copied folder with the original WooCommerce plugin, and then I replaced it again with the modified folder and it worked. If you encounter any other problems, you may see if your issues match those  the frequent issues listed in here. Or you might want to tweak your WooCommerce plugin step by step, following the instructions below.

 

Functions.php File Edits

1. Change Add to Cart Button Text to Get A Quote (functions.php)

Insert the code listed below in functions.php (preferably in Child Theme).  You may replace Get a Quote with other custom text you’d like to display.

 

2. Change Out of  ‘Stock Text’ to ‘Sold’

Insert the code listed below in functions.php (preferably in Child Theme). You may replace Sold with other custom text you’d like to display.

3. Remove Free Tags from Products without Price

Insert the code listed below in functions.php (preferably in Child Theme). Insert the code listed below:

4. Remove Quantity Display

Insert the code listed below in functions.php (preferably in Child Theme).

5. Tweak On Woocommerce Settings Page, etc.

Setup pages that you’d like to use for shop, cart, checkout, account, etc in the WooCommerce settings page (run auto install when prompted if you’d like to have it setup by WooCommerce). Change Page Titles of Shop, Cart, Checkout, etc. in each page editor or the Page list to what you’d like your visitors to see on those pages.

 

Editing Source Code of WooCommerce

6. Remove “Cart Totals” section from Cart Page

Open wc-template-functions.php in wp-content/plugins/woocommerce/includes

Search for “Totals” in the file and remove this section from the code:

7. Remove ‘Price’, ‘Quantity’ and ‘Total’ Columns from Cart Table

Open cart.php in wp-content/plugins/woocommerce/templates/cart

Save and re upload to server

8. Change ‘Place Order’ to ‘Submit Wish List’

Open class-wc-checkout.php in wp-content/plugins/woocommerce/includes/

Save and re-upload  the file to server

9. Change ‘Update Cart’ to ‘Update Wish List’ and ‘Proceed to Checkout’ to ‘Submit Wish List’

Open cart.php in /wp-content/plugins/woocommerce/templates/cart/cart.php

Save and re-upload the file

10. Change ‘Place order’ to ‘Submit Wish List’ on Checkout Page

Open review-order.php in wp=/woocommerce/templates/checkout/review-order.php

11. Change Order Notes to Special Inquiry

Open class-wc-checkout.php in wp-content/plugins/woocommerce/includes/

12. Remove Total and Subtotal from the Your Order table on Checkout Page

Open review-order.php in wp-content/plugins/woocommerce/templates/checkout/

  1. remove ‘Total’, ‘woocommerce’ from line 19… woocommerce’ ); ?>
  2. remove line 31 and 32 entirely, alternatively only remove data between <th>and</th> to keep the layout consistent: <th><?php wc_cart_totals_coupon_label( $coupon ); ?></th> <td><?php wc_cart_totals_coupon_html( $coupon ); ?></td>
  3. remove woocommerce’ ); ?> and  from line 78 and 79, respectively:woocommerce’ ); ?> <td><?php wc_cart_totals_order_total_html(); ?></td>
  4. remove the entire line 101 <?php echo apply_filters( ‘woocommerce_cart_item_subtotal’, WC()->cart->get_product_subtotal( $_product, $cart_item[‘quantity’] ), $cart_item, $cart_item_key ); ?>
  5. Remove any excessive rows or columns as needed in the table head, body, or footer.
  6. Save file and re-upload to the server.

13. Replace “Your Order” with “Your Wish List” on Checkout Page

Open form-checkout.php in /wp-content/plugins/woocommerce/templates/checkout/form-checkout.php

14. Replace “Your Order” in Thank you section with “Your wish list” on order confirmation page.

Open thank you.php in /wp-content/plugins/woocommerce/templates/checkout/thankyou.php

15. Remove “Total” from Thank you message

Open thankyou.php in wp-content/plugins/woocommerce/templates/checkout/

16. Remove “Total” “Cart Totals” and other fields from “Order Details”

Open order-details.php in wp-content/plugins/woocommerce/templates/order

woocommerce’ ); ?>

17. Change ‘Billing Address’ header to ‘Contact Info’

Open order-details.php in wp-content/plugins/woocommerce/templates/order

Next, open form-billing.php in wp-content/plugins/woocommerce/checkout

18. Change “Customer details” to “Customer Details” on Checkout Page

Open order-details.php in wp-content/plugins/woocommerce/templates/order

Additional Tweaks:

Use Larger Thumbnail Images

Insert the code listed below in functions.php (preferably in Child Theme). Then install, activate and run the Regenerate Thumbnails plugin to resize your thumbnail images.

About The Author

Related posts

4 Comments

  1. Stephen jones

    hi great tutorial, is there a way to remove the payment method from the table on the thankyou page. I would like this be removed from the email too if, this what is being sent from thanyou.php.

    Many thanks

    Reply
    1. Daixin

      Thanks Stephen! Not sure if you’ve got it figured out by now, but you can disable to payment method by unchecking all of the payment gateway in the Checkout tab of your Woocommerce settings screen. Please feel free to reach out if that doesn’t solve it or you need anything else. 🙂

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *