Everyone ecshop online shop system users Hello , Welcome to ecshop Tutorial Web Graphics tutorial, today for everyone to explain in detail ecshop home page display Merchandise inventory quantity .
ecshop Tutorial Network Ecshop Video Tutorial also continue to improve and follow up, look forward to everyone's attention! Hope in the Ecshop Road,ecshop tutorial Network with you all the way!
1.
Open the/includes/lib_goods.php file (recommended to use EditPlus) to find the following code (approximately 287 rows or so)
Take out all eligible product data and deposit the results in the corresponding recommended type array $sql = ' SELECT g.goods_id, G.goods_name, G.goods_name_style, G.market_price, G.shop_price as Org_price, G.promote_price, ‘ . "Ifnull (Mp.user_price, G.shop_price * ' $_session[discount] ') as Shop_price,". |
Revision changed to
Take out all eligible product data and deposit the results in the corresponding recommended type array $sql = ' SELECT g.goods_id, G.goods_name, G.goods_name_style, G.market_price, G.shop_price as Org_price, G.promote_price, ‘ . "Ifnull (Mp.user_price, G.shop_price * ' $_session[discount] ') as Shop_price, G.goods_number,". |
2.
Next, continue down to find
if (In_array ($row [' goods_id '], $type _array[' best ')) |
Add a line of code above it
$goods [$idx] [' goods_number '] = $row [' Goods_number ']; |
3. Then modify the template file
/themes/Templates folder/library/recommend_hot.lbi,/themes/Templates folder/library/recommend_new.lbi,/themes/templates folder/library/ Recommend_best.lbi
In
<font class= "F1" > <!--{if $goods. Promote_price neq ""}-- {$goods. Promote_price} <!--{else}--> {$goods. Shop_price} <!--{/if}--> </font> |
Add code below
<br> <!--{if $goods. Goods_number eq 0}-- <strong>{$lang .goods_number}</strong> <font color= ' red ' >{$lang .stock_up}</font> <!--{Else}- <strong>{$lang .goods_number}</strong> {$goods. Goods_number} {$goods. Measure_unit} <!--{/if}-- |
3, the last step to remember to ecshop backstage, clear the cache
Ecshop Commodity inventory quantity displayed in the site store home