Get fresh WordPress Content delivered in your inbox with warpspeed!

learn wordpress wplift wordpress rocket

WooCommerce is a popular shopping cart plugin for WordPress, and it’s one of the most popular plugins available with over 23 million downloads as of April 2017. It’s even helped WordPress become one of the globe’s most widely used ecommerce platforms, but like all platforms, it does have its limitations. This includes the ability to use custom options with advanced price calculations. That’s an issue the developer of Uni CPO hopes to solve.

Uni CPO Overview

Uni CPO

Uni CPO, or Uni Custom Product Options, is a WooCommerce plugin, as you probably guessed. A lot of plugins, extensions and even a few default settings allow you to add different product attributes and custom fields that give you the ability to create variable products, but it may not be enough for some.

This is especially true for businesses that build or make custom-made products for customers where adding a few extra product options inside of WooCommerce just isn’t enough.

Uni CPO gives you the ability to add custom product options to each individual product, but it goes a few steps further by allowing you to build formulas using those custom product options and ultimately giving you the ability to offer custom pricing based on a variety of different factors, such as the area of a room.

Let’s go over the process of adding custom product options and building a basic formula to give you a better understanding of how this plugin works.

Adding Custom Options

Let’s start by going over how to add custom options. We’ll use a flooring company whose products are different types of carpet, floor tiles and wood materials as an example. Customers shopping at a store like this need to order the right number of supplies based on the area of the room they need to floor.

So, what we’ll be doing is adding a custom option for the length of the room, a custom option for the width and a formula that will calculate the area and final price for the customer automatically, right there on the product page.

Uni CPO - Complete

You start off by adding a new product in WooCommerce as usual, except there are now three new tabs in the Product Data screen option.

WooCommerce - Uni CPO Tabs

If you don’t add a price in the Regular Price field under the General tab, you’ll get this warning when you open the CPO Price Formula tab:

WooCommerce - Uni CPO Price Formula

The Display Custom Options on the Product Page and Enable Price Calculation Based on Custom Options options need to be enabled in order for this plugin to work correctly.

Uni CPO - Enable Options

Here’s a screenshot of the CPO Price Formula tab in its entirety in case you’re interested.

Uni CPO - Price Formula Tab

Next, we need to create our product options. I created a dummy product called Glazed Ceramic Floor Tile and gave it a price of $1.29/square meter. Customers need to enter the length of the room they need to floor in meters as well as the width of the room they need to floor, so we need to create two custom product options, one for length (m) and one for width (m).

We need to open the CPO Price Formula tab for this. I’ll select Create Options since this is the first product I’m using this plugin for, but as you can see, you can attach a previously made custom option once you’ve created it. This saves you the trouble of having to do all of this manually for every product you create.

Uni CPO - Attach Option

Here’s a screenshot of all of the custom fields you have to choose from.

Uni CPO - Custom Fields

Every customer is going to have a different length and width to add, so preset options won’t work. I need to select Text Field, and edit it.

Uni CPO - Edit Text Field

I’ll start by creating a custom option for length. There are a number of different fields you can use here.

Uni CPO - Edit Settings

A field slug of “floor_length” or “room_length” would be appropriate for our purposes. I’ll make this option required, and I’ll set the Type of “Input” HTML Tag to Double since I only want numbers to be entered in this field and customers will be using decimals. If you want whole numbers only, use Integer.

Uni CPO - Field Slug

Here’s how I set up the rest of the fields in the General Settings tab.

Uni CPO - General Settings

Here’s how I set up the Display Settings tab.

Uni CPO - Display Settings

I also created a custom option for the width, but I used a field slug of “floor_width” and a Header Text of “Width (m).” You can add more options if you want. For example, the developer created a similar custom option for a custom banner product and used the Select Field option type to add options for materials. This allows you to factor the cost of materials into your final price.

Creating Formulas

Now, I need to go back to the CPO Price Formula tab, switch the Enable Using of Non-Option Variables setting to ON, and add my variable as well as my formula. Thankfully, they’re right there for me to copy.

Uni CPO - Variable Formula

Now, I can create my final formula. If you look under the Product Price heading, you’ll notice a variable for my product’s price has been created since I entered it in the Regular Price field earlier.

Uni CPO - Product Price Variable

This allows me to multiply my area variable (uni-nov-cpo-m2 (meters squared)) by my price variable since my price is $1.29 per square meter.

Uni CPO - Formula

Here’s what the product page looks like when all is said and done.

Uni CPO - Product Page

In short, when a customer enters the length and width of their floor in meters, the plugin will use the first formula I created to calculate the area, which is represented by the variable {uni-nov-cpo-m2}. It’ll use the second formula I created to multiple the area by the price per square meter to show customers the total price it’ll cost them to do their entire floor with this particular tile.

Uni CPO - Final Price

Final Thoughts

This is a powerful plugin that comes with a lot of features for a small price, giving you an unlimited number of ways to use it no matter how complicated your or your client’s pricing structure is.

We gave a basic demonstration of this plugin in this review, but there are a lot of features we didn’t cover, such as its Conditional Logic, which allows you to use several different formulas for complicated calculations and even weight calculations for shipping rates.

If you want to learn more about Uni CPO or try it out for yourself, visit its CodeCanyon product page or the developer’s official website. It’s available for $24, as of April 2017.

Details/Download Official Website

Published:

Last updated on:

Lyn Wildwood is a freelance blogger and avid WordPress user. She loves sharing new tips and tricks with the WordPress community.

2 thoughts on “Uni CPO Review: Using Custom Product Options to Calculate Price in WooCommerce

  1. Hi Lyn!.
    One question.
    How to display the value of the radio button in the dynamic field. Not the price, but the value. For example color: red?
    Thanks.

Comments are closed.

Join 40,000 WordPress Astronauts
AND GET OUR LATEST CONTENT IN YOUR INBOX WITH WARPSPEED

We will never spam you.
close-link
siteground coupon
Get 60% Off the No. 1 WordPress Hosting!