How it works
CFO uses PHP syntax in order to access to variables, options and values of your products.
It will allow you to override the way that OpenCart calculates product price, starting to use your formula logic.
You will be able to access fields in product form and those values entered by the customers when they push “add to cart” button.

Where the formula is written?
You will find a new textbox called “CFO Custom Formula” into “Option” tab of your products.
Use that textbox to write your formula and set “Formula is active” to yes when you are ready.

PHP Syntax
You don’t need to add the classic PHP Tags, CFO will wrap your formula into them.

<?php ... ?>

Variables that can be used in your formula
Each option you have added in a product has a numerical identifier which is internally assigned by OpenCart (CFO will show those identifiers as you see in the attached image as {14}, {15}, {16}, etc).
Every place in your formula where you use those keys will be converted to the selected value when your customers selects or write into options.

Why we can not use option’s names?
CFO uses this option_id instead option’s name because option’s name could change when selecting different languages.

When the formula is executed?
Your formula will be executed when all required fields are filled and “add-to-cart button” is pressed, just before adding the product to the cart (options like File or Date should be filled if they are required too).