Woo Checkout
Woo Checkout is used to charge the clients through WooCommerce Checkout. This option is useful when there is no way to make transactions via PayPal or Stripe in your country.
Creating a Calculator Product
You should first create your own special Calculator Product using the WooCommerce plugin to use WooCommerce Payments. So you can assign your Calculator Product to the specific calculator form to be redirected to the Cart or Checkout page. To do this navigate to Products and click Add New:
The product that we are creating should be Simple type and do not forget to put a price:
The price of the Calculator product will be changed to the price of the Total Summary of Calculator Form.
The setting of the product image is optional. You can hide the product from the catalog in order to not display it on the WooCommerce Shop page:
Enabling Woo Checkout for Calculator
After creating the WooCommerce Product we can start configuring the Calculator. Open the Cost Calculator dashboard and edit the selected calculator:
Then, to sell your service/product configured by the calculator on your website you can enable Woo Checkout from the Settings of the calculator:
Replace Product - By default, when the calculation is done in the same Product and redirected to the WooCommerce cart, it will replace the previously added product. When Replace Product option is disable the same Product can be added to the cart with different values.
Example: Let's say we have Calculator for Printing Services:
The user makes calculations for A4 paper size and adds to the Cart. Then, makes calculations for A5 paper size as well. Depending on whether the "Replace Product" is enabled or disabled the Product will be added to the cart differently.
After enabling the Woo Checkout option, the list of your WooCommerce products will appear. We need to choose the Calculator product we have previously created.
After choosing your proper Calculator product from the list, you should also choose Action after Submits whether you would like to redirect the visitors directly to the Cart, Checkout or Stay on the Page page after filling out the Calculator form.
In the next option, you will need to select the total field to charge the customers.
By default, it is for a calculator with a single Formula element.
However, in case you have a calculator form with more than one total element, you need to summarize them using an additional Formula element.
To make more clear this field, let's see another example of the calculator. In this example, we have four total elements:
In this calculator, there are a total element for the loan amount, annual interest rate, total months, and the total summary which sums ups all three totals.
In the main total summary field, the loan amount, annual interest rate, and the total months are summed up. That is why we will use the last total element in our Woo Checkout:
In the next step, go to your Calculator form page, fill out your form, and then click the Add to cart button to see your Calculator form on the Cart page, Checkout Page or Stay on Page.
The string “Add to cart” comes from the Cost Calculator Builder PRO plugin and can be translated using the Loco translate plugin.
Stay on Page after submitting:
Stay on Page option allows the user to use the calculator multiple times with the same product when Replace Product option is disabled.
Redirection to the Cart page after submitting:
As you can see, the price of the Calculator Product is changed to the price of the Total Summary of Calculator Form.
Redirection to the Checkout page after submitting:
Customers should fill out the Billing details form and click Place order. After that the page with WooCommerce order details opens:
Please make sure that the default WooCommerce pages (Cart, Checkout, etc.) are configured and set under WooCommerce Settings > Advanced tools
The orders appear on the WooCommerce orders section:
By opening the order, you can find details of all selected options from the calculator:
Change Product Quantity Based on Calculator Fields
This section of the WooCheckout tab in the individual settings is designed to give you more control over the product quantities in the shopping cart based on the inputs from the user. Essentially, it allows for the automatic adjustment of the quantity of a product added to the cart, according to the specific fields in your calculator.
For example, if you have 100 T-shirts in your product and there is a calculator field that asks for the number of T-shirts that the user wants to order after the order is made the number of T-shirts will automatically be decreased.
This feature enhances the flexibility and accuracy of your e-commerce store by ensuring the product quantities match the user's requirements as calculated through your customized fields.
To set up the feature follow these steps:
Set Up WooProduct Quantity
In your WooCommerce product make sure you have entered product quantity.
Follow WP Dashboard > Products > All Products > Edit:
Go to the Inventory tab and enable Stock Management, then enter the quantity:
Do not forget to save the changes ✅
Dynamic Product Quantity
Now go back to the calculator you need and move to the individual settings. Enable WooCheckout and choose the product you need:
Other settings can be adjusted according to your needs.
Enable the Dynamic Product Quantity and select the calculator fields that you want to take the quantity value to subtract from WooProduct Quantity:
You can choose any field(s) that returns a numerical value (quantity field, slider, dropdown, radio, etc.) here.
However, when two or more fields are selected, the last field that is not hidden will be considered for updating the product count.
Now you are done, once the user makes an order, the selected amount will be substracted automatically ✅
If the user selects more products than are available in your store, they will receive a warning and will not be able to submit the order:
Last updated