Magento Not Translating Wishlist Product Name and Description

半世苍凉 提交于 2019-12-25 01:29:45

问题


I have a developmental Magento Store I'm setting up with two languages. Everything works perfect except the SideBar Wishlist and the "My Account" Wishlist displays the Spanish option no matter what. Everything switches i.e. the "My Wishlist" title header, even the email to friend box that automatically writes in "Please, enter your comments..." changes correctly. But the product name and discription remians in Spanish. I've tried this suggestion here: Wishlist don´t capture store views lenguage

Has anyone figured out how to fix this or what I might have set incorrectly?

Thanks


回答1:


I had this problem as well on Magento 1.6.2CE. - while switching store languages product names remain in default language.

On a file Wishlist\Model\Item.php arround line 319 you need to remove the line of code:

public function getProduct()
{
    $product = $this->_getData('product'); // <-- remove this line

The $product object is reloaded again with the correct store filter.




回答2:


I don't really understand the scenario, but based on your title I had came up with this. By any chance, did you manually code the text on a HTML block?

I have came across with this problem, and what I did is find the code snippets where the text is being called. There I changed it with the code below, instead of directly using the text itself. Hope that it makes sense.

<?php $this->__('Customers'); ?>


来源:https://stackoverflow.com/questions/14299477/magento-not-translating-wishlist-product-name-and-description

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!