商品详情新增相册钩子

This commit is contained in:
devil_gong 2019-06-23 19:41:17 +08:00
parent 42d30d6968
commit d50769474c
2 changed files with 37 additions and 0 deletions

View File

@ -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',
[

View File

@ -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>
<!-- 商品页面相册底部钩子 -->