1

i have a different request my price should look like.Its only because my country is currently in currency changing period. So i need to price look like this enter image description here

It doesn't matter in what currency but i thin u get the idea. price should apear everywhere like this 500US/300EU . This is just for information . Completed order bill will be formed in bank page form. But its the law requested to show 2 prices .

1 Answer 1

2
<?php
$exchangeRate=(the rate of exchange between currencies);
$price=$product->getPrice();
$differentPrice=$product*$exchangeRate;
$formatedPrice= $price . '/' . $differentPrice;
?>
<span><?php echo $formatedPrice ?></span>

something like that should work.

Alternatively you can create a separate price attribute in admin for your products which will have the new price within it. However, I feel this option will be a bit labor intensive depending upon how many products you have. The code would be quite similar to what is above but instead of the exchange rate business you'd just have two getFunction() calls.

6
  • Im sorry i forgot to tell that im a total niewbie in this stuff. Where should i put this code? Commented Nov 26, 2014 at 19:04
  • try some place like .../template/catalog/product/price.phtml Commented Nov 26, 2014 at 19:41
  • doesnt work gives error. Commented Nov 26, 2014 at 20:27
  • what does that error say? Commented Nov 26, 2014 at 20:48
  • Fatal error: Call to a member function getPrice() on a non-object in C:\xampp\htdocs\app\design\frontend\base\default\template\catalog\product\price.phtml on line 474 Commented Nov 26, 2014 at 20:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.