Call-back icon  Sales: Call 877.832.5289 (N America)|310.295.4144 (International)

Magento

eCommerce Software for Online Growth

Magento Forum

   
Multipal Currency SideBar Cart Subtotal Total Bug 1.1.3, Solution
 
CKD
Member
 
Avatar
Total Posts:  31
Joined:  2007-11-21
Saitama, Japan
 

Hi,

I found what I believe to be a bug in the latest release when it comes to displaying the Cart Subtotal in the sidebar. 

If you have more than one currency, the only currency that will display correct is your default currency, all the others will be way off.

Here is how I fixed it.

Find template/checkout/sidebar.phtml

Line 38 or so:

<?php echo Mage::helper('core')->currency($this->getSubtotal()) ?>

Change to this:

<?php echo Mage::helper('core')->formatPrice($this->getSubtotal()) ?>

This worked for me, maybe there is a better solution.

Regards,

CKD

 
Magento Community Magento Community
Magento Community
Magento Community
 
chiaraweb
Guru
 
Avatar
Total Posts:  643
Joined:  2008-03-21
Aviano ~ Italy
 

Hi

do you know also how to show the totals instead of subtotal?

Thanks
Chiara

 Signature 

Non criticare cio’ che non puoi capire.
Bob Dylan

My Live Magento Shops
http://www.ecobaby.it
http://www.pesicampione.it

 
Magento Community Magento Community
Magento Community
Magento Community
 
luric
Jr. Member
 
Avatar
Total Posts:  13
Joined:  2008-02-13
 

Hi,

thanks a lot for this fix. The Cart SubTotal looks like expected now, but the items listed under “Recently added item(s)” (same Box in the sidebar) are still displayed with the wrong currency.

I had a look at - template/checkout/cart/item/default.phtml - but I’m afraid this doesn’t seem to be the right place.

Any help or guidance is much appreciated.

Take care… C.

Image Attachments
single_item_currency_bug.jpg
 
Magento Community Magento Community
Magento Community
Magento Community
 
luric
Jr. Member
 
Avatar
Total Posts:  13
Joined:  2008-02-13
 

Thanks to the Template Path Hints I was able to figure out the right template file:

template/checkout/cart/sidebar/default.phtml

Unfortunately I can’t see any currency related code snippets. Here’s the teplate code:

<?php $_item $this->getItem() ?>
<li>
    <
div class="product-images">
        <
a href="<?php echo $this->getProductUrl()?>"><img src="<?php echo $this->getProductThumbnail()->resize(50, 50)->setWatermarkSize('30x10'); ?>" alt="<?php echo $this->htmlEscape($this->getProductName()) ?>" width="50" height="50" /></a>
    </
div>
    <
div class="product-details">
        <
a href="<?php echo $this->getDeleteUrl() ?>" onclick="return confirm('<?php echo $this->__('Are you sure you would like to remove this item from the shopping cart?') ?>');" class="widget-btn"><img src="<?php echo $this->getSkinUrl('images/list_remove_btn.gif') ?>" alt="<?php echo $this->__('Remove Product') ?>" /></a>
        <
a href="<?php echo $this->getProductUrl() ?>"><?php echo $this->getProductName() ?></a><br />
        <
strong><?php echo $this->getQty() ?></strongx

        <?php $_excl 
$_item->getPrice(); ?>
        <?php $_incl 
$this->helper('checkout')->getPriceInclTax($_item); ?>
        <?php 
if ($this->helper('tax')->displayCartPriceInclTax()): $_excl $_incl; endif; ?>

        <?php 
echo $this->helper('checkout')->formatPrice($_excl); ?>
        <?php 
if ($this->helper('tax')->displayCartBothPrices() && $_incl != $_excl): ?>
            
<br />(<span><?php echo $this->helper('checkout')->formatPrice($_incl); ?></span<?php echo Mage::helper('tax')->__('Incl. Tax'?>)
        
<?php endif; ?>

        
<!-- item custom options -->
        
<?php if ($_options $this->getOptionList()):?>
        
<div class="truncated">
          <
div class="truncated_full_value">
            <
dl class="item-options">
                
<?php foreach ($_options as $_option) : ?>
                
<dt><?php echo $this->htmlEscape($_option['label']?></dt>
                <
dd>
                    
<?php if (is_array($_option['value'])): ?>
                    <?php 
echo nl2br(implode("\n"$_option['value'])) ?>
                    <?php 
else: ?>
                    <?php 
echo $_option['value'] ?>
                    <?php 
endif; ?>
                
</dd>
                
<?php endforeach; ?>
            
</dl>
          </
div>
        <
a href="#" onclick="return false;" class="details"><?php echo $this->__('Details'?></a>
        </
div>
        
<?php endif;?>
        
<!-- / -->
    </
div>
</
li>

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
Sales: Call 877.832.5289 (North America) 310.295.4144 (International)
© Copyright 2008 Varien. Magento, eCommerce software, is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
52305 users|461 users currently online|105625 forum posts