Left sidebar appearing on grouped product page - php

I have a minor bug/issue with my Magento site.
I've started to make a few group products, and all of the grouped product pages are broken.
It looks like 1 or both of the sidebars appear on the product page and "squeeze" the product info into the middle of the page.
I am using the "ultimo" theme.
Can anyone suggest how I can try and fix this myself?
I can probably fix it myself, if someone is able to point me to the correct file and suggest a code to fix.
Here is the example:

To me this page looks like it is set to the base template 3-columns rather than 2-columns-right.
Since you say it only happens with grouped products have a look in your layout xml files for the handle PRODUCT_TYPE_grouped then with this handle you will probably see something as follows.
<reference name="root">
<action method="setTemplate"><template>page/3columns</template></action>
</reference>
I guess it should be:
<reference name="root">
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
</reference>

Related

How can I add banner to product page? (magento)

I have my homepage redirected to a product page, but I still want my banners from the home page to show up.
Anyone have any clue how I can add banners to my product page ? Pretty new to Magento... Certainly not as easy as Joomla.
There are handles in Magento who decide what block to show when specific controller is called.
Take a look at this file
/magento/app/design/frontend/base/default/layout/catalog.xml and find following lines
<catalog_product_view translate="label">
<label>Catalog Product View (Any)</label>
<!-- Mage_Catalog -->
<reference name="root">
<action method="setTemplate">
<template>page/2columns-right.phtml</template>
</action>
</reference>
<reference name="content">
<block type="catalog/product_view" name="product.info" template="catalog/product/view.phtml">
<!-- Some more code -->
</block>
</reference>
<!-- Some more code -->
</catalog_product_view>
catalog_product_view is the handle you may want to use for displaying the banner on product page.
Pick that handle and write the block specific code.
If you want to use an extension to simplify your task here is the one.
You can call banner code on products page. Or if you want to go with simple technique, use iframe

Custom Content on Sidebar of Magento

Sup Stackers!
I need your help dearly. I'm pretty much a beginner when it comes to Magento. I would like to display a custom set of links on my page sidebar, the sidebar that holds blocks such as Categories, Compare Products etc. I've tried the following:
<reference name="right">
<block type="cms/block" name="right.permanent.callout">
<action method="setBlockId"><block_id>favourites</block_id></action>
</block>
</reference>
No result. The above references a cms static block I've created that just contains a UL of links. The indentifier for the block is favourites. Whenever I try to get the unordered list to show on the page by including the above in the CMS page Layout XML via the Admin panel, I get nothing happening at all. One thing to note is that, as a test, I deleted all the content that was currently in my home pages Layout XML and it changed nothing, all the sidebar content still remained.
After trying about 10 different alternatives, I'm still no closer to getting the to work. Anyone got any ideas on how to get this to work?
Your code looks like what it should be to get this working. A few things to check is the "name" attribute and caching. Give the block a unique name, such a "favourites." You can also add a "before" or "after" to position this block exactly where you want to on the sidebar, just reference the block name that you want it to appear before or after.
<reference name="right">
<block type="cms/block" name="favourites" before="-">
<action method="setBlockId"><block_id>favourites</block_id></action>
</block>
</reference>
This should get it working. You mentioned that you removed all the code from the Layout Update XML without any changes taking effect. I don't think caching is your problem but I just want to mention it since it's still a possibility. It may have to do with how the default code is commented out, so all you're doing is removing code that isn't being applied to the layout. Hopefully this helps because I think you're right there, good luck!

Making a new page template for a different product page

I've been trying to figure this problem out for several hours now - I've made two page templates for the products one is named vxs-view.phtml and the other is view.phtml. There located in the same directory.
The solution I tried was to input
<reference name="product.info">
<action method="setTemplate"> <template>catalog/product/view/vxs-view.phtml</template></action>
</reference>
However this only works if that product is in a certain category. Is there a way I can add the pay layout to the template files in the design tab?
I've been adding this code to the front end system/custom design/ custom layout update box
Sorry I'm need to magento and still learning.
Thanks for any help
you are placing wrong reference type. Please try below code.
<module_page_action> <!- Enter your modulename_pagename_action e.g. catalog_product_info-->
<reference name="root">
<action method="setTemplate"> <template>catalog/product/view/vxs-view.phtml</template></action>
</reference>
<module_page_action>
Hope this will work for you!
Cheers!

Magento List Layout XML

I am trying to get my module to replace the 'media' section on list and grid view on category list pages with my own new one, if there is a hole in Mage knowledge its the layout xml so if someone could help :-) I am using,
<layout>
<catalog_category_view>
<reference name="head">
<action method="addItem"><type>skin_js</type><name>js/imageover.js</name></action>
</reference>
<reference name="product_list">
<block type="catalog/product_view_media" name="product.info.media" as="media" template="lewis/imageover/media.phtml"/>
</reference>
</catalog_category_view>
</layout>
but it's not working? :s debug toolbar shows my layout is being called but the changed aren't being made.
Edit: Ok with some help from the post below I got it to read my layout, but turns out on the category_list page Magento doesn't use media template the image call is made in the list.phtml file, so the only way to change it appears to be to replace that whole template file. (which seems very extreme!) is there another way to replace the image on the category list page?
What you've done here is effectively reinstantiate the media block with your template. If your changes are solely template-based, you can just <reference name="product.info.media"> the existing block instance from the layout and call <action method="setTemplate"><template>lewis/imageover/media.phtml</...>. If you have your module has a custom block class, you'll need to use your module's block class group. For more on class group notation, the factory method, etc, see Alan Storm's article on the Magento config.

Magento, custom product list

I made my own product list page based on Mage_Catalog_Block_Product_List:
app/code/local/Mage/Catalog/Block/Product/Special.php:
class Mage_Catalog_Block_Product_Special extends Mage_Catalog_Block_Product_List
{
/* Original contents */
/* Here I call addAttributeToFilter on product collection, and then... */
return $this->_productCollection;
}
I include this in a CMS page on the center column:
<reference name="content">
<block type="catalog/product_special" template="catalog/product/list.phtml" />
</reference>
The problem is: The product list shows up just fine, but I get no layered navigation in my left column.
This is quite strange, since I am using exactly the same template as normal listings.
A couple of things I have checked:
Mage_Catalog_Block_Product_Special just being a proxy class. This doesn't work. Even if I use block type "catalog/product_list" on my CMS page I will not get a layered navigation.
There are no extensions that are overriding crucial core classes.
I have also tried to create my own module and list it under for example 'mycatalog'. This results in exactly the same problem.
I have a feeling this has to do with trying to include a product listing on a CMS page but I have not been able to track down the exact problem.
Any help on this would be very much appreciated.
You need to add the Block that renders the Layers into the left column.
If you look in catalog.xml, you will see that the catalog_category_layered node includes the following:
<reference name="left">
<block type="catalog/layer_view" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml"/>
...
</reference>
So, add that into your CMS xml layout update and that should display the Layer block on your CMS page.
If you have issues with the product list not being filtered when you click one of the filterable attributes, that is probably because the links rendered by the Layer_View Block assume that they are going to post back to a CategoryController, not a CmsController which will be rendering your CMS page. That may or may not be an issue, so report back here if it doesn't work and we can try to work through it.
Personally I would have a hidden category with all products in it and use a script to keep that updated to be all products. The script can be done with the API, slow yes, but it will work in a timely fashion for a certain level of SKU count.
layer navigation is include in category view.
You should include the part of navigation used by category, so try to insert
<reference name="left">
<block type="catalog/navigation" name="catalog.leftnav" after="currency" template="catalog/navigation/left.phtml"/>
</reference>
before
<reference name="content">
I'm not sure but if it's doesn't works it should help you to understand the problem anyway
check the following pages ( they came across the same problem )
http://www.exploremagento.com/magento/some-custom-blocks-to-help-you-show-products.php
http://www.chilipepperdesign.com/2009/03/23/magento-how-to-list-all-the-products-in-a-single-category-in-a-sidebar-block

Categories