Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
Hi,

Maybe there's a solution that eludes me.

I have a basic calculation for a cart like that:
Code: Select all
<cms:set varprice50='0.14' />
<cms:set p50ss="<cms:number_format "<cms:div '50' var />" decimal_precision='0' />" />
<cms:set area50="<cms:mul '50' p50ss />" />
<cms:set price50="<cms:number_format "<cms:mul area50 varprice50 />" decimal_precision='0' />" />
<cms:set p50kg="<cms:number_format "<cms:mul area50 '0.0016' />" decimal_precision='0' />" />
<p>
Size in cm = 50 x <cms:show p50ss /> cm<br />
Price in USD = <cms:show price50 /><br />
Chargeable Weight = <cms:show p50kg /> kg
</p>


But I tried things like:
Code: Select all
<cms:set price50="<cms:number_format "<cms:mul (<cms:mul '50' p50ss />) varprice50 />" decimal_precision='0' />" />


And it does not work.

Any way to include variables into other variables for calculation purpose?
I guess I have the syntax wrong.

After going through many possible scenarios, I thought I just asked...

:)
ok, got it.

Code: Select all
<cms:set price50="<cms:number_format "<cms:mul "<cms:mul '50' p50ss />" varprice50 />" decimal_precision='0' />" />
2 posts Page 1 of 1
cron