I have created my own navigation as a CMS block that I am displaying in the left nav. I am still make certain categories visible in the menu so that they will show up in main navigation. However when I do that the left side nav pops back up. How can I remove this block or hide it?
<catalog_category_default translate="label">
<label>Catalog Category (Non-Anchor)</label>
<reference name="left">
<block type="catalog/navigation" name="catalog.leftnav" after="currency" template="catalog/navigation/left.phtml"/>
</reference>
<reference name="content">
this is my theme catalog.xml file. I assumed it would be to unset this block?
Magento 1.9.3.3
use unsetChild to remove blocks in layout xml
<action method="unsetChild"><name>catalog.leftnav</name></action>
normally you would do this local.xml of your theme
Related
We like the layered navigation on the right side of the category page.
Therefore, I inserted following code in our local.xml file:
<catalog_category_default translate="label">
<reference name="root">
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
</reference>
In my catalog.xml file, I edit this line:
<reference name="left_first">
<block type="catalog/layer_view" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml">
...
to
<reference name="right">
<block type="catalog/layer_view" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml">
...
On large viewports, I see the layered navigation on the right side, as it should be.
As soon as I resize the window to a tablet resolution, the layered navigation disappears. Normally, the layered navigation is added on top of all products in the tablet resolution with the label "FILTER".
i use the magento 1.9 and install the MA2 theme.
how to category block change right to left column?
plz check this image below=" http://postimg.org/image/jcs8mssct/"
You can change the category layout via the backend :
catalog > Manage categories > select your category > Custom design tab > page layout and change it to 2columns with left bar, but I don't think this will work with your template, it will change the page layout but it will not show the category list, it may show Magento layer nav if your category is anchor
or you can use your local.xml to add this :
<catalog_category_default translate="label">
<reference name="root">
<action method="setTemplate"><template>page/2columns-left.phtml</template></action>
</reference>
<reference name="right">
<remove name="category.list"/>
</reference>
<reference name="left">
<block type="catalog/navigation" name="category.list" before="-" template="catalog/navigation/category_list.phtml"/>
</reference>
</catalog_category_default>
On MA2 template you can use the same code above on ma2\default\layout\local.xml
I would like to show two different products on the product view page. Basically, after displaying the first product like it normally would, the page should then show another product with all it's details, images and of course the "Add to Cart" button.
Both products should be fully displayed on the product view page, so I can't use any of the existing blocks like catalog/product_list_related or catalog/product_list_upsell.
My idea was to simply add another catalog/product_view block to the catalog_product_view layout definition, like so:
catalog.xml:
<layout version="0.1.0">
...
<catalog_product_view translate="label">
...
<reference name="content">
<block type="catalog/product_view" name="product.info" template="catalog/product/view.phtml">
...
</block>
</reference>
...
<!-- Changes start here -->
<reference name="content">
<block type="catalog/product_view" name="product.info2" template="catalog/product/view.phtml">
<action method="setProductId"><product_id>123</product_id></action>
</block>
</reference>
</catalog_product_view>
However, this does not seem to work. Various elements of the block don't seem to load correctly, as you can see on this screenshot:
All the product images are missing as well as the price and the buttons. Also, my call to setProductId() doesn't seem to have any effect.
You can delete this catalog.xml, then magento usa base catalog.xml
In the Magento theme I am using there is a left sidebar, on the homepage the sidebar contains a category list but on inner pages (category page, product page, etc) the list isn't there. How can I replicate this block onto the product and category page so that users can choose a category from anywhere?
You can include the block in the layout(catalog.xml) under the section
Product view
<catalog_product_view translate="label">
<reference name="left">
Your block comes here
</reference>
</catalog_product_view></li>
Category Page
<catalog_category_default translate="label">
<reference name="left">
Your block comes here
</reference>
</catalog_category_default></li>
Otherwise just put in the deafult section of the catalog.xml, I am thinking that should also work.
<default>
<reference name="left">
Your block comes here
</reference>
</default>
I think the block that ususally displays the left navigation of category is
<reference name="left">
<block type="catalog/navigation" name="catalog.leftnav" after="currency" template="catalog/navigation/left.phtml"/>
</reference>
Hope this helps you to some extent.
Cheers
I need to add a custom left to appear on the products pages only.
I hope if you can help
if you want them to appear on the listing page then you have to add your block here :
<catalog_category_layered translate="label">
<label>Catalog Category (Anchor)</label>
<reference name="left">
......Add your block here ..............
</reference>
but if you want it to appear on detail page too then
<catalog_product_view translate="label">
<reference name="left">
......Add your block here ..............
</reference>
You can find both these above in catalog.xml but just in case you use other than default them then you have to do it in local.xml.
Don't forget to vote up or click the answer (tick) on left If this helps you.