我正在我的商店 htt://limamelao.com.br 上测试货币选择器,一切顺利,更改货币时所有页面都正常工作,但是当您在首页更改货币时,没有任何更新!巴西雷亚尔的价格相同。
我正在使用一个名为 GT Speed 的缓存插件和 Varnish Cache。这会是插件问题吗?
关于如何改变这一点的任何想法?
更新 - 这是流行产品的代码:
<?php $avail = false; ?>
<?php
$storeId = Mage::app()->getStore()->getId();
$_productCollection = Mage::getResourceModel('reports/product_collection')
->addOrderedQty()
->addViewsCount()
->setOrder('views_count', 'desc') // most best sellers on top
->addAttributeToFilter('status', 1)//enabled
->addAttributeToFilter('visibility', 4)//catalog, search
->addAttributeToSelect('*')
->setStoreId($storeId)
->addStoreFilter($storeId);
// deprecated
// Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);
$_productCollection->setPage(1, 40);
?>
<div class="popular_box">
<div class="tital">
<div class="hr"><h1>+ Vendidos</h1></div>
</div>
<div id="popular-product-carousel" class="ui-carousel module ui-touchCarousel ui-touchCarousel-horizontal ui-touchCarousel-items-3 ui-touchCarousel-rows-1">
<div class="carousel-mask">
<?php $_iterator = 0; ?>
<ul id="new-product-collation" class="ui-draggable">
<?php foreach($_productCollection as $_product) : $avail = true;?>
<li class="arrivals_price_box item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif; ?>">
<div class="view view-first">
<a href="<?php echo $_product->getProductUrl() ?>"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(248,270) ?>" width="231" height="260" alt="arrivals price 4" /></a>
<div class="sale">
<?php $cdate = date('Y-m-d'); //echo 'frpm:-'.$_product->special_from_date.'----';echo "to:-".$_product->special_to_date.'--';
$a= 0;
if($_product->special_from_date != null && $_product->special_to_date == "")
{
if( $cdate >= $_product->special_from_date)
{
$a = 1;
}
}
if($_product->special_from_date != "" && $_product->special_to_date != "")
{
if($cdate >= $_product->special_from_date && $cdate <= $_product->special_to_date)
{
$a = 1;
}
}
if($a == 1){ ?>
<div class="sale_img"></div>
<?php }
?>
<?php if($this->getReviewsSummaryHtml($_product) != null): ?>
<div class="star_img"><?php echo $this->getReviewsSummaryHtml($_product) ?></div>
<?php endif; ?>
</div>
<div class="mask">
<h3 class="product-popular-name">
<?php
$productName = $this->htmlEscape($_product->getName());
if(strlen($productName) > 25) {
$productName = substr($productName,0,25)."...";
}
?>
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>"><?php echo $productName; ?></a>
</h3>
<div class="price-popular-box">
<?php echo $this->getPriceHtml($_product, true) ?></div>
<div class="product_btn_popular">
<a href="<?php echo $this->getAddToCartUrl($_product) ?>" class="btn_view btn_add_bag btn_add_bag_position info" title="Adicionar ao Carrinho">Adicionar ao Carrinho</a>
</div>
<div class="product_btn last">
<?php if ($this->helper('wishlist')->isAllow()) : ?>
<a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="btn_view btn_view_product btn_view_product_1 info" title="Adicionar a Lista de Desejo"></a>
<?php endif; ?>
<a href="<?php echo $_product->getProductUrl(); ?>" class="btn_view btn_view_product btn_view_product_2 info" title="Ver Detalhes"></a>
</div>
</div>
</div>
<div class="clear"></div>
</li>
<?php endforeach; ?>
</ul></div></div>
</div>
<?php
if($avail == true)
{
?>
<?php
}?>