Instant Option Price Calculator

Instant Option Price Calculator
What is does

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

For OpenCart 2.x releases a pre-installed VQmod is needed. For OpenCart 3.x releases, no extra modification system is required, it uses OpenCart's built-in OCmod and event handlers.


Installation

For OpenCart 2.x releases:

  1. Upload the folders and files via FTP from the 'upload' directory to your OpenCart server's main directory.
  2. Log into the OpenCart admin backend with your administrator account
  3. Go to Extensions > Modifications and click on the Refresh button

For OpenCart 3.x releases:

  1. Log into the OpenCart admin backend with your administrator account
  2. Install the extension via the Extensions > Installer
  3. Go to System > Users > User Groups > Administrator and make sure the access and modify permissions are set for 'extension/module/option_price_calculator'
  4. Go to Extensions > Extensions > Modules > Option Price Calculator > edit to enable this module
  5. Go to Extensions > Modifications and click on the Refresh button



Demo site

admin backend (demo/demo): https://www.mhccorp.com/demo/admin
frontend: https://www.mhccorp.com/demo


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 width by height and then by 15% of the product price and finally 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:
  • ? : (for conditional ternary operator)
  • || && (boolean operators)
  • + - * / % (arithmetic operators)
  • < <= == != > >= (relational operators)

Overwrite operator precedence:

Use brackets
  • ( )
for this.

Built-in functions:

  • option_value( <option> )
  • option_price( <option> )
  • option_weight( <option> )
  • option_points( <option> )
  • product_price()
  • product_weight()
  • product_weight_unit()
  • product_length()
  • product_width()
  • product_height()
  • product_length_unit()
  • cart_quantity()
  • strlen( <expr> )
  • mb_strlen( <expr> )
  • exist_option( <string> )
  • exist_option( <string>[<checkbox>] )
  • extract_integer( <expr> )

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



Further help and customized versions

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

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

What customers say about Instant Option Price Calculator

vasilbekyarov
Great module and great support!
~vasilbekyarov




Price
$60.00

  • Developed by OpenCart Community
  • 12 Months Free Support
  • Documentation Included

Rating

Compatibility
4.0.0.0, 4.0.1.0, 4.0.1.1, 4.0.2.0, 4.0.2.1, 4.0.2.2, 4.0.2.3, 3.0.0.0, 3.0.1.1, 3.0.1.2, 3.0.2.0, 3.0.3.0, 3.0.3.1, 3.0.3.2, 3.0.3.3, 3.0.3.5, 3.0.3.6, 3.0.3.7, 3.0.3.8, 3.0.3.9, 2.0.1.1, 2.0.2.0, 2.0.3.1, 2.1.0.1, 2.1.0.2, 2.2.0.0, 2.3.0.0, 2.3.0.1, 2.3.0.2

Last Update
6 Nov 2023

Created
12 Sep 2016
17 Sales
22 Comments
JNeuhoff
JNeuhoff
Member since: 23 Apr 2010

View all extensions Get Support