Magento Add SKU column in cart page and order email template

Magento Add SKU column in cart page and order email template

October 11, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Magento Add SKU column in cart page and order email template

Adding SKU Column to Magento Cart Page and Order Email Templates

As an experienced Magento developer, I frequently get requests from clients looking to customize their store’s default behavior. One common question is how to add the SKU (Stock Keeping Unit) column to the cart page and order email templates.

Why Add SKU Column?

Adding the SKU column provides several benefits:

  1. Enhanced transparency: The SKU number uniquely identifies each product, helping customers track their orders more precisely.
  2. Easier inventory management: For store admins, having the SKU visible in emails makes it simpler to locate specific items during order fulfillment.

Understanding Magento’s Default Behavior

By default, Magento includes the SKU column only in the “Order View” page for administrators (Admin > Sales > Orders). This is because it’s primarily intended as a back-end reference tool.

However, the front-end cart and email templates don’t include this information by default. Let’s change that!

Adding SKU to Cart Page

To add the SKU column to the cart page, you’ll need to modify the “cart.phtml” template file located in your theme directory (usually under app/design/frontend/<theme>/templatecheckout).

  1. Open the cart.phtml file and find the section where the product items are displayed.
  2. Add this line just above the <td class="item-name"> tag for each item:
<td class="sku"><?php echo $_item->getSku() ?></td>
  1. Wrap the entire row in a new tr element to include your SKU column:
<tr id="item_<?php echo $_item->getId(); ?>" class="item-info">
  <td class="sku"><?php echo $_item->getSku() ?></td>
  <!-- Rest of your existing code -->
</tr>

Save the file and refresh your cart page. You should now see the SKU column alongside each product.

Adding SKU to Order Email Templates

For order email templates, you’ll need to modify the “sales_email_order_items.xml” file located in app/code/core/Mage/Sales/etc/email_templates.xml.

  1. Find the line starting with <template> that corresponds to your desired email template (e.g., “order_new.html”).
  2. Add a new element within the existing <item> node:
<item>
  <sku><![CDATA[${$block->getItemSku($_item)}]]></sku>
</item>
  1. Save the file and refresh your Magento admin interface.
  2. Create a test order to verify that the SKU column appears in your email template.

Caveats and Best Practices

  • Always make sure you’re working with a backup of your original files before editing any core Magento templates or configuration XMLs.
  • If you’ve customized your theme, ensure you’re editing the correct version of the “cart.phtml” file (usually found under app/design/frontend/<theme>/templatecheckout).
  • Consider using child themes for your modifications to preserve upgrades and avoid merge conflicts.

Conclusion

Adding the SKU column to the Magento cart page and order email templates is a straightforward process that requires minimal code changes. By following this guide, you can enhance your customer’s shopping experience while streamlining your internal inventory management processes.

Remember, Magento offers extensive customization options out-of-the-box. For more advanced modifications or complex requirements, consider reaching out to professional Magento development services like Laravel Company for expert help and guidance.

Happy coding! Let me know if you have any further questions about this or other Magento customizations.

Originally published at Laravel Company Blog. Visit us for more Magento tips and tricks!

Checkout Catalog Themes Admin

Our network