8 - Creating a calculator from a spreadsheet file (PRO) - HPC
This module will help you in creating product’s price calculator by loading and using the calculation spreadsheet. The calculator uses the same formula described in the spreadsheet to calculate prices for products (with dynamic measurements).
The process contains two major steps.
- Creating HikaShop Product
- Creating HikaPrice Calculator (from spreadsheet)
Creating HikaShop Product
First of all, you need to create your HikaShop Product:
- Click on "Components > HikaShop > Products > New" on the top Joomla! menu
- Insert the name of the Product: HPC will override the HikaShop product features.
- Set a price in "Prices and taxes". Also putting "0" is fine. This is important otherwise, HPC can't attach its features to the product page.
- Save the product by clicking on "Save & Close"
After you've created the HikaShop Product and after you've created your customer input/output fields (See How to create fields) you are now ready to create the calculator.
Creating HikaShop Calculator
To create the calculator, go in the "Calculator" tab and click on "Upload your worksheet":
- Find the calculation sheet using the "Browse" function, select it and click on "Upload"
- Choose the desired sheet from the list and click on "Next"
- From this screen(shown below) the cells in the sheet can be mapped to the ones in the calculator. The Input fields must be set, meaning the fields that will be used by the visitors to insert the data, along with the Output cells that holds the formulas which will show the output values. Anyway, you're required to map the Price field because it's the default field. If the output spreadsheet cell contains a numeric value, a formatted numeric value will be displayed to the visitor (by following the rules of the field). If the output spreadsheet cell contains a string value, a text will be displayed to the visitor.
Once all the fields have been mapped, click on "Next".
You can set a Base Price cell as well. HPC will write this base price as HikaShop Product Price.
- The required information for the calculator will be displayed:
- * Name: This value is only needed to remember what the calculator is for, and to find it in the list of calculators
- Description: A more detailed description of what the calculator does
- Input fields: Show or hide the input fields you want. To show move the item to right. To hide, move the item to left. You can drag&drop the fields on the right to change fields' order.
- Output fields: Show or hide the output fields you want. To show move to the right, to hide move the item to the left. You can drag&drop the fields on the right to change fields order.
- Products: The products that the calculator must be linked to; you can assign the calculator to whole categories.
- Empty cart: If "Yes" it empties the cart when a product has been added to the cart. It's useful for services.
- Themes: The theme used to see the calculator
To modify the mapping of the calculator, click on "Edit Mapping" in the calculator list. To edit the other information click on "Edit".