I am trying to add a cross-sell product to a custom cart page. The regular process for adding cross-sell products to products in the admin panel does now show up in our cart. Is there a file/ line of code I can implement to create this block on my custom cart page?
1 Answer
You have to add following code in your custom cart layout.xml and ensure checkout/cart/crosssell.phtml exist on particular location.
<block type="checkout/cart_crosssell" name="checkout.cart.crosssell" as="crosssell" template="checkout/cart/crosssell.phtml"/>
-
I should mention that the cart consists of template files in the design versus modules in the app/code section. Commented Apr 28, 2016 at 17:52
-
then you need to change block name as per your module app/code and use custom template file.– YeshuCommented Apr 29, 2016 at 13:46