我有2種語言(EN和RU)的Magento商店設置,並且我沒有修改任何後端代碼,顯示tagId顯示產品列表的頁面。按標籤顯示標題的Magento產品列表以錯誤的語言顯示標題
對於俄語標籤,整個頁面以俄語顯示,除了列表中產品的標題,由於某些原因,這些標題仍以英文顯示。有問題的產品有兩種語言的翻譯。
我試着在core /Mage/Tag/Model/Tag.php和/Mage/Tag/Model/Block/Product/List.php中設置storeId,但沒有運氣,默認代碼設置商店標識在/Mage/Tag/Model/Block/Product/Result.php這樣的:
protected function _getProductCollection()
{
if(is_null($this->_productCollection)) {
$tagModel = Mage::getModel('tag/tag');
$this->_productCollection = $tagModel->getEntityCollection()
->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
->addTagFilter($this->getTag()->getId())
->addStoreFilter(Mage::app()->getStore()->getId())
->addMinimalPrice()
->addUrlRewrite()
->setActiveFilter();
Mage::getSingleton('catalog/product_status')->addSaleableFilterToCollection($this->_productCollection);
Mage::getSingleton('catalog/product_visibility')->addVisibleInSiteFilterToCollection(
$this->_productCollection
);
}
return $this->_productCollection;
}
我搜索過這個問題無處不在,但到處都找不到任何類似的情況。
任何幫助,將不勝感激