向Magento 1.9中的“长描述”选项卡添加短描述

向Magento 1.9中的“长描述”选项卡添加短描述,magento,magento-1.9,php,Magento,Magento 1.9,Php,我目前在view.phtml中调用了我的简短描述 <?php if ($_product->getShortDescription()):?> <div class="short-description"> <div class="std"><?php echo $_helper->productAttribute($_product, nl2br($_produ

我目前在view.phtml中调用了我的简短描述

            <?php if ($_product->getShortDescription()):?>
            <div class="short-description">
                <div class="std"><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div>
            </div>
        <?php endif;?>

我想将此添加到我的长描述中(目前由description.phtml调用)

我已经尝试将这段代码添加到description.phtml中

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


然而,当我这样做的时候,标签就完全消失了。是否有一种方法可以合并Magento中的简短描述和长篇描述,或者只是将简短描述添加到“描述”选项卡中而不使其中断?

您需要添加以下代码以获取
描述中的
简短描述
值。phtml

<?php $_short_description = $this->getProduct()->getShortDescription();?>

然后加上这个

<?php if ($_short_description): ?>
    <div class="std">
        <?php echo $this->helper('catalog/output')->productAttribute($this->getProduct(), $_short_description, 'short_description') ?>
    </div>
<?php endif; ?>

您需要添加以下代码以获得
description.phtml中的
short\u description

<?php $_short_description = $this->getProduct()->getShortDescription();?>

然后加上这个

<?php if ($_short_description): ?>
    <div class="std">
        <?php echo $this->helper('catalog/output')->productAttribute($this->getProduct(), $_short_description, 'short_description') ?>
    </div>
<?php endif; ?>

将核心文件从这个url app/design/frontend/base/default/template/catalog/product/view/description.phtml复制到app/design/frontend/yourtheme/default/template/catalog/product/view/description.phtml

<?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?>
如果您想将简短描述和日志描述结合在一起,请尝试下面的代码


将核心文件从这个url app/design/frontend/base/default/template/catalog/product/view/description.phtml复制到app/design/frontend/yourtheme/default/template/catalog/product/view/description.phtml

<?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?>
如果您想将简短描述和日志描述结合在一起,请尝试下面的代码



您是否可以清除我,是否要在“产品视图”页面右侧的“说明”选项卡中显示“产品说明”字段值以及简短说明?是否可以清除我,是否要在“产品视图”页面右侧的“说明”选项卡中显示“产品说明”字段值以及简短说明?