January 13, 2011

Magento add sku or product number to shopping cart item in the checkout page

It is not difficult in Magento to add a sku, product number or any other product attribute to the shopping cart item on the checkout page. On our e-commerce website, http://www.paardcare.nl , our wish was to add the Sku number to the shopping cart. This can be done using:

$this->getChildProduct()->getAttribute();













The following file must be edited:
\app\design\frontend\default\default\template\checkout\cart\item\default.phtml

Around Line 36 place the this block:
<span style="color: #AAAAAA; font-weight: normal; font-style: italic;">- Art.
<?php
    if(is_object($this->getChildProduct())): 
        echo $this->getChildProduct()->getSku();
    else: 
        echo $_item->getSku();
    endif; ?>
</span>

This will look like:
Our snipped within the default code

3 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. Thank you for sharing excellent information. Your website is very cool. Fully useful your blog post... Online Shopping Site In Ahmedabad

    ReplyDelete
  3. I curious more interest in some of them hope you will give more information on this topics in your next articles.
    nice deals

    ReplyDelete