Instant Option Price Calculator

  • Instant Option Price Calculator

This OpenCart extension provides an alternative product option price calculation. The standard OpenCart price calculation only adds or subtracts the prices of the chosen product options to the total product price, whereas this extension offers more complex option price calculations using a pre-defined option price formula.

Also, on the frontend product page, whenever the user selects an option the total product price is instantly re-calculated and displayed. This is different from a standard OpenCart where the total product price won't be seen until the user goes to the cart checkout.


Requirements

This extension requires a pre-installed VQmod software (a dynamic OpenCart modification system based on XML specifications).

You can get a free Integrated VQmod either from:

http://www.opencart.com/index.php?route=extension/extension/info&extension_id=19501

Or from:

https://github.com/vqmod/vqmod/releases



Installation

Simply upload the folders and files from the 'upload' directory to your OpenCart server's main directory.


The following files are uploaded:


system/helper/option_price_calculator.php
vqmod/xml/option-price-calculator.xml
vqmod/xml/option-price-update.xml


Then go to the Opencart admin backend at Extensions > Modifications and click on the Refresh button.



Usage

To overwrite the standard OpenCart option price calculation, go to a product page in the admin backend and click on the  'Option' tab. You will see 2 additional optional fields:

Option Price Formula
Option Price Comment

Option Price Formula Example:

Assuming the product options 'width' and 'height' are defined, and you want to multiply the values of width and height by 15% of product price and add 1.55 to it then use this formula:

option_value('width') * option_value('height') * 
(product_price()*15/100) + 1.55

Notice that an option price calculation based on a formula is always done before taxes (e.g. VAT) are applied!

Possible operators:

?, :, 
|| (OR), && (AND),
+, -, *, /

Relational operators:

<, <=, ==, !=, >, >=

Overwrite operator precedence:

Use brackets

(  )

for this.

Built-in functions:

option_value( <option> )
option_price( <option> )
product_price()
strlen( <expr> )
mb_strlen( <expr> )
exist_option( <string> )
extract_integer( <expr> )

Note: <option> is usually an option name, <expr> is an expression



Further help and customized versions

This extension has been successfully tested for a standard  OpenCart 2.1.0.2 and 2.3.0.2. It should also work with other OpenCart 2.x versions.

If you need a customized version of this extension, let us know and we can create one for a charge.


Write a review

For support and technical enquiries please use our regular Contact Us page. This is for Reviews only!

Note: HTML is not translated!
    Bad           Good


  • Product Code: opc-vqmod
  • Availability: In Stock
  • £45.00


Available Options