【问题标题】:Why my add a review/be the first one to review is not showing in product/view.phtml page in magento?为什么我的添加评论/成为第一个评论没有显示在 magento 的 product/view.phtml 页面中?
【发布时间】:2016-01-04 13:07:18
【问题描述】:
<div class="product-collateral toggle-content tabs">
        <?php if ($detailedInfoGroup = $this->getChildGroup('detailed_info', 'getChildHtml')):?>
            <dl id="collateral-tabs" class="collateral-tabs">
                <?php foreach ($detailedInfoGroup as $alias => $html):?>
                    <dt class="tab"><span><?php echo $this->escapeHtml($this->getChildData($alias, 'title')) ?></span></dt>
                    <dd class="tab-container">
                        <div class="tab-content"><?php echo $html ?></div>
                    </dd>
                <?php endforeach;?>
            </dl>
        <?php endif; ?>
    </div>

我在默认主题中使用了波纹管代码,然后显示,但在我的主题中却没有...不知道为什么?

<?php if ($detailedInfoGroup = $this->getChildGroup('detailed_info', 'getChildHtml')):?>
                        <?php echo count($detailedInfoGroup); ?>
                <?php foreach ($detailedInfoGroup as $alias => $html):?>
                      <?php endforeach;?>
                    <span><?php echo $this->escapeHtml($this->getChildData($alias, 'title')) ?></span>

                        <?php echo $html ?>



        <?php endif; ?>

对于上面的代码,最后一个是评论显示...但不在我的主题中。 它在基本主题('默认')上工作正常....但是当我的主题被激活时,它在同一链接上显示致命错误。

【问题讨论】:

  • 您的第二个代码块超出了 foreach 循环。请检查
  • 我知道我这样做是为了获取数组中“review”的最后一个元素...

标签: magento review


【解决方案1】:

转到您的管理部分,然后在目录下 => 审查和评级 => 管理评级

然后为每条记录选择商店ID,然后它将显示在您的产品页面上。

【讨论】:

    猜你喜欢
    • 2012-02-24
    • 1970-01-01
    • 2013-01-31
    • 1970-01-01
    • 2022-11-18
    • 1970-01-01
    • 1970-01-01
    • 2012-07-14
    • 2020-07-28
    相关资源
    最近更新 更多