Magento’s default view cart page:

Simple product includes a  product thumbnail , product name, product SKU  as shown below.

Configurable Product includes a product thumbnail , product name, product SKU , Product Attributs  as shown below.

Shopping CartWhat if you wanted to add the short description to the view cart page, to help give customers a better idea of the product they have added to their cart. You can Do that by following these simple steps.

The view cart page is controlled by default.phtml, which is located  in:

app/design/frontend/your_package/your_theme/template/checkout/cart/item/default.phtml

Near Line no 61 there is a

tag displaying product name like:

<h2 class="product-name">
<?php if ($this->hasProductUrl()):?>
    <a href="<?php echo $this->getProductUrl() ?>"><?php echo $this->escapeHtml($this->getProductName()) ?></a>
<?php else: ?>
<?php echo $this->escapeHtml($this->getProductName()) ?>
<?php endif; ?>
</h2>

If you want to add shortdescription just after it add the following code just after

tag

<?php
    $product_ob = Mage::getModel('catalog/product')->load($_item->getProductId());
    echo $product_ob->getShortDescription();
?>

Take a look at the results. This will pull the Short Description into the view cart page.
Shopping Cart


0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *