Advanced product price calculation
Advanced product price calculation (calculator)
Advanced product price calculation (calculator)
This add-on allows you to perform complex calculation of product price depending on the user input parameters. Calculation is based on administrator-defined template formula. Each product have personal formula for calculating product price. In the formula can participate the following variables: product options, digital product features, global variables, product price, product list price, amount of products to order, product in stock, product popularity.
The add-on is compatible with the entire cs-cart 4.x branch with such editions as CS-Cart, CS-Cart Ultimate, Multivendor, Multivendor Plus, Multivendor Ultimate.
If an add-on conflicts with your theme, please contact via our Help Center.
We cannot guarantee that the add-on will work correctly on projects with a large number of custom or third-party add-ons.
After success payment, your order will be automatically marked as Paid within a few minutes. Once order changed to Paid status - add-on License activation passed success and you will received an e-mail with confirmation the receipt of payment and a second e-mail with a download add-on link. You can also download the add-on in our License Management section of our website. To install the add-on on your website, please follow these steps:
- Download the latest version of the add-on on our website in the "License Management" section or via the link sent by e-mail.
- Go to Add-ons → Manage Add-ons and in the gear button, select Manual Installation.
- Select the downloaded file and complete the installation of the add-on.
Add-on installation is completed.
After successful installation of the add-on, it will be ready to work with the default settings. You can always change them if you need to. To do this you need to log in to the admin panel, go to Add-ons → CS-Commerce Addons → Advanced Price Calculation.
General settings:
- Mode - Simple or professional calculation logic. Profession support php programming on calculation formula (any logic with if/else logic, and any logik based on your php code with variables). Simple mode support only arithmetic calculation.
- Debug errors - Enable/disable error notice will be display when product formula have syntax errors or undefined variables.
- Check amount - Enable/disable tracking the added quantity of product. Enable this checkbox if you use product amount in your formulas. In this case, when user change amount, ajax will request to check new price depending of selected amount.
Simple mode.
Professional mode.
First, we need to add the necessary options to the product. If the required option is not yet there, go to the Products -> Options page and click "Add option".
In our example, we will create the Size option with the "Select box" type and specify three variants for it (S - 0%, M - 2%, L - 3%).
The option value must be written in the "Modifier" field.
Click "Save".
Then go to the product editing page -> "Options" tab and add our option.
Click "Save". We have successfully added an option to the product!
To add a formula to a product, go to the product editing page in the "Advanced Price Calculation" tab. This tab shows all the variables available for use in the formula (written in square brackets):
- Global variables (Something like constants, visible in all products).
- Option variables.
- Features variables. Feature with the parameter "Filter type" "Number slider". Values are taken from the "Variant" field.
- Other variables (Product parameter variables).
To add a formula to a product, set the Formula "Status" to "Active" and write the formula in the "Formula to calculate new price" field. By clicking the "+" icon next to the variable, you can automatically add it to the formula.
In the example below, we added a formula that increases the cost of the product by the percentage specified in the "Size" option.
Click "Save".
After saving, we can go to the product page on the storefront and change the size of the product to see the changes in the price.
In order for the formula to work in professional mode, you should set "Mode" to "Professional" in the addon settings and save.
For example, let's imagine a situation where the tax rate changes depending on the selected product size. Let's go to the product editing page in the "Advanced Price Calculation" tab. Then we'll write the tax values into global variables and save.
Now the formula for the dependence of the cost of a product on the tax will look like the one shown in the screenshot below. Checking the size in the conditions, we assign the required tax coefficient value, and then multiply the price by it.
The addon also adds a new numeric type for options. To use it, you need to specify the "Number (Add-on)" type in the general option settings.
In the "Settings" tab, fill in the values:
- Default value.
- Min. value.
- Max. value.
- Step.
In the "Options" tab, you can add options for selection.
Click "Save".
In the storefront, this field will look something like this:
In order to have access to add-on upgrades, you must have an active upgrade subscription. If the subscription period has expired, you will only have access to upgrades released before the expiration date of your subscription. You can renew your upgrades subscription in the "License Management" section on our website.
The add-on supports instant upgrades via the CS-Cart Upgrade Center. The built-in CS-Cart Notification Center (bell) will notify you about new versions release of the add-on. Upgrades via Upgrades Center will allow you to switch to a newer version without losing add-on data and settings.
Before start an upgrade process, it is highly recommended to make a full backup of the site (database and files) of your store using the server or hosting methods.
Upgrade through the Upgrade Center
- In the top menu, go to Administration → Upgrade Center;
- In the gear menu, click "Refresh available upgrades"
- Find and add-on on list of available upgrades and click the Download button and than Install button;
- Follow all the instructions that will be shown during the upgrade process;
- It is recommended to clear the CS-Cart templates cache after the upgrades are installed by deleting the var/cache folder on your server or adding the ctpl parameter to the address bar (example: https://domain.com/admin.php?ctpl).
Addon Reinstallation by uninstall old and install new:
Reinstalling an add-on means deleting the add-on's settings and data. Reinstallation will allow you to get a clean installation of the latest addon version. To reinstall the add-on with saving the add-on settings and data, please contact us via our Support Center to provide this service.
To completely reinstall an add-on without saving data, follow these steps:
- Go to Add-ons → Manage add-ons and find the old installed add-on.
- Click the delete button in the gear menu of the add-on.
- Download the latest version of the add-on on our website in the "License Management" section.
- Go to Add-ons → Manage add-ons and in the gear menu select Manual Installation. Select the previously downloaded file and complete the installation of the add-on.
The technical support of the add-on is already included in its price. Before contacting the support center, please make sure you are using the latest released version of the add-on. Old versions of the add-on are not supported by technical support.
To use our technical support, follow these steps:
- On our support center site https://helpdesk.cs-commerce.com/, log in with your account;
- Click on the "Create ticket" button;
- Fill in all the required fields and create ticket (you will receive a confirmation email);
- Expect a response from a specialist (a notification will be sent to your e-mail about the response) in accordance with the regulations of the technical support service.
If you have not received an answer within the time frame specified in the regulations, write us a message to the e-mail [email protected] with the subject of the ticket and we will try to resolve your issue as soon as possible.
Technical support via chat on the site, direct phone calls or e-mail letters is not provided. All help discuss goes through the support center. Carefully study the documentation for the add-on and the terms of technical support before creating a ticket.
We recommend that you familiarize with the general restrictions:
- Fragments of code or some files of an add-on may have a private (encoded) part. The coded part does not create problems on add-on customizations;
- The add-on will work only on those domains that are specified in the user's license. If you try to use the solution the domains of which are not included in the license, the add-on will be automatically disabled;
- Installing on local machines is not allowed by the licensing system. For the add-on to work on an additional domain (alias), specify this alias on the license management page. Up to three aliases are allowed per domain for testing and development purposes. You can change the main license domain yourself on the license management page.
To have possibility to add or change license domains and aliases, the upgrade subscription must be active. To change the license domain of an expired upgrades subscription, you must first renew your subscription.