【问题标题】:Add share button under product in prestashop在 prestashop 的产品下添加分享按钮
【发布时间】:2011-11-24 03:52:43
【问题描述】:

我从 add to any 中获得了一个社交网络共享按钮。我想把它放在我所有的产品下面。

我在我的主题中编辑了 product.tpl 并添加了他们给出的 addToAny 代码。但它没有显示在那里。

<!-- number of item in stock -->
            {if ($display_qties == 1 && !$PS_CATALOG_MODE && $product->available_for_order)}
            <p id="pQuantityAvailable"{if $product->quantity <= 0} style="display: none;"{/if}>
                <span id="quantityAvailable">{$product->quantity|intval}</span>
                <span {if $product->quantity > 1} style="display: none;"{/if} id="quantityAvailableTxt">{l s='item in stock'}</span>
                <span {if $product->quantity == 1} style="display: none;"{/if} id="quantityAvailableTxtMultiple">{l s='items in stock'}</span>
            </p>

<div>
//Adding my addToAny share code here
</div>

            {/if}
            <!-- Out of stock hook -->
            {if !$allow_oosp}
            <p id="oosHook"{if $product->quantity > 0} style="display: none;"{/if}>
                {$HOOK_PRODUCT_OOS}
            </p>
            {/if}

【问题讨论】:

  • 如果您能在此之前展示您的代码会有所帮助。
  • 我可以显示什么?我在 product.tpl 文件中添加

    text

    并且它没有在浏览器中显示它。
  • 尝试更改缓存设置。 smarty 在您更改缓存设置之前不会编译

标签: php share prestashop


【解决方案1】:

在管理面板中 转到->首选项->性能->选择强制编译为是。 Smarty 在您将其设置为 yes 之前不会编译。

【讨论】:

    猜你喜欢
    • 2017-03-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-04-16
    • 1970-01-01
    • 2017-09-26
    • 1970-01-01
    • 2015-10-19
    相关资源
    最近更新 更多