Top navigation as submenu in magento

If you would like to show your magento store categories like as in picture then you are on right place.
navigation_as_submenu

Replace this code in topmenu.phtml

<?php $_menu = $this->getHtml(‘level-top’) ?>
<?php if($_menu): ?>
<div class=”nav-container”>
<ul id=”nav”>
<?php echo $_menu ?>
</ul>
</div>
<?php endif; ?>

with below

<?php $_menu = $this->getHtml(0,’level-top’) ?>
<?php if($_menu): ?>
<div class=”nav-container”>
<ul id=”nav”>
<li class=”level0 nav-1 first level-top parent” id=”home”>
<a class=”level-top” href=”<?php echo Mage::getBaseUrl();?>”>
<span>Home</span></a>
</li>
<li class=”level0 nav-1 first last level-top parent” id=”products”>
<a class=”level-top”><span>Products</span></a>
<ul class=”level0″>
<?php echo $_menu ?>
</ul>
</li>
<li class=”level0 nav-1 last level-top parent” id=”contact_us”>
<a class=”level-top” href=”<?php echo Mage::getBaseUrl().’contacts’;?>”>
<span>Contact Us</span></a>
</li>
</ul>
<?php endif ?>

Exclude categories in magento top navigation

Exclude categories in magento top navigation

We can achive this using below code

<?php $cats = Mage::getModel(‘catalog/category’)->load(2)->getChildrenCategories();
?>
<ul>
<?php foreach($cats as $category): ?>
<?php if (!in_array($category->getId(), array(6,7,8,9))) : ?>
<li>
<a href=” </li>
<?php endif; ?>
<?php endforeach; ?>

</ul>

Note : 6,7,8,9 are the categories which you want to execlude, you should replace with yours

Remove callouts (sidebar banners) in Magento

Remove callouts (sidebar banners) in Magento

Left Callout banner (the dog)

Find in app/design/frontend/*/*/layout/catalog.xml

Right Callout banner (back to school)

Find in app/design/frontend/*/*/layout/catalog.xml

X-cart Database Backup/Restore HTTP 500 Error

X-cart Database Backup/Restore HTTP 500 Error

If you are getting Database Backup/Restore HTTP 500 Error then check your error logs – /var/log

If you will see following entry
[06-Mar-2013 02:52:09 America/Denver] PHP Fatal error: Call to undefined function func_xpc_check_iframe_methods() in /var/www/vhosts/yoursitefoldername/httpdocs/modules/XPayments_Connector/config.php on line 57

then you can try to activate the x-payment module without configuring and see if all works. It is a bug though