How to add something to right sidebar in Magento - magento

I'm new to Magento. I've read a dozen of questions here and posts on Magento forums but none of them seem to explain how to solve my problem.
I have a two column layout for my category pages. In right column I have "Recently viewed items", "My basket" and "Compare products". All I need to do is add a static block to the right column.
As far as I know I have to edit some xml file but where is that file? I can't seem to even find how those three existing block were added. My guess is if I could find those I'd figure out how to add one more.
Please help, I'm completely lost now.
Thanks.
Edit
I'm obviously missing something fundamental here. Let me put it in other words.
I have a category "AAA" In this category I have added using Admin panel: a description, image and assigned few products. Then I open this category in web browser I see all my data in main area and those three blocks (mentioned above) in right sidebar.
How does Magento know to show those particular three blocks and not some others? Where does it say to show those three blocks?

You need to update a layout XML file located in app/design/frontend/*DEFAULT*/*DEFAULT*/layout/. Which XML file depends on exactly where you will be updating.
If you want this static block to show up on every single you will need to update the default handle in page.xml. Or, even better, create your own local.xml file as described here, and put this in the contents.
<layout version="0.1.0">
<default>
<reference name="right">
<block type="your/type" template="path/to/your/template.phtml" />
</reference>
</default>
</layout>
If you still have questions, I recommend you review the Designer's Guide

Those blocks are denoted to show in the catalog.xml file, checkout.xml file and the reports.xml file. Recently compared block will also appear if a customer performs a compare products, as would wishlist if a customer adds products to their wishlist (this block s controlled by wishlist.xml). If you wish to stop these blocks from appearing then simply edit these files removing the references referring to the right column and the relevant blocks.
It is possible to edit files so that blocks only appear in certain instances, see the following post for instructions http://emagen.co.uk/magento-tips-advice/hide-shopping-cart-sidebar/

Related

Removing Masshead Magento Extension from certain categories

As I describe in the title, what i want to do is to remove the Masshead extension from certain categories in magento. Any ideas how can that be done?
The module will be most likely including a block on the categories page. This block will be defined in the modules layout xml file. You need to find the definition to identify the name of the block and the name of the parent block/container it is being included in. As you want to keep it on some categories but remove it from others, the simplest solution I can think of would to be to use Magento's Administration Area for the categories you want to remove it from and add some layout update xml to these specific categories.
I normally do this with statements like the following under Admin->Catalog->Manage Categories. Select the appropriate category and then click on Custom Design where you will find the Custom Layout Update field to out the XML in;
<reference name="content">
<remove name="masshead.blockname" />
</reference>
You could go about it the other way and remove it from all categories by changing the layout xml file of the module to not include it and use layout update xml in the admin area per each category you want to include it on. Really depends on if there are more categories you want on it than not or vice versa.

Only some products using proper theme in Magento

This has been very frustrating and I cannot figure it out. I recognize the answer is most likely simple.
I have a my own package and all the desired pages except for some products are not using the desired theme product view layout.
Compared the data in mysql against a product that is displaying properly. Both records match.
In Catalog/Manage products - I have performed a side by side comparison of the products in magento admin (including design). both match.
In Catalog/Manage Categories - All categories set to apply to products and to use parent as default.
The default category is using my theme and applying to products.
Set the proper template in my local.xml file however this did not work.
<catalog_product_view>
<reference name="root">
<action method="setTemplate">
<template>page/2columns-right.phtml</template>
</action>
</reference>
</catalog_product_view>
In system/configuration/design I have the current package name set to my package for the Default Config. Any children from there are checked to use default.
I tried several configurations with flushing cache and re indexing just in case.
This is and example of the site the correct display (please note design not complete).
Page using correct Theme
Here is example of product using base theme
Page using BASE Theme
Any suggestions. I understand that I could Manually select the desired template for each product and I would sooner jump off bridge. I must be overlooking something. Appreciate any advice.
Please check to admin>product here each product can select difference type of custom design

Different product page layouts on different stores with magento multi-store

So here is my quandry..
I have three stores all with seperate themes.
I want the actual layout of the product page to vary between stores. So for instance I would like to include full description on one and only short descitopn on the other and would like to add a tag line field in another. Basically all three will need complete sepearate layouts.
I think the product page layout is drawn from app/design/front/base (as a standard layout).
Can I include the relevant files (and directories) from base into app/design/frontend/default/theme to allow me to achieve the above?
I think the file I need to edit/copy is the view.phtml? Can you confirm this also?
You need to also copy catalog.xml to related theme of store. If want to remove description or add other details of products.
you have to copy view.phtml to related theme of your store and modify/add/delete the code in view.phtml
to remove anything just comment the code in view.phtml file.

Magento dynamic block adding contents

I am new to Magento CMS, i have configured products using admin panel, at the home page
I want to list down random famous
products from different categories
dynamically.
When i list the products they appear
in the menu by their categories,
when i chose page type 3 columns
where are the source files for
column 1 and 3 how can i
change/configure them.
I installed Magento with sample data
from home page when i click upon any
item it does not display data.
I see default home page using
dynamic contents block from where to
create it and how to see it ?
I think it's better to split questions into individuals one, in order to get more accurate answers. Anyway:
1. Yoast Landing Pages allows you to create products listings of any attribute you want
2. I'm not sure to understand you, but I think what you're looking for is in app/design/frontend/[package]/[template]/layout/catalog.xml. Inside <block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml"> add/modify <action method="setColumnCount"><columns>2</columns></action>
3. It seems you don't have mod_rewrite enabled in your server
4. If you're using Magento's sampla data, it is not dynamic content: check in your admin CMS -> Pages -> (Title) Home Page
Strategy for you:
make a new extension with a block and a layout file
have your layout file define the block output and use the product list template and your block
in your block make a query to magento popular products report to get the popular stuff you need
design the hell out of it and $$$$

Display Price Once on Magento Product Page

I want to show the product price only once on the Magento product page. Currently, it is displayed twice.
I tried to change app/design/frontend/base/default/template/catalog/product/price.phtml,
but didn't get it. I also tried app/design/frontend/base/default/template/catalog/view.phtml, but when I edited price.phtml the price is not up.
So how can I do it? Any ideas?
Thanks.
This depends on which one you want to keep. The price at the top of the page is generally displayed as part of the "product type data". Take a look at template/catalog/product/view/type/simple.phtml, where you should see $this->getPriceHtml($_product);.
The price at the bottom of the catalog page is a little more complicated. If you take a look at layout/catalog.xml, the price block (product.clone_prices) is added to the block product.info.options.wrapper.bottom, which is then added to product.info.container1 and product.info.container2. Depending on the product, one of these will be echoed on the page. You can, however, just remove the line for product.clone_prices and that should remove the price.
Hope that helps!
Thanks,
Joe
Instead of deleting the cloned price from the catalog.xml itself, as suggested by Joseph, a more clean way is to remove the block in your local.xml layout file:
<catalog_product_view>
<reference name="product.info.container2">
<remove name="product.clone_prices"/>
</reference>
</catalog_product_view>
Price blocks are defined within layout files (XML), you just need to call them from within the template files to get them to show.
In your case it seems that you might have possibly defined them twice from two related XML files within the same block, or within one file and two related sections/views. This means that when you call a function $this->getPriceHtml($_product); XMl parser loads the price twice from two different files (tied to a certain block).
Also I've noticed this within catalog.xml file:
<block type="catalog/product_view" name="product.clone_prices" as="prices" template="catalog/product/view/price_clone.phtml"/>
If this is what you are looking for then just experiment with blocks within XML files.

Resources