Reputation: 1963
I am trying to add the SKU column into magento Cart page Item Grid section and order email template
As I am able to see the Grid on order view page with sku column by defalut in magento
How can I use order view section logic on Cart page and in email template? I am running on 1.7.0.2 Ver.
Upvotes: 1
Views: 2584
Reputation: 10772
The default Magento email template already includes the SKUs in it. If they are not there, check to make sure your theme isn't overriding the default email template files and removing it.
Here's how you can add the sku to the shopping cart page:
Open app/design/frontend/[package]/[theme]/template/checkout/cart.phtml (copy this file from the base theme to your current theme folder if it doesn't yet exist).
Add the <th rowspan="<?php echo $mergedCells; ?>"><?php echo $this->__('SKU') ?></th>
directly after the product name <th>
tag:
<th rowspan="<?php echo $mergedCells; ?>"><span class="nobr"><?php echo $this->__('Product Name') ?></span></th>
<th rowspan="<?php echo $mergedCells; ?>"><?php echo $this->__('SKU') ?></th>
Open app/design/frontend/[package]/[theme]/template/checkout/item/default.phtml (copy this file from the base theme to your current theme folder if it doesn't yet exist).
Insert the sku <td>
directly after the <td>
containing the Product Name
:
<td class="a-center">
<?php echo $_item->getSku(); ?>
</td>
Upvotes: 3