Monday 19 September 2011

Magento: Remove auto Breaks("br/") from product description

By Default Magento automatically adds

html tags to product descriptions for display on the customer interface.  If you have created a nice description with the WYSIWYG Editor or imported HTML descriptions you most likely want to remove this behavior.   Luckily this is not hard to do.
  1. Find the file "description.phtml" here:  app/design/frontend/default/ 
  2. Remove the "nl2br" tag
Before:
helper('catalog/output')->productAttribute($this->getProduct(), 
nl2br($this->getProduct()->getDescription()), 'description') ?>
After:
helper('catalog/output')->productAttribute($this->getProduct(),   
$this->getProduct()->getDescription()), 'description' ?>

No comments:

Post a Comment