# Price Calculation#

• Discount:
Apply a discount to your Option Set Calculation. Discounts can be fixed values, percentages or calculated using a formula. Discounts are an Elite and Ultra feature. Discounts should be set on a per UNIT basis.
When Automatically Add Option Values is Checked, the application will add all values for all options within the option set together and set the products price.

When Automatically Add Option Values is Unchecked, you can write your own custom price formula for the calculator. Any option that is part of the calculator, will be available for use in the calculation. The value returned from this calculation will be the UNIT price of your product.
• Unit Price Calculation:
Write a formula to calculate your final product price. Use calculation variables and common math functions like +, -, *, /, (, and ). Formulas will follow BEDMAS.

If your formula is not validating try adding spaces between the elements.

## Unit Price#

Unit price means the price of a single unit (quantity of 1) of your product.

Shopify prices products on a per UNIT basis, not on a multiple product basis.

This means if you want to sell 1,000 units for \$1,667 total, the unit price of these items would need to be \$1.667.

You cannot price a product for units smaller than 0.01 and the unit price of 1.667 is impossible to achieve. The unit price must be either \$1.66 or \$1.67. That means the final price must be either \$1,660 or \$1,670.

If you want to sell large number of units at a very specific price you should:

• Sell as a bundle with a quantity of 1 and describe the real quantity in a calculator option.
• Price on a Per UNIT basis instead.

## Calculation is Total Price Not Unit Price#

This checkbox tells the calculator you have calculated a total price in the Unit Price Calculator field instead of a Unit Price. You should really avoid doing this whenever possible. Typically, you want to check this box if you have included product_quantity in your unit price calculation field.

When this is checked, the calculator will divide the calculated price by the quantity to determine the actual unit price. The issues described above may occur.

If you do not check “Calculation is Total Price Not Unit Price”, you may find the items added to cart are very expensive compared to what you expect. Each unit will be priced at the value you expected for all units.

## Display Total Price instead of Unit Price#

Typically you will include product_quantity in the Unit Price Calculation because you actually want to display the total price for all units not because you want to actually price each unit this way.

Checking “Display Total Price instead of Unit Price” lets you show the total price and while still calculating the unit price of a product. By calculating the unit price, you have more control over the proper pricing of your product and guarantees that what you display to users is the same as the price actually added to cart.

This is the recommended approach when calculating pricing.

This determines what will happen when a product is added to cart. This allows you to use different add to cart methods for each calculator. Selecting Default will use the method selected in Settings -> Add to Cart Method > Default Add to Cart Method. All other value will use the selected method for the Calculator.

It is important to know that you must configure the add to cart methods in Settings before they will work.

For the easiest configuration method, use Popup.

If you are using a free Shopify theme, the best method is to use Cart (DOM) or Ajax Drawer (DOM). Both these methods have built in configurations so they are easy to set up. If you are using a different theme, it will require some developer knowledge to configure.

• Default will use the add to cart method set in Settings.
• Popup will use the built in popup add to cart method. This will work out of the box but there is still some configuration you should do.

• Cart (DOM) redirects the customer to the /cart.js page and uses DOM selectors to hide some Shopify data that is missing while products are added to cart. This must be configured or you will get \$0.00 products showing on the cart page.

• Ajax Drawer (DOM) will open a slide out cart and use DOM selectors to ensure the right info shows in your cart drawer. The cart is opened and integrated through the Add to Cart Script found in settings.

• Spinner will show a spinner (customizable) when products are added to cart. Users can either be directed to cart page or left on the product page after Shopify has completed adding the variant to the backend. Shopify uses a queue process to do this and this can be slow. No configuration is required for this method but you might think it is slow.

• Email will send an email to the customer when the Add to cart button is clicked instead of adding the item to cart. This method allows you to send email quotes for your products. The email is fully customizable. For more info on how to set this up see Email add to cart method.

• Disable add to cart when parent product is out of stock: Checking this option will disabled the add to cart button and display out of stock when the parent product is out of stock. First / Default variant. You should disable out of stock variant options if you don’t want those to be added to cart. By disabling the actual out of stock variant option they will not be selectable and therefore not able to be added to cart through the application.

# SKU and Inventory Location#

Expand this section to modify SKU, Inventory Location and Shipping Profile.

SKU:

Same as default variant SKU: Set the new variant SKU to the same as the default product variant set in Shopify. Default value for new calculators. Not setting a SKU in Shopify can lead to cases where products fail to add to cart. See this Products are not adding to cart.

Same as selected variant SKU: Set the new variant SKU to be the same as the selected Shopify variant SKU set in Shopify. When using this option you should show a variant picker on your product page. If you dont include a variant picker, the SKU will be the default variant.

Created by app (random): The calculator will generate a random SKU for the new variant. This SKU will always start with “opc-“.

Has no value: Does not set any SKU for the new variant. Not setting a SKU in Shopify can lead to cases where products fail to add to cart. See this Products are not adding to cart.

Calculated from a formula: Set the new variant SKU based on a formula. When using this option you can add your own free form text and variables which should always be encapsulated by {{ }}. The value set in the SKU will depending on the type of option used and will either be the display name or an input value provided from customer.

The image below would return the following sku:

“15×24-white”

# Price Labels#

Expand this section to modify Calculator Price Labels.

• Calculation Label: Calculation Label appears in front of your Products Final Price. <Label> <Prefix><Store Currency><Price><Suffix>
• Calculation Minimum: This is the minimum price a product must have. If the price is calculated as less than this value, your price will be set to the Calculation: Minimum value.
• Decimals: Number of decimal places to show.
• Calculation Prefix: Calculation Prefix comes directly before the product price and before the story currency symbol. <Label> <Prefix><Store Currency><Price><Suffix>
• Calculation Suffix: Calculation Suffix comes after the product price. <Label> <Prefix><Store Currency><Price><Suffix>

# Product Weight Calculation#

Write your own product weight calculation formula. This will be evaluated when a product is added to cart and the resulting weight will be applied to the product to ensure shipping calculations are accurate.

Product weight calculations are an Elite and Ultra plan feature.

# Run a script after product added to cart#

This is an advanced setting generally not recommended for most users. It lets you apply an option set specific add to cart script. This would allow you to open a slide out cart drawer on one option set, a notification popup on another and do something entirely custom on another option set.

This is the same settings found under Settings -> Add to Cart Script but in this case, it only applies to the option set where as the other settings, apply application wide when this setting is not turned on.

We include several built in scripts for Shopify free themes. You can also write your own for you custom theme.