Magento translate tags - magento

i have a magento installation wich works pretty well.
So far so good, i've set up different Store Views to manage the store in different languages.
Now, i have the following problem:
I've set up tags from the administration and assigned them to the different products in the different store views (let's say i assign the tag "Buch" to a Product in the german store view, i assign the tag "Book" to the same product in the english store view.
If then a user clicks on one of the tag-names it shows the list of products with the same tag.
But if he changes store-view then, magento keeps the same tag and says that there are no products with that tag.
This seems quite logically, because tags (as far as i understood) are not translatable.
What i want magento to do, is that if a user changes store-view in the list with the products, use a translation of the tag (lets say, a user sees all the products with the tag "buch" and changes the view to english, he sees all the products with the tag "book", or, if that is not possible, when changing store-view, that he always goes to the store homepage.
Thanks 100000 times in advance =)

The only solution I see is to translate tags manually. To do this you have to modify all occurrences of your tags in your templates. For example in template/tag/cloud.phtml replace
<?php echo $this->htmlEscape($_tag->getName()) ?>
with
<?php echo $this->htmlEscape($this->__($_tag->getName())) ?>
And then add the translation for each tag into app/design/frontend/[your-interface]/[your-theme]/locale/de_DE or any other language.
As an alternative solution you can create a custom module which will override $_tag->getName() function and add $this->__() in there.

Related

Not All Attributes Displaying in Magento Frontend Attribute Table

I have products with 20+ attributes (mostly technical specifications) populated in the backend of a Magento EE 1.12 store.
Problem is, on the frontend, only the first handful of specs are displayed.
If I move attributes up and down in the "Manage Attribute Sets," I can get ones further down the list to display on the frontend, at the expense of other attributes that get moved down the list.
(Setting up different attributes in different groups did not solve the problem.)
All of the attributes are Yes for "Visible on Product View Page on Front-end."
Here's an example: http://www.topbulb.com/mh100w-c-u-ed28-ps-bulb-100w-pulse-start-metal-halide-coated-mogul-base
Under the last spec in the table is another populated attribute. It's not showing in the code, but it should be.
How can I get Magento to display all of the specs?
Fixed this one this way.
Original code in template/catalog/product/view.phtml
<?php foreach ($_helperCategorylist->getProductAttributes($_product,22) as $_attributeName => $_attributeValue): ?>
I upped the $_product,22 to $_product,42 and the rest of the attributes showed up on the frontend.

Different product page layouts on different stores with magento multi-store

So here is my quandry..
I have three stores all with seperate themes.
I want the actual layout of the product page to vary between stores. So for instance I would like to include full description on one and only short descitopn on the other and would like to add a tag line field in another. Basically all three will need complete sepearate layouts.
I think the product page layout is drawn from app/design/front/base (as a standard layout).
Can I include the relevant files (and directories) from base into app/design/frontend/default/theme to allow me to achieve the above?
I think the file I need to edit/copy is the view.phtml? Can you confirm this also?
You need to also copy catalog.xml to related theme of store. If want to remove description or add other details of products.
you have to copy view.phtml to related theme of your store and modify/add/delete the code in view.phtml
to remove anything just comment the code in view.phtml file.

Magento Store View - Incorrect Currency Displayed

I've gone through and set up an additional store view for our Magento store. The purpose of this view is to allow the display of different currency (for now) with future plans to allow language, content, etc based on store view.
Everything seems pretty normal. When I go to www.example.com/au - I get the standard version of the site with $AU as the currency.
When I navigate to www.example.com/us - The proper currency conversion is happening, showing in $US, but only in the mini-cart and checkout. The category and product view pages are still displaying the $AU value.
Those template files were completed by a different developer, and so I'm assuming they used the wrong function to grab the price of each item. They used:
<?php echo number_format($_product->getPrice(), 2) ?>
I'm thinking I need to toss in the proper function that grabs the price based on store view id, but I'm having difficulty tracking this down.
Any help, of course, and as always, much appreciated.
Update:
I ended up using this, and it works how I wanted:
$this->getPriceHtml($_product, true)
I know this is old but I came across this while looking for an answer the same question.
You can use:
Mage::helper('core')->currency($_product->getPrice())
This formats the price (removes trailing zeros) and converts to the correct currency. Also works if the user changes their currency.
Try
<?php echo $_product->getFormatedPrice(); ?>
it will format price according current store currency rules (see Mage_Directory_Model_Currency::format() for more info).

How to Retrieve Magento Core Variables in CMS Blocks or Pages?

Changing templates isn't an option in my situation and even so if I make a full HTML page with just two integrated "product blocks: (product name, product image, product price, buy me)", it seems easier to just call the two products you need and insert them directly.
So I'm curious to know if I can retrieve Magento {{variables}} such as product names, images, prices,... . I'm perfectly happy to use Magento Custom Variables to create functions to retrieve these, but I have no idea as to where to start. Any ideas would be appreciated.
As far as I know, it's not possible, nor is it sensible, to do this all from the CMS page.
You're best bet would be to create a widget. Widgets are reusable template tags that are very similar to the blocks used in the Magento layout system.
Once your widget is made, you can then call the widget in the CMS page with a product option, {{widget type="mywidgets/productname" product_id="1"}}, and modify the widget's output based on the product id entered.
The tutorial I've linked to is very good, and should be a great starting point.

Magento admin section

Hai
In my magneto project, admin side invoices, I want to display the product name, sku and
manufactures, is it possible???
I know that when clicking View Link I can show, but I want to show the details in the table in the invoices page
Probably the best place to start is:
/app/design/adminhtml/default/default/tempalte/sales/order/invoice/view/
Everything within the /app/design/adminhtml/ is where you'll want to go to edit any available templates for the backend.
Remember that Magento is full of magic methods. So, often times if you want to output a particular attribute, simply call something like: echo $_item->getManufacturer();
Hope that helps.

Resources