购物车新增钩子操作
parent
8eaabaddad
commit
0ce10720f6
|
|
@ -34,6 +34,28 @@
|
|||
{{foreach $cart_list as $goods}}
|
||||
<tr id="data-list-{{$goods.id}}" data-id="{{$goods.id}}" data-goods-id="{{$goods.goods_id}}" class="{{if $goods['is_error'] eq 1}}am-danger{{/if}}">
|
||||
<td class="base">
|
||||
<!-- 商品基础前面钩子 开始 -->
|
||||
{{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_cart_base_begin</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{php}}
|
||||
$hook_name = 'plugins_view_cart_base_begin';
|
||||
$hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'data'=>$goods]);
|
||||
if(!empty($hook_data) && is_array($hook_data))
|
||||
{
|
||||
foreach($hook_data as $hook)
|
||||
{
|
||||
if(is_string($hook) || is_int($hook))
|
||||
{
|
||||
echo htmlspecialchars_decode($hook);
|
||||
}
|
||||
}
|
||||
}
|
||||
{{/php}}
|
||||
<!-- 商品基础前面钩子 结束 -->
|
||||
|
||||
<label class="am-checkbox-inline am-success am-fl">
|
||||
<input type="checkbox" value="{{$goods.id}}" {{if $goods['is_error'] eq 1}}disabled{{/if}} data-am-ucheck />
|
||||
</label>
|
||||
|
|
@ -59,28 +81,212 @@
|
|||
<strong class="total-price-content">{{$currency_symbol}}{{$goods.price}}</strong>
|
||||
<span class="wap-number">x{{$goods.stock}}</span>
|
||||
</div>
|
||||
|
||||
<!-- 商品基础后面钩子 开始 -->
|
||||
{{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_cart_base_end</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{php}}
|
||||
$hook_name = 'plugins_view_cart_base_end';
|
||||
$hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'data'=>$goods]);
|
||||
if(!empty($hook_data) && is_array($hook_data))
|
||||
{
|
||||
foreach($hook_data as $hook)
|
||||
{
|
||||
if(is_string($hook) || is_int($hook))
|
||||
{
|
||||
echo htmlspecialchars_decode($hook);
|
||||
}
|
||||
}
|
||||
}
|
||||
{{/php}}
|
||||
<!-- 商品基础后面钩子 结束 -->
|
||||
</td>
|
||||
<td class="price am-hide-sm-only">
|
||||
{{if $goods['original_price'] gt 0}}
|
||||
<p class="original-price">{{$currency_symbol}}{{$goods.original_price}}</p>
|
||||
<!-- 商品单价前面钩子 开始 -->
|
||||
{{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_cart_price_begin</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
<p class="line-price">{{$currency_symbol}}{{$goods.price}}</p>
|
||||
{{php}}
|
||||
$hook_name = 'plugins_view_cart_price_begin';
|
||||
$hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'data'=>$goods]);
|
||||
if(!empty($hook_data) && is_array($hook_data))
|
||||
{
|
||||
foreach($hook_data as $hook)
|
||||
{
|
||||
if(is_string($hook) || is_int($hook))
|
||||
{
|
||||
echo htmlspecialchars_decode($hook);
|
||||
}
|
||||
}
|
||||
}
|
||||
{{/php}}
|
||||
<!-- 商品单价前面钩子 结束 -->
|
||||
|
||||
<!-- 单价信息 -->
|
||||
<div class="cart-price">
|
||||
{{if $goods['original_price'] gt 0}}
|
||||
<p class="original-price">{{$currency_symbol}}{{$goods.original_price}}</p>
|
||||
{{/if}}
|
||||
<p class="line-price">{{$currency_symbol}}{{$goods.price}}</p>
|
||||
</div>
|
||||
|
||||
<!-- 商品单价后面钩子 开始 -->
|
||||
{{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_cart_price_end</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{php}}
|
||||
$hook_name = 'plugins_view_cart_price_end';
|
||||
$hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'data'=>$goods]);
|
||||
if(!empty($hook_data) && is_array($hook_data))
|
||||
{
|
||||
foreach($hook_data as $hook)
|
||||
{
|
||||
if(is_string($hook) || is_int($hook))
|
||||
{
|
||||
echo htmlspecialchars_decode($hook);
|
||||
}
|
||||
}
|
||||
}
|
||||
{{/php}}
|
||||
<!-- 商品单价后面钩子 结束 -->
|
||||
</td>
|
||||
<td class="number">
|
||||
<div class="am-input-group am-input-group-sm stock-tag" data-inventory="{{$goods.inventory}}" data-price="{{$goods.price}}" data-ajax-url="{{:MyUrl('index/cart/stock')}}">
|
||||
<span class="am-input-group-label {{if $goods['is_shelves'] eq 1 and $goods['is_delete_time'] eq 0}}stock-submit{{/if}}" data-type="min">-</span>
|
||||
<input type="number" class="am-form-field" value="{{$goods.stock}}" {{if $goods['is_shelves'] neq 1 or $goods['is_delete_time'] neq 0}}disabled{{/if}} />
|
||||
<span class="am-input-group-label {{if $goods['is_shelves'] eq 1 and $goods['is_delete_time'] eq 0}}stock-submit{{/if}}" data-type="add">+</span>
|
||||
</div>
|
||||
{{if $goods['is_error'] eq 1 and !empty($goods['error_msg'])}}
|
||||
<p class="am-text-danger am-margin-top-xs">{{$goods.error_msg}}</p>
|
||||
<!-- 商品数量前面钩子 开始 -->
|
||||
{{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_cart_number_begin</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{php}}
|
||||
$hook_name = 'plugins_view_cart_number_begin';
|
||||
$hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'data'=>$goods]);
|
||||
if(!empty($hook_data) && is_array($hook_data))
|
||||
{
|
||||
foreach($hook_data as $hook)
|
||||
{
|
||||
if(is_string($hook) || is_int($hook))
|
||||
{
|
||||
echo htmlspecialchars_decode($hook);
|
||||
}
|
||||
}
|
||||
}
|
||||
{{/php}}
|
||||
<!-- 商品数量前面钩子 结束 -->
|
||||
|
||||
<!-- 数量操作 -->
|
||||
{{if $goods['is_error'] eq 0}}
|
||||
<div class="am-input-group am-input-group-sm stock-tag" data-inventory="{{$goods.inventory}}" data-price="{{$goods.price}}" data-ajax-url="{{:MyUrl('index/cart/stock')}}">
|
||||
<span class="am-input-group-label {{if $goods['is_shelves'] eq 1 and $goods['is_delete_time'] eq 0}}stock-submit{{/if}}" data-type="min">-</span>
|
||||
<input type="number" class="am-form-field" value="{{$goods.stock}}" {{if $goods['is_shelves'] neq 1 or $goods['is_delete_time'] neq 0}}disabled{{/if}} />
|
||||
<span class="am-input-group-label {{if $goods['is_shelves'] eq 1 and $goods['is_delete_time'] eq 0}}stock-submit{{/if}}" data-type="add">+</span>
|
||||
</div>
|
||||
{{else /}}
|
||||
<p class="invalid-stock">{{$goods.stock}}</p>
|
||||
{{if !empty($goods['error_msg'])}}
|
||||
<p class="am-text-danger am-margin-top-xs tips-error-text">{{$goods.error_msg}}</p>
|
||||
{{/if}}
|
||||
{{/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_cart_number_end</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{php}}
|
||||
$hook_name = 'plugins_view_cart_number_end';
|
||||
$hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'data'=>$goods]);
|
||||
if(!empty($hook_data) && is_array($hook_data))
|
||||
{
|
||||
foreach($hook_data as $hook)
|
||||
{
|
||||
if(is_string($hook) || is_int($hook))
|
||||
{
|
||||
echo htmlspecialchars_decode($hook);
|
||||
}
|
||||
}
|
||||
}
|
||||
{{/php}}
|
||||
<!-- 商品数量后面钩子 结束 -->
|
||||
</td>
|
||||
<td class="total-price am-hide-sm-only">
|
||||
<!-- 商品总价面钩子 开始 -->
|
||||
{{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_cart_total_price_begin</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{php}}
|
||||
$hook_name = 'plugins_view_cart_total_price_begin';
|
||||
$hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'data'=>$goods]);
|
||||
if(!empty($hook_data) && is_array($hook_data))
|
||||
{
|
||||
foreach($hook_data as $hook)
|
||||
{
|
||||
if(is_string($hook) || is_int($hook))
|
||||
{
|
||||
echo htmlspecialchars_decode($hook);
|
||||
}
|
||||
}
|
||||
}
|
||||
{{/php}}
|
||||
<!-- 商品总价面钩子 结束 -->
|
||||
|
||||
<strong class="total-price-content">{{$currency_symbol}}{{$goods.total_price}}</strong>
|
||||
|
||||
<!-- 商品总价后面钩子 开始 -->
|
||||
{{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_cart_total_price_end</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{php}}
|
||||
$hook_name = 'plugins_view_cart_total_price_end';
|
||||
$hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'data'=>$goods]);
|
||||
if(!empty($hook_data) && is_array($hook_data))
|
||||
{
|
||||
foreach($hook_data as $hook)
|
||||
{
|
||||
if(is_string($hook) || is_int($hook))
|
||||
{
|
||||
echo htmlspecialchars_decode($hook);
|
||||
}
|
||||
}
|
||||
}
|
||||
{{/php}}
|
||||
<!-- 商品总价后面钩子 结束 -->
|
||||
</td>
|
||||
<td class="operation">
|
||||
<a href="javascript:;" class="am-text-danger submit-delete" data-url="{{:MyUrl('index/cart/delete')}}" data-id="{{$goods.id}}" data-view="fun" data-value="ViewDeleteBack">删除</a>
|
||||
|
||||
<!-- 商品操作栏 开始 -->
|
||||
{{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_cart_operate</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{php}}
|
||||
$hook_name = 'plugins_view_cart_operate';
|
||||
$hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'data'=>$goods]);
|
||||
if(!empty($hook_data) && is_array($hook_data))
|
||||
{
|
||||
foreach($hook_data as $hook)
|
||||
{
|
||||
if(is_string($hook) || is_int($hook))
|
||||
{
|
||||
echo htmlspecialchars_decode($hook);
|
||||
}
|
||||
}
|
||||
}
|
||||
{{/php}}
|
||||
<!-- 商品操作栏 结束 -->
|
||||
</td>
|
||||
</tr>
|
||||
{{/foreach}}
|
||||
|
|
@ -95,9 +301,53 @@
|
|||
<span class="el-text">全选</span>
|
||||
</label>
|
||||
<a href="javascript:;" class="am-margin-left-sm nav-delete-submit submit-ajax" data-url="{{:MyUrl('index/cart/delete')}}" data-id="0" data-view="reload" data-msg="删除后不可恢复、确认操作吗?">删除</a>
|
||||
|
||||
<!-- 导航左侧内部 开始 -->
|
||||
{{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_cart_nav_left_inside</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{php}}
|
||||
$hook_name = 'plugins_view_cart_nav_left_inside';
|
||||
$hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'data'=>$cart_list]);
|
||||
if(!empty($hook_data) && is_array($hook_data))
|
||||
{
|
||||
foreach($hook_data as $hook)
|
||||
{
|
||||
if(is_string($hook) || is_int($hook))
|
||||
{
|
||||
echo htmlspecialchars_decode($hook);
|
||||
}
|
||||
}
|
||||
}
|
||||
{{/php}}
|
||||
<!-- 导航左侧内部 结束 -->
|
||||
</div>
|
||||
<div class="am-fr nav-right">
|
||||
<form action="{{:MyUrl('index/buy/index')}}" method="post">
|
||||
<!-- 导航右侧内部 开始 -->
|
||||
{{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_cart_nav_right_inside</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{php}}
|
||||
$hook_name = 'plugins_view_cart_nav_right_inside';
|
||||
$hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'data'=>$cart_list]);
|
||||
if(!empty($hook_data) && is_array($hook_data))
|
||||
{
|
||||
foreach($hook_data as $hook)
|
||||
{
|
||||
if(is_string($hook) || is_int($hook))
|
||||
{
|
||||
echo htmlspecialchars_decode($hook);
|
||||
}
|
||||
}
|
||||
}
|
||||
{{/php}}
|
||||
<!-- 导航右侧内部 结束 -->
|
||||
|
||||
<form action="{{:MyUrl('index/buy/index')}}" method="post" class="am-fr">
|
||||
<span class="selected-tips am-fl"><span>已选商品</span> <strong>0</strong> <span>件</span></span>
|
||||
<span class="total-price-tips am-fl">合计:</span>
|
||||
<strong class="nav-total-price am-fl">{{$currency_symbol}}0.00</strong>
|
||||
|
|
|
|||
|
|
@ -434,7 +434,7 @@
|
|||
{{/if}}
|
||||
|
||||
<!-- 购买导航 -->
|
||||
<div class="buy-nav {{if $goods['is_exist_many_spec'] eq 0}}buy-nav-not-many-spec{{/if}}">
|
||||
<div class="buy-nav">
|
||||
<div class="buy-nav-opt {{if !empty($buy_button) and isset($buy_button['count'])}}buy-nav-opt-button-number-{{$buy_button.count}}{{/if}}">
|
||||
<!-- 商品页面基础信息购买小导航内部前面钩子 开始 -->
|
||||
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
|
||||
|
|
|
|||
|
|
@ -32,5 +32,109 @@ return array (
|
|||
'log_write' =>
|
||||
array (
|
||||
),
|
||||
'plugins_admin_css' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_css' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_js' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_service_navigation_header_handle' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_service_users_center_left_menu_handle' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_service_header_navigation_top_right_handle' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_service_warehouse_goods_inventory_deduct' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_service_warehouse_goods_inventory_rollback' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_service_warehouse_goods_inventory_sync' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_service_goods_field_status_update' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_service_goods_delete' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_service_goods_save_end' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_service_editor_path_type_admin_goods_saveinfo' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_view_goods_detail_right_content_bottom' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_view_goods_detail_base_bottom' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_view_goods_detail_base_buy_nav_min_inside_begin' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_service_warehouse_handle_end' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_service_buy_order_insert_begin' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_service_buy_order_insert_end' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_service_system_begin' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_view_buy_form_inside' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_view_buy_base_confirm_top' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_view_admin_order_list_operate' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_service_order_status_change_history_success_handle' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_service_order_aftersale_audit_handle_end' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_service_goods_buy_nav_button_handle' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
);
|
||||
?>
|
||||
|
|
@ -306,10 +306,6 @@ flex: 1 1 0%;line-height: 16px;cursor: pointer;}
|
|||
padding-left: 65px;
|
||||
margin-top: 10px !important;
|
||||
}
|
||||
.buy-nav-not-many-spec {
|
||||
padding-left: 0px !important;
|
||||
margin-top: 20px !important;
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width:641px) {
|
||||
.buy-nav .buy-submit-container,
|
||||
|
|
|
|||
Loading…
Reference in New Issue