CalcBuilder Forum

Hikashop calculator

User moon_1824 2015-08-03 12:04:52

Hi,

I'm currently working on a website and have Hikashop installed.
The products sold (floors) are priced by m2 and sold per package. There is a Product Custom Field (inhoud_pak) which contains the contents per package (different values for different products).

I need a calculator on the product page which calculates the amount of packages needed for a certain lengt * width and set the outcome in the quantity field.

I have the CB Price calculator plugin installed which should be capable of "Use your product custom fields values to build price calculations as complex as needed, you can use all math operators, ranges, use data matrix, databases, or even upload an excel file to perform the operations.".

For the calculation I need the value of the custom field (inhoud_pak) for that product so I can calculate (length * width)/inhoud_pak. That value needs to be set in the quantity field in the cart.

How do I call the contents of the custom field for that product and set the outcome in the quantity field in the cart?

Kind regards,
Eric Beernink
Insitevision Webpublishing

Edited by moon_1824 - 03.08.2015 12:10

Moonsoft support 2015-08-03 17:50:04

Hi,
yes, with the plugin you can insert a calculator inside your product pages, and get their custom fields or any other property, as you will have at the code already set the variable:

$idhikaproduct

containing the product id, that you can use to recover any property of the product or any other field of your database.

-- Note: Removed code explanation below as latest version now allows direct calculation of quantities and/or price --


Hope this helps, if you need further help with this please place a ticket at the helpdesk.


Thanks, regards

...
List Manager

Build different lists for your site

Buy now!
...
CalcBuilder

Create dynamic calculators

Buy now!