Managed web solutions
Create a left hand navigation / vertical category in Magento
Following reports of formatting problems I have rewritten this page with the help of SyntaxHighlighter Evolved plugin. Please use the View Source options when copying code. This works with magento 1.3x for instruction for 1.4x please go here
Using the modern theme to create a menu like http://www.cl-floraldesigns.co.uk
1)
Create vert_nav.phtml in app / design / frontend / default / default / template / catalog / navigation
<div class="vertical-nav-container box base-mini">
<div class="vertical-nav">
<div class="head">
<h4><?php echo $this->__('Categories') ?></h4>
</div>
<h4 class="no-display"><?php echo $this->__('Category Navigation:') ?></h4>
<ul id="nav_vert">
<?php foreach ($this->getStoreCategories() as $_category): ?>
<?php echo $this->drawItem($_category) ?>
<?php endforeach ?>
</ul>
</div>
<?php echo $this->getChildHtml('topLeftLinks') ?>
</div>
2)
in app / design / frontend / default / modern / layout / catalog.xml
add
<block type="catalog/navigation" before="-" name="catalog.vertnav" template="catalog/navigation/vert_nav.phtml"/>
so it looks like this:
<!--
Category default layout
-->
<catalog_category_default>
<reference name="root">
<action method="setTemplate"><template>page/2columns-left.phtml</template></action>
</reference>
<reference name="left">
<block type="catalog/navigation" name="catalog.leftnav" after="currency" template="catalog/navigation/left.phtml"/>
<block type="catalog/navigation" before="-" name="catalog.vertnav" template="catalog/navigation/vert_nav.phtml"/>
<block type="core/template" name="right.latest.news" template="callouts/latest_news.phtml"/>
</reference>
<reference name="content">
3) in skin/frontend/default/modern/css/menu.css
/**********************************************Vertical Nav ****************************************/
#nav_vert { padding:0 20px; font-size:1em; z-index:999; width:180px; background-color: #F6F6F6; }
/************** ALL LEVELS *************/ /* Style consistent throughout all nav levels */
#nav_vert li {
width:200px;
list-style:none;
position:relative;
text-align:left;
background-color: #F6F6F6;
border-bottom-width: thin;
border-bottom-style: solid;
border-bottom-color: #CCCCCC;
}
#nav_vert li.over { z-index:999; }
#nav_vert li.active { z-index:999; } /* to prevent the li separator from showing through on mouseover on li */
#nav_vert a { line-height:1.3em; }
#nav_vert a, #nav_vert a:hover { display:block; text-decoration:none; }
#nav_vert span { display:block; cursor:pointer; color: #000; }
/************ 1ST LEVEL ***************/
#nav_vert li { float:left; background:url(../images/nav_bg.gif) repeat-x 50%; height:30px; margin-right:1px; }
#nav_vert li.active a { color:#4c6a16; }
#nav_vert a {
float:left;
padding:5px 12px 6px 8px;
color:#4c6a16;
font-weight:bold;
font-family:Trebuchet MS;
font-size:13px;}
#nav_vert li.over a, #nav_vert a:hover { color:#CCCCCC; }
/************ 1ST LEVEL RESET ************/
#nav_vert ul li, #nav_vert ul li.active {
float:none;
height:auto;
background:none;
margin:0;
}
#nav_vert ul a, #nav_vert ul a:hover {
float:none;
padding:0;
background:none;
}
#nav_vert ul li a { font-weight:normal !important; }
/************ 2ND LEVEL ***********/
#nav_vert ul {
position: absolute;
width:200px;
margin-left:180px;
top:0px;
left:-10000px;
border:1px solid #666666;
}
/* Show menu */
#nav_vert li.over ul { left:0; }
#nav_vert li.over ul ul { left:-10000px; }
#nav_vert li.over ul li.over ul { left:100px; }
#nav_vert ul li a { background:#FFFFFF/*#ecf3f6*/; }
#nav_vert ul li a:hover { background: #F2F1D2; /*#d5e4eb;*/ }
#nav_vert ul li a span { background:url(../images/nav_divider.gif) repeat-x 0 100%; }
#nav_vert ul li a, #nav_vert ul li a:hover { color:#2f2f2f !important; }
#nav_vert ul span, #nav_vert ul li.last li span { padding:6px 15px 6px 15px; }
#nav_vert ul li.last span { background:none; }
/************ 3RD+ LEVEL ************/
#nav_vert ul ul { top:5px;}
#nav_vert ul ul ul { left:-10000px;}
#nav_vert li.over ul li.over ul ul { left:-10000px;}
#nav_vert li.over ul li.over ul li.over ul { left:100px; }
/* Fix for the IE bug */
#nav_vert iframe {
position: absolute;
left: -1px;
top: 0;
z-index: -1;
filter: progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0);
}
Display on home page
add
<reference name="content"> <block type="reports/product_viewed" name="home.reports.product.viewed" alias="product_viewed" template="reports/home_product_viewed.phtml" after="product_new"><action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action></block> <block type="reports/product_compared" name="home.reports.product.compared" template="reports/home_product_compared.phtml" after="product_viewed"><action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action></block> </reference> <reference name="left"> <block type="catalog/navigation" before="-" name="catalog.vertnav" template="catalog/navigation/vert_nav.phtml"/> <action method="unsetChild"><alias>right.reports.product.viewed</alias></action> <action method="unsetChild"><alias>right.reports.product.compared</alias></action> </reference>
to CMS > Pages > Home Page > Custom Design
Rock solid speed and reliability
Robust, reliable, fully backed up, secure UK based Magento hosting for £175 per year. Full details here or Contact us
| Print article | This entry was posted by admin on January 1, 2010 at 6:00 pm, and is filed under Magento. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
No trackbacks yet.
10 Open Source e-commerce solutions reviewed
about 1 week ago - No comments
Here is what they had to state about magento our prefered solutuion. http://www.magentocommerce.com Varien, a Los Angeles web development firm is the brainchild behindMagento, and my what a fantastic job they have done on this product. It’s by far one of the more exciting e-commerce platforms available for free on the market today. Dripping with
Smashing Magazine releases free Magento theme
about 1 week ago - No comments
From Smashing Magazine Today we are glad to release a yet another freebie: Polaroid Magento Theme, a professional design skin for the shops powered by the popular open-source ecommerce web application Magento. The theme was designed by eCommerce-Themes and released for Smashing Magazine and its readers. As usual, the theme is absolutely free to use
House keeping for your Magento database
about 3 weeks ago - No comments
To see if you have a problem open phpmyadmin and click on the database name in the left hand menu. This will list all your tables in the right hand window and you will see the size of your different tables. Look at all log tables ie log_customer log_quote log_summary log_summary_type log_url log_url_info log_visitor log_visitor_info
Smashing Magazine releases free Magento theme : Sigyn SM
about 3 weeks ago - No comments
From Smashing Magazine We love our readers. We respect the hard work of designers and developers across the globe. And we do our best to make the web design community stronger and the Web a little bit prettier. Therefore we work with talented artists and creative professionals to showcase their skills and release something unique
Create a Left hand Navigation in Magento 1.4 1.4x
about 1 month ago - 2 comments
Step 1 Create a new file called vert_nav.phtml in app / design / frontend / YOUR DESIGN / YOURTemplate / template / catalog / navigation add the following to vert_nav.phtml <div class="vertical-nav-container box base-mini"> <div class="vertical-nav"> <!–<div class="head">–> <!–<h4>–> <div class="block block-cart"> <div class="block-title"> <strong><span><?php echo $this->__(‘Categories’) ?></span></strong> </div><!–End block block-cart–> <div class="block-content"> <!–</h4>–> <!–</div>–><!–End
Magento multistore setup under Plesk
about 1 month ago - 1 comment
If you host with Dx3webs we will setup this up for you for a one off fee of £25. There is already a very good tutorial for setting this up under cpanel but the procedure is slightly different for Plesk. Follow the instruction given on crucial’s tutorial till you get to step 20.. then come
Change Check to Cheque / Money order to Postal order in Magento
about 1 month ago - No comments
I assume that the translation packs are meant to change this and indeed if you look in the relevant .csv files you will see that there are entries for all references to checks / cheques. However, this does not appear to be working as intended. If you switch on in line translation (system > config
magento modern theme : HMTL code in the price of the additional product information
about 1 month ago - No comments
If you are seeing something like: In the additional product information section in Magento 1.4+ you are seeing the result of a bug as reported here : http://www.magentocommerce.com/bug-tracking/issue?issue=9577 However, a quick fix is to edit your template version of : /app/design/frontend/default/yourtemplate/template/catalog/product/view/attributes.phtml and replace line 47: <td class="data"><?php echo $_helper->productAttribute($_product, $_data['value'], $_data['code']) ?></td> with: <td class="data"><?php
Magento emails not sending to free email accounts eg gmail aol hotmail
about 1 month ago - 1 comment
The fix that got us moving again was to activate the return path for all emails sent. System > config > advanced > system > mail sending settings > set return path > YES
Where did all my line breaks go in product descriptions?
about 1 month ago - No comments
The fix is quite easy. You just need to edit a copy of description.phtml (/app/design/frontend/default/{YOUR-TEMPLATE}/template/catalog/product/view/description.phtml) << don’t mess with the original make a parallel theme. Change: <?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), ‘short_description’) ?> to <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), ‘short_description’) ?> i.e. your just putting back the PHP function to convert newline to BRs.

about 3 months ago
Exactly what I was looking for but didn’t work for me, I am getting this error:
Exception printing is disabled by default for security reasons.
about 2 months ago
What version of magento are you using?
about 1 month ago
Could you please help me out?
about 1 month ago
sure, what’s up?
about 1 month ago
If you copy and paste from this page, make sure you replace all the slanted ” and ’ with ” and ‘. Caused some problems for a bit.
about 1 month ago
Hi Martin,
Thanks for pointing this out.. I have now replaced the code and the escaping problems should be fixed..
I have also corrected a few missing ‘class’ calls
about 3 weeks ago
Perfect! Thanks for this, I’ve been searching for hours.
about 2 weeks ago
Submenus does not work in 1.4.1.1 !!!
or is it me?
Using safari
about 2 weeks ago
you need to follow the instructions In post titled “Create a Left hand Navigation in Magento 1.4 1.4x”