Calc Builder Support

Calc Builder support
Public write access is disabled. Please login

matrix pricelist 22.09.2014 22:51

Hi there!

A short question. The customer need to just put one number into the field "ku".
Now, my pricelist is based on quantyties. Example: buy up to 12, the price is 5; buy up to 24, the price is 4; buy up to 36, the price is 3, buy more then 36 the price is 2.

So how i need to create a matrix table?

With kind regards

Re: matrix pricelist 23.09.2014 11:32

you can build a matrix, the most simple one containing all combinations, or containg ranges that you should check when recovering data, but for that simple condition we'd suggest using if statement instead at the code:

(Please replace [ and ] with lower than and greater than chars, they are stripped at the forum text)

//if ku lower or equal than 12 the price is 5.
if($ku[=12) $price=5;
//if ku greater than 12 AND lower or equal than 24 the price is 4
if($ku]12&&$ku[=24) $price=4;
if($ku]24&&$ku[=36) $price=3;
if($ku]=36) $price=2;

//Now you can use $price here for further calculations.

Hope this helps

Edited by MSTeam - 23.09.2014 12:05
Moonsoft Team
Are you satisfied with our products/services/support?
Please help us to keep improving, add a review at  joomla extensions site and  magento connect

Our clients' feedback