PDA

View Full Version : Using Math with Entities


Brandon MUS
08-23-06, 06:29 PM
Is it possible to add/subtract/multiply/divide entities? I would like to multiply an entity times 0.1. In the docs it shows how to do this as an expression, but I don't know how to display the results.

Simple enough?

Bruce - PhosphorMedia
08-23-06, 08:08 PM
The expression itself displays the results....

Brandon MUS
08-23-06, 08:38 PM
can explain this more? I don't really follow what you mean. I want to something simple like the product of (&mvt:product:price; x 5). What would be the code to do that?

I know that I can use an expression in a conditional:
<mvt:if expr = "(l.settings.product_price * 5 ) EQ 5">
blah
</mvt:if>
but I just want to simply display/echo/print/return the product.

Bruce - PhosphorMedia
08-23-06, 08:48 PM
ah, sorry brain fade...for some in explicable reason MIVA didn't include an "eval" component in SMT...you would have to use something like Wielands Toolkit to display the results of math functions...that being said, when you do eval a formula, MIVA displays the results.

Brandon MUS
08-23-06, 11:13 PM
alright, I think deep down I expected that answer. I'll weigh my options.

Thanks.