提交 d5076947 编写于 作者: D devil_gong

商品详情新增相册钩子

上级 42d30d69
......@@ -145,6 +145,15 @@ class Goods extends Common
*/
private function PluginsHook($goods_id, &$goods)
{
// 商品页面相册内部钩子
$this->assign('plugins_view_goods_detail_photo_within_data', Hook::listen('plugins_view_goods_detail_photo_bottom',
[
'hook_name' => 'plugins_view_goods_detail_photo_within',
'is_backend' => false,
'goods_id' => $goods_id,
'goods' => &$goods,
]));
// 商品页面相册底部钩子
$this->assign('plugins_view_goods_detail_photo_bottom_data', Hook::listen('plugins_view_goods_detail_photo_bottom',
[
......
......@@ -36,6 +36,20 @@
your browser does not support the video tag
</video>
{{/if}}
<!-- 商品页面相册内部钩子 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
<div class="plugins-tag">
<span>plugins_view_goods_detail_photo_within</span>
</div>
{{/if}}
{{if !empty($plugins_view_goods_detail_photo_within_data) and is_array($plugins_view_goods_detail_photo_within_data)}}
{{foreach $plugins_view_goods_detail_photo_within_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
</div>
<!-- 商品页面相册底部钩子 -->
......@@ -85,6 +99,20 @@
your browser does not support the video tag
</video>
{{/if}}
<!-- 商品页面相册内部钩子 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
<div class="plugins-tag">
<span>plugins_view_goods_detail_photo_within</span>
</div>
{{/if}}
{{if !empty($plugins_view_goods_detail_photo_within_data) and is_array($plugins_view_goods_detail_photo_within_data)}}
{{foreach $plugins_view_goods_detail_photo_within_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
</div>
<!-- 商品页面相册底部钩子 -->
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册