A5下载文章资讯

分类分类

ecshop团购“库存不足”问题及解决方法

2015-09-06 09:15作者:fang

如果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

249行原先的

if ($number > $product_info['product_number'])

修改为

if ($specs && $number > $product_info['product_number'])

展开全部

相关

说两句网友评论
    我要跟贴
    取消