Magento theme is not working?

Many times we have an old theme to work on magento, magento is a best platform for eCommerce websites. And Rich Webs provides magento solutions.

So below is your solution:
Many Magento store owners continue to operate old versions of the rapidly maturing e-commerce application. With the 1.6 release looming on the horizon, now seems like a good time to consider upgrading. If you’re running a version prior to the 1.4 release, you will need to make some changes to your theme in order for it to be compatible with newer versions. While the extent of these changes depends on the customizations you have performed, there are a few that we have run into consistently, and therefore apply them every time we perform an upgrade on an older store.

Changes to page.xml

Two changes to the stock page.xml file need to happen whenever you upgrade from a 1.3 release. First, you need to add a new javascript for credit card validation. Second, you need to add a “name” attribute to the core/profiler block.

To add the new javascript file:

Open the page.xml file located in your theme’s layout directory using your favorite editor.Locate the “page/html_head” block near the top. You’ll see a list of nodes like the following:<action method="addJs"><script>prototype/validation.js</script></action>
<action method="addJs"><script>scriptaculous/builder.js</script></action>
<action method="addJs"><script>scriptaculous/effects.js</script></action>
<action method="addJs"><script>scriptaculous/dragdrop.js</script></action>
Anywhere within that block definition, add the following line:<action method="addJs"><script>lib/ccard.js</script></action>

To update the “core/profiler” block:

Scroll down to the end of the block and look for the “core/profiler” block type.<block type="core/profiler" output="toHtml"/>Add the “name” attribute as follows:<block type="core/profiler" output="toHtml" name="core_profiler"/>

Save the changes to that file and clear the cache.

Changes to the Pager & Toolbar

The other theme update that occurred in the 1.4 release deals with the way the toolbar pager works. A Google search returns a number of different workarounds for this change, but I’ve found that the one offered in Magento’s release notes for 1.4.0.0 works the best.

Back up your theme’s toolbar.phtml file by renaming it to .orig or .bak:mv -v app/design/frontend/mypackage/mytheme/template/catalog/product/list/toolbar.phtml{,.bak}Copy the new toolbar.phtml file from the base package:cp -pv app/design/frontend/base/default/template/catalog/product/list/toolbar.phtml \
app/design/frontend/mypackage/mytheme/template/catalog/product/list/Open the catalog.xml layout file in your favorite editor and append this line:<block type="page/html_pager" name="product_list_toolbar_pager"/>

Underneath this line:

<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">You should find two locations in that file where you’ll need to add the new “page/html_pager” block.

Changes to the Wishlist Layout

Finally, a modification of the wishlist.xml layout file should take care of a change that occurred in 1.4.2.0.

Open the wishlist.xml file in your text editor.Find the following block:<reference name="top.links">
<block type="wishlist/links" name="wishlist_link">
<action method="addWishlistLink"></action>
</block>
</reference>Replace it with the following:<reference name="top.links">
<block type="wishlist/links" name="wishlist_link"/>
<action method="addLinkBlock"><blockName>wishlist_link</blockName></action>
</reference>

Keep in mind that for each of the above modifications you will need to clear the cache to see the change. These theme updates are ones we find ourselves making every time we upgrade a shop from the 1.3 release or earlier. So, if you don’t want to scrap the hard work you put into your designs, give these updates a try. Chances are, you’ll still find some bugs, but hopefully you won’t have to start from scratch.

Leave a Reply