Magento is extremely versatile and flexible in letting the developers work with its code base. By working with it, I mean easily overwriting it, even the core files.
While it may seem rather appealing for people who want absolute control over their store so they can do whatever they want to shape the look and functionality, it may not be so when they have installed more than one themes or extensions on their Magento site.
Chances are there will be a few unpredictable problems that seem to come out of nowhere. And they are probably hard to diagnose. This is because all the themes are overriding each other. It’s totally possible.
One theme may have a module that’s not completely switched off by the other theme because the other theme doesn’t have a similar module that overrides it, thus the module of the first theme is used when the other theme is enabled.
This would incur more problems when the themes have more functionalities that need to override or extend the Magento code base, rather than just templates, layouts, or styles, like how a WordPress theme would work. A WordPress theme is rigidly restricted within one folder and there’s not much it can do to manipulate WP core logics. But that’s exactly the opposite of a Magento theme that can do a good lot to Magento. A theme / extension that you upload is able to overwrite the entire Magento installation.
I recently got such a problem and eventually solved it by the help of Jake, who created the Avalanche theme. After I emailed him about the problem and about the potential collision that I believed existed between my current theme and his theme, he got back to me with the right solution – renaming one of the folders of his theme so as to disable that module. And that’s it. The problem was immediately gone.
So remember, don’t install too many themes to your Magento store – it’ll mess things up. At least do your best to just install the necessary ones. For me, mere 2 themes are enough to create a problem that wasted me several hours looking for an answer. For those who are looking for a premium Magento theme, look no further than Jake. He’s the best. Check out his latest post about how to manage & debug Magento extensions.
Some themes come with switch tabs on the product page such as the Modern theme shipped with the official Magento download (as of 1.6.2). Time from time you may wonder how to add your custom ones there with more information regarding the product. The Easy Tabs extension doesn’t actually work with themes that already come with tabs. However, with themes that don’t have tabs already, you should try it.
So how to accomplish this? Here’s a dead simple way.
Adding Custom Tabs on Product Pages
Just follow these simple steps, assuming you are using the Modern theme which is located at /app/design/frontend/default/modern:
- Open /app/design/frontend/default/modern/layout/catalog.xml (or whatever your theme, just change the bold part to your own theme path), and find lines with
that are basically layout directives to add tabs to the product page.
- Duplicate one of the “addTab” <action></action> tags and change the properties according to your needs, such as to this:
<action method="addTab" translate="title" module="catalog"><alias>your_tab_name</alias><title>Your Tab</title><block>catalog/product_view</block><template>catalog/product/view/your_tab.phtml</template></action>
- Save and overwrite the original catalog.xml.
- Create your_tab.phtml that will contain the actual tab content when the user clicks the “Your Tab” tab on the product page. Upload it to /app/design/frontend/default/modern/template/catalog/product/view/your_tab.phtml
- Refresh all caches.
Now you should be seeing a new “Your Tab” on the product pages of your store. Add some text or HTML to your_tab.phtml and refresh cache so that tab will display the content you added.
The default Magento theme and many other themes miss the point by not giving the user a handy chance to directly register for a user account. “Register” or “Sign up” link has been way too common practice and instinctive to be missed out at the top links of your site.
We can’t afford that and we have to add it to our Magento stores.
Here’s how we do it.
Search through all your theme’s layout files for a section named <customer_logged_out> and add this snippet into it:
<action method="addLink" translate="label title" module="customer"><label>Register</label><url helper="customer/getRegisterUrl"/><title>Register</title><prepare/><urlParams/><position>10</position></action>
Refresh your store’s cache and you are fine to go with a shiny “Register” link on the top links section when the user isn’t logged in.
It’s weird but some of pages of Magento don’t come with a full breadcrumbs path and all you have is just:
Which doesn’t look good in a professional online store.
So you may want to add a breadcrumb entry to the end of the breadcrumbs path, for example:
Home » Shopping Cart
How to add a breadcrumb link to the breadcrumbs?
Find the <checkout_cart_index></checkout_cart_index> section in your theme’s layout files and add in it:
<crumbInfo><label>Shopping Cart</label><title>Shopping Cart</title><link>/checkout/cart</link></crumbInfo>
Remove the <link></link> tag if you don’t want any links to be on the breadcrumb text.