2

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.

  • The weird file it downloads as you put it, are you sure that isn't the stack trace error displaying where the problem lies? – zigojacko Mar 6 '14 at 9:11
  • @GeoffJackson-zigojacko - The file is unknown data type and when I open it with Notepad++, it's empty... – Syspect Mar 6 '14 at 9:15
  • 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? – zigojacko Mar 6 '14 at 9:20
  • Omg, yes, the path was incorrect. It's just the other 2 things that I reference the template in the layout are about sales, and this one is for the checkout, so I got mistaken... I don't know when I will get used to the so important Magento path convention. :D – Syspect Mar 6 '14 at 9:37
  • Ah great, glad that sorted it - added as answer. – zigojacko Mar 6 '14 at 9:40
2

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.

| improve this answer | |
  • The correct path is company/quotationitemprice/bundle/checkout/cart/item/renderer.phtml – Syspect Mar 6 '14 at 9:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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