Magento editor automatic line break issue while adding new product

情到浓时终转凉″ 提交于 2019-12-06 03:59:28

I have found the answer on this link.

These additional breaks are caused by nl2br() function that should be removed.

To resolve this for short description, open app/design/frontend/[package]/[theme]/template/catalog/product/view.phtml, find:

<?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?>

and replace this by:

<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>

To resolve this for description, open app/design/frontend/[package]/[theme]/template/catalog/product/view/description.phtml, find:

<?php echo $this->helper('catalog/output')->productAttribute($this->getProduct(), nl2br($_description), 'description') ?>

and relace this by:

<?php echo $this->helper('catalog/output')->productAttribute($_product, $_product->getDescription(), 'description') ?>

Source

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!