|
I have edited the template/checkout/cart.phtml page to display the SKU as well as the Thumbnail and Product Description.
<strong>Product Code:</strong> <?php echo $_item->getSku() ?>
...which works fine!
However, if I want to add a custom attribute it does not work:
<strong>My Attribute:</strong> <?php echo $_item->getMyAttribute() ?>
It would be *great* if that ‘just worked’!
There is some helpful information on this wiki page:
How to add attributes to product grid in category
...but I don’t think there is the option of using XML to addAttributeToSelect
On the Search Page I added to Mage/CatalogSearch/Block/Result.php(line 100) to add in attributes:
->addAttributeToSelect('my_attribute')
...but with the Checkout Cart page, it is not so obvious where or how to ->addAttributeToSelect().
I’m looking at: Mage/Checkout/Block/Cart.php
Ideas anyone?
|