Reputation: 163
I have a slight problem with Magento here.
If you look at this page
You will see RED BUTON with title KUPI and price as 9 BAM.
BAM is my currency code, not my currency symbol. I need to replace this "BAM" with "KM".
On checkout everything is fine, all prices are in "KM" not in "BAM".
Code of this part (with button KUPI) is:
<div class="pull-right" id="deal-show-vitals-buy">
<a onclick="submitform();" data-deal_id="<?php echo $_product->getId();?>" href="#"
data-toggle="modal" class="btn btn-large btn-g font-large"
id="buy-button">
<strong>KUPI</strong> <?php echo $this->getPriceCurrency($_product->getPrice()); ?> </a>
</div>
Problem is in this part of code, i think:
<?php echo $this->getPriceCurrency($_product->getPrice()); ?>
Please, any help appreciated
Upvotes: 0
Views: 859
Reputation: 186
The core helper ( Mage::helper('core') ) has a method in it which you can use to format the currency.
<?php echo Mage::helper('core')->currency($_product->getPrice()) ?>
As an alternative, you are able to get the currency symbol as a stand alone option as well.
$symbol = Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol();
echo $symbol;
My recommendation is to use the first option (the core helper) since it is the primary purpose of using helpers.
References Magento Core Helper Documentation
Upvotes: 1