Ecshop Commodity inventory quantity displayed in the site store home

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.