Hi All
Id really appreciate it if anybody could tell me how i add 20% to:
<?php echo $General->get_amount_format($Product->get_product_price_only($pid)); ?>
This is an output value in my theme!
Thank you in advance!
Hi All
Id really appreciate it if anybody could tell me how i add 20% to:
<?php echo $General->get_amount_format($Product->get_product_price_only($pid)); ?>
This is an output value in my theme!
Thank you in advance!
Assuming that call returns a String:
<?php
$amount = $General->get_amount_format($Product>get_product_price_only($pid));
$amount = (int)$amount;
$amount = $amount + ($amount/100)*20;
echo $amount;
?>
You can do it in one line, too, it's expanded a bit for readability's sake.
Hi Popper!
I tried it but it doesnt seem to work.
The returned value if set on its own
<?php echo $General->get_amount_format($Product->get_product_price_only($pid)); ?>
Does return a price!
Ok, and what is this price it returns? String, object? We're gonna need a bit of information here.
Exactly..
You must log in to post.