如果ecshop商品库存大于0,但没有设置任何属性,零购正常,团购就会被提示“商品库存不足”。
解决方法(任选一):
1.为团购商品设置任一属性、且为此属性分配好库存。
2.修改group_buy.php.
将以下代码
- empty($product_info) ? $product_info = array(‘product_number’ => 0, ‘product_id’ => 0) : ”;
- /* 查询:判断指定规格的货品数量是否足够 */
- if ($number > $product_info[‘product_number’])
- { show_message($_LANG[‘gb_error_goods_lacking’], ”, ”, ‘error’);
- }
复制代码
改为
- // empty($product_info) ? $product_info = array(‘product_number’ => 0, ‘product_id’ => 0) : ”;
- if($product_info){
- /* 查询:判断指定规格的货品数量是否足够 */
- if ($number > $product_info[‘product_number’])
- {
- show_message($_LANG[‘gb_error_goods_lacking’], ”, ”, ‘error’);
- }
- }
复制代码
3.推荐方法
|
group_buy.php
|
