ECSHOP教程:團(tuán)購(gòu)提示“商品庫(kù)存不足”
在進(jìn)行ecshop團(tuán)購(gòu)的時(shí)候,即使ecshop商品庫(kù)存大于0,但沒(méi)有設(shè)置任何屬性,零購(gòu)正常,但是團(tuán)購(gòu)總是會(huì)提示“對(duì)不起,商品庫(kù)存不足,請(qǐng)您修改數(shù)量!”。
這到底是怎么回事呢。明明庫(kù)存還有的。按照方法:
修改文件:group_buy.php
1 | if ( $number > $product_info [ 'product_number' ]) |
修改為
1 | if ( $specs && $number > $product_info [ 'product_number' ]) |
還是無(wú)法解決。去官網(wǎng)查了一下,找到了一個(gè)可用的方案,還是修改文件修改group_buy.php,
1.為團(tuán)購(gòu)商品設(shè)置任一屬性、且為此屬性分配好庫(kù)存。
2.修改group_buy.php.
將以下代碼:
1 | empty ( $product_info ) ? $product_info = array ( 'product_number' => 0, 'product_id' => 0) : '' ; |
3 | if ( $number > $product_info [ 'product_number' ]) |
4 | { show_message( $_LANG [ 'gb_error_goods_lacking' ], '' , '' , 'error' ); |
修改為:
view sourceprint?
4 | if ( $number > $product_info [ 'product_number' ]) |
6 | how_message( $_LANG [ 'gb_error_goods_lacking' ], '' , '' , 'error' ); |
OK,到此清理緩存,問(wèn)題解決。
會(huì)員登錄
賬號(hào)登錄還沒(méi)有賬號(hào)?立即注冊(cè)