Reference Shopping Cart Items Template – Magento 1.7

layoutmagento-1.7shopping-carttemplate

I am trying to change the way the products are shown in the shopping cart, for bundle products. I have a template that will deal with that. So I have created a layout xml file where I reference the normal template, but when I try to open the shopping cart – it doesn't load and just downloads me some weird file.

Here's the code in the layout file:

<checkout_cart_index>
        <reference name="checkout.cart">
            <action method="addItemRender">
                <type>bundle</type>
                <block>quotationitemprice/bundle_sales_order_items_renderer</block>
                <template>company/quotationitemprice/bundle/sales/order/items/renderer.phtml</template>
            </action>
        </reference>
    </checkout_cart_index>

It works for the order overview, that's why I was wondering what's the problem here..

P.S. I put a simple Mage::log('I am here') in the beginning of the template, just to test, but it seems that it doesn't get in the template at all, since I don't get anything logged.

Best Answer

The path to template file was incorrect as per the comments on the question...

Is the path company/quotationitemprice/bundle/sales/order/items/renderer.phtml definitely correct? (i.e the folder company sits in app/design/frontend/package/theme/template?

Should be company/quotationitemprice/bundle/checkout/cart/item/renderer.phtml.

Related Topic