我允许用户选择自己的货币来查看产品价格。但我希望他们总是用基础货币支付购物车,这是欧元。
就像这个store一样,您可以在括号中看到您选择的货币,在基础货币(欧元)旁边,
是否有可能在Magento 1.8中实现这一目标?
这是我的货币选择器的代码。
<?php if($this->getCurrencyCount() > 1): ?>
<div class="form-micro">
<select onchange="window.location.href=this.value" name="custom-currency-selector" id="custom-currency-selector">
<?php foreach ($this->getCurrencies() as $_code => $_name): ?>
<option value="<?php echo $this->getSwitchCurrencyUrl($_code)?>"
<?php if($_code == $this->getCurrentCurrencyCode()): ?>
selected="SELECTED"
<?php endif; ?>>
<?php echo $_name ?> <?php echo Mage::app()->getLocale()->currency($_code)->getSymbol() ?>
</option>
<?php endforeach; ?>
</select>
</div>
<?php endif; ?>
这样做的问题在于它会将您在结账时应支付的基础货币(欧元)更改为您选择的货币,例如磅。
所以,我只是想克隆价格而货币选择器只转换克隆价格而不转换原价/基价(欧元)?
<?php echo $this->getPriceHtml($_product) ?>
<?php echo $this->getPriceHtml($_product, false, '_clone') ?>
有可能吗?