Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How do i show related Products on Right Side
 
khaleeq
Jr. Member
 
Total Posts:  7
Joined:  2009-03-11
 

Hi
I am new to magento and have a little bit Programming Knowledge .One of my Client wants to place the Related Products Box on right side of Product Pages.So how I do that
Live Example is
http://ecommerce.aheadworks.com/z-blocks.html

Thanx i n Advance

 
Magento Community Magento Community
Magento Community
Magento Community
 
sherrie
Moderator
 
Avatar
Total Posts:  1655
Joined:  2007-12-14
Waterloo, ON
 

It is defaulted on the right with the default layout. Make sure you assign related products so it will show up.

 
Magento Community Magento Community
Magento Community
Magento Community
 
sebtb
Sr. Member
 
Avatar
Total Posts:  196
Joined:  2008-12-28
 

when u create a product, there is a point “ related produtcs” or sth like this. there u choose in a list of other existing products the products u want for relation.

 
Magento Community Magento Community
Magento Community
Magento Community
 
khaleeq
Jr. Member
 
Total Posts:  7
Joined:  2009-03-11
 

many thanx herrie and SebastianTobias

 
Magento Community Magento Community
Magento Community
Magento Community
 
Master Jrock
Jr. Member
 
Avatar
Total Posts:  7
Joined:  2008-11-30
Los Angeles, California
 

Now the problem is how to show them again even if they’re in your shopping cart.

I noticed it when you have added them and then go back to the main product. Related products is not there anymore, unless you delete one of them in your cart.

Any solutions Magento team?

 
Magento Community Magento Community
Magento Community
Magento Community
 
CT Schubert
Sr. Member
 
Avatar
Total Posts:  197
Joined:  2008-10-08
Southern California
 

Wait....you want to show the related products even if those related products are in your shopping cart? So you want to let people know about a product they already have decided to purchase? Is this just desired for a pure aesthetic purpose or do you have some actual need for that? Just want to clarify so I can lend some support smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
sebtb
Sr. Member
 
Avatar
Total Posts:  196
Joined:  2008-12-28
 
Master Jrock - 15 December 2009 12:29 PM

Now the problem is how to show them again even if they’re in your shopping cart.

I noticed it when you have added them and then go back to the main product. Related products is not there anymore, unless you delete one of them in your cart.

Any solutions Magento team?

do you mean crosssell ?
its also in the product options. choose the same in crosssell and then some products will show in the shopping cart, releated to that, the customer bought.

 
Magento Community Magento Community
Magento Community
Magento Community
 
KWAVE
Member
 
Avatar
Total Posts:  53
Joined:  2009-04-04
Boston
 

Can someone actually answer the original question.

How can you add related products to a position on the product page. What is the code that you use?

<reference name=“right”>
<block type=“catalog/product_list_related” name=“catalog.product.related” before=“-” template=“catalog/product/list/related.phtml”/>
</reference>

if I past that anywhere ??

 
Magento Community Magento Community
Magento Community
Magento Community
 
WebSiteEvo
Jr. Member
 
Total Posts:  12
Joined:  2010-01-26
 

I also require the related product to remain viewable even if its been added to the cart. My related product has customisable attributes / options, therefore the customer may required more then one of the same related product, but with different customisable options. So far I have not been able to find the code which controls this. Its not in the template files as far as I can see so I guess its in the core functions!  I have also looked in Related.php but there is nothing that stands out!

Surely someone can find the code that controls this.

Thanks for any help…

Regards, Gareth .

 
Magento Community Magento Community
Magento Community
Magento Community
 
KamleshKamble
Jr. Member
 
Avatar
Total Posts:  10
Joined:  2010-04-16
 

hi

It is defaulted on the right with the default layout.

 
Magento Community Magento Community
Magento Community
Magento Community
 
trepseb
Jr. Member
 
Total Posts:  2
Joined:  2011-11-08
 
KamleshKamble - 16 April 2010 01:45 AM

hi

It is defaulted on the right with the default layout.

Why not tell us the code?
Ok for the next one reading this post, here you go:
you need:
<block type="catalog/product_list_related" name="catalog.product.related" before="-" template="catalog/product/list/related.phtml"/>
In my case for the product view I added this in my local.xml file

<catalog_product_view translate="label">
<label>Catalog Product View (Any)</label>
<reference name="content">
<block type="catalog/product_list_related" name="catalog.product.related" before="-" template="catalog/product/list/related.phtml"/>
</reference>
</catalog_product_view>

 
Magento Community Magento Community
Magento Community
Magento Community
 
magento123
Member
 
Avatar
Total Posts:  64
Joined:  2010-12-30
 

No, it is not default in magento, by default magento gives upsells.

For related products we need to replace upsell_products with related_products in view.phtml file

and make this change in catalog.xml

<!--<block type="catalog/product_list_upsell" name="product.info.upsell" as="upsell_products" template="catalog/product/list/upsell.phtml">-->
<block type="catalog/product_list_related" name="catalog.product.related" before="-" template="catalog/product/list/related.phtml"/>

Then we need to add related products from backend

And also cache removal is very important because we have modified an xml file

 
Magento Community Magento Community
Magento Community
Magento Community
 
kameshj
Jr. Member
 
Total Posts:  7
Joined:  2012-04-04
 

You can do the following (inside the foreach loop)

$related_product_collection $_product->getRelatedProductCollection();
$related_product_collection->AddStoreFilter();

You can use collection to display it anywhere smile

I hope this will help you

Regards,
Kamesh J

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top