I need add a country selector in the header section, next to the currency selector. How is the right way to do this?
I realized that there was not much information in my question, so it was misunderstood. I apologize and give more information now:
I am developing a plugin for Magento 1.9 that needs to modify some information in the shop depending on the country of the customer. So I need to display an additional country selection box in the page header, that does not change the store view but only delivers the selection to my plugin. Also I will initialize the country through GeoIP.
The problem is that I am still not able to find a way to insert something in the top line of the page, next to the language and currency selectors. And of course this must work for any theme the final shop might install.
I have read something about blocks in Magento, but I am not sure which block to choose and how this would work without having to create a theme of my own. I cannot deliver the plugin with a separate theme, obviously. And do I have to overwrite this block completely or can I append to it?
My layout XML file (frontend/base/default/layout/pluginname) looks like this:
<?xml version="1.0"?> <layout> <default> <reference name="header"> <reference name="top.container"> <block type="page/switch" name="my_country_switcher" template="myplugin/controlcountry.phtml"/> </reference> </reference> </default> </layout>
Any pointers in the right direction are welcome.