I need to hide related products from cart page.

I have created a module which converts selected related products name as custom options dynamically. When I add a product to cart after selecting its related products, I need to hide related products and show them just as product options for the main product.

I have added the code which creates custom options or "additional options" dynamically when a product is added to cart. I just need to hide the related products.

I don't want to hide the product throughout the site but just in cart. Is it possible to hide a product in cart dynamically?

Any help is appreciated.

  • Are you trying to remove the related product that gets added to the cart from showing in the related products block? It is somewhat unclear what you are asking.
    – pspahn
    Commented Aug 2, 2014 at 0:28
  • How do you convert the product to options? Could you not simply remove the product from the cart then? Or set it not to show? Commented Feb 21, 2015 at 19:54

2 Answers 2


In your local.xml or page.xml file you can get the Cart page handle and UNSET and not REMOVE the related products block. Below code might prove helpful to you.

<checkout_cart_index translate="label">
<reference name="right">
    <action method="unsetChild"><name>catalog.product.related</name></action>
  • Why not remove @vikram?
    – kbariotis
    Commented Sep 1, 2014 at 17:43

In local.xml or checkout.xml

<checkout_cart_index translate="label">
   <remove name="catalog.product.related"/>

After this refresh your cache.

This is another solution.

  • Please please please read the question first and then try to answer. I need to hide related product which are added in cart, not the related product block. Commented May 30, 2014 at 8:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.