{"id":59118,"date":"2025-04-23T11:39:11","date_gmt":"2025-04-23T03:39:11","guid":{"rendered":"https:\/\/fwq.ai\/blog\/59118\/"},"modified":"2025-04-23T11:39:11","modified_gmt":"2025-04-23T03:39:11","slug":"ecshop%e6%a8%a1%e6%9d%bf%e4%bf%ae%e6%94%b9_%e5%9c%a8%e7%bd%91%e7%ab%99%e9%a6%96%e9%a1%b5%e6%98%be%e7%a4%ba%e5%95%86%e5%93%81%e5%ba%93%e5%ad%98","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/59118\/","title":{"rendered":"Ecshop\u6a21\u677f\u4fee\u6539_\u5728\u7f51\u7ad9\u9996\u9875\u663e\u793a\u5546\u54c1\u5e93\u5b58"},"content":{"rendered":"<p><span>\u8fd1\u51e0\u65e5\u8bba\u575b<\/span>\u91cc\u6709\u4eba\u95ee\u5230\u201c\u5728ECSHOP<span>\u9996\u9875<\/span>\u663e\u793a<span>\u5546\u54c1<\/span>\u5e93\u5b58\u7684\u65b9\u6cd5\u201d\uff0c \u4e0b\u9762\u662f\u4fee\u6539\u65b9\u6cd5<br \/> 1\u3001<br \/> \u6253\u5f00 \/includes\/lib_goods.php \u6587\u4ef6\uff08\u5efa\u8bae\u4f7f\u7528editplus\uff09<br \/> \u627e\u5230\u4e0b\u9762\u4ee3\u7801\uff08\u5927\u6982\u5728287\u884c\u5de6\u53f3\uff09<br \/> &nbsp;<\/p>\n<table cellspacing=\"0\" cellpadding=\"5\" style=\"border-right: #cccccc 1px solid;border-top: #cccccc 1px solid;background: #f7f7f7;border-left: #cccccc 1px solid;width: 90%;border-bottom: #cccccc 1px solid\">\n<tbody>\n<tr>\n<td><font>\/\/\u53d6\u51fa\u6240\u6709\u7b26\u5408\u6761\u4ef6\u7684\u5546\u54c1\u6570\u636e\uff0c\u5e76\u5c06\u7ed3\u679c\u5b58\u5165\u5bf9\u5e94\u7684\u63a8\u8350\u7c7b\u578b\u6570\u7ec4\u4e2d<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $sql = &#8216;SELECT g.goods_id, g.goods_name, g.goods_name_style, g.market_price, g.shop_price AS org_price, g.promote_price, &#8216; .<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;IFNULL(mp.user_price, g.shop_price * &#8216;$_SESSION[discount]&#8217;) AS shop_price, &#8220;.<\/font><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u4fee\u6539\u4e3a<\/p>\n<table cellspacing=\"0\" cellpadding=\"5\" style=\"border-right: #cccccc 1px solid;border-top: #cccccc 1px solid;background: #f7f7f7;border-left: #cccccc 1px solid;width: 90%;border-bottom: #cccccc 1px solid\">\n<tbody>\n<tr>\n<td><font>\/\/\u53d6\u51fa\u6240\u6709\u7b26\u5408\u6761\u4ef6\u7684\u5546\u54c1\u6570\u636e\uff0c\u5e76\u5c06\u7ed3\u679c\u5b58\u5165\u5bf9\u5e94\u7684\u63a8\u8350\u7c7b\u578b\u6570\u7ec4\u4e2d<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $sql = &#8216;SELECT g.goods_id, g.goods_name, g.goods_name_style, g.market_price, g.shop_price AS org_price, g.promote_price, &#8216; .<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;IFNULL(mp.user_price, g.shop_price * &#8216;$_SESSION[discount]&#8217;) AS shop_price, g.goods_number,&#8221;.<\/font><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> 2\u3001<br \/> \u63a5\u7740\uff0c\u7ee7\u7eed\u5411\u4e0b\u627e\u5230<\/p>\n<table cellspacing=\"0\" cellpadding=\"5\" style=\"border-right: #cccccc 1px solid;border-top: #cccccc 1px solid;background: #f7f7f7;border-left: #cccccc 1px solid;width: 90%;border-bottom: #cccccc 1px solid\">\n<tbody>\n<tr>\n<td><font>if (in_array($row[&#8216;goods_id&#8217;], $type_array[&#8216;best&#8217;]))<\/font><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u5728\u5b83\u4e0a\u9762\u589e\u52a0\u4e00\u884c\u4ee3\u7801<\/p>\n<table cellspacing=\"0\" cellpadding=\"5\" style=\"border-right: #cccccc 1px solid;border-top: #cccccc 1px solid;background: #f7f7f7;border-left: #cccccc 1px solid;width: 90%;border-bottom: #cccccc 1px solid\">\n<tbody>\n<tr>\n<td><font>$goods[$idx][&#8216;goods_number&#8217;]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = $row[&#8216;goods_number&#8217;];<\/font><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> 3\u3001\u7136\u540e\u518d\u4fee\u6539<span>\u6a21\u677f<\/span><span>\u6587\u4ef6<\/span> \/themes\/\u6a21\u677f\u6587\u4ef6\u5939\/library\/recommend_hot.lbi \uff0c\/themes\/\u6a21\u677f\u6587\u4ef6\u5939\/library\/recommend_new.lbi \uff0c \/themes\/\u6a21\u677f\u6587\u4ef6\u5939\/library\/recommend_best.lbi <\/p>\n<p> \u5728<\/p>\n<table cellspacing=\"0\" cellpadding=\"5\" style=\"border-right: #cccccc 1px solid;border-top: #cccccc 1px solid;background: #f7f7f7;border-left: #cccccc 1px solid;width: 90%;border-bottom: #cccccc 1px solid\">\n<tbody>\n<tr>\n<td><font>&lt;font class=&#8221;f1&#8243;&gt;<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!&#8211; {if $goods.promote_price neq &#8220;&#8221;} &#8211;&gt;<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {$goods.promote_price}<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!&#8211; {else}&#8211;&gt;<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {$goods.shop_price}<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!&#8211;{\/if}&#8211;&gt;<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;\/font&gt;<\/font><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u4e0b\u9762\u589e\u52a0\u4ee3\u7801<\/p>\n<table cellspacing=\"0\" cellpadding=\"5\" style=\"border-right: #cccccc 1px solid;border-top: #cccccc 1px solid;background: #f7f7f7;border-left: #cccccc 1px solid;width: 90%;border-bottom: #cccccc 1px solid\">\n<tbody>\n<tr>\n<td><font>&lt;br&gt;<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!&#8211; {if $goods.goods_number eq 0} &#8211;&gt;<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;strong&gt;{$lang.goods_number}&lt;\/strong&gt;<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;font color=&#8217;red&#8217;&gt;{$lang.stock_up}&lt;\/font&gt;<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!&#8211; {else} &#8211;&gt;<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;strong&gt;{$lang.goods_number}&lt;\/strong&gt;<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {$goods.goods_number} {$goods.measure_unit}<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!&#8211; {\/if} &#8211;&gt;<\/font><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> 3\u3001\u6700\u540e\u4e00\u6b65\u8bb0\u5f97\u53bbECSHOP\u540e\u53f0\uff0c\u6e05\u9664\u4e00\u4e0b\u7f13\u5b58<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd1\u51e0\u65e5\u8bba\u575b\u91cc\u6709\u4eba\u95ee\u5230\u201c\u5728ECSHOP\u9996\u9875\u663e\u793a\u5546\u54c1\u5e93\u5b58\u7684\u65b9\u6cd5\u201d\uff0c \u4e0b\u9762\u662f\u4fee\u6539\u65b9\u6cd5 1\u3001 \u6253\u5f00 \/includes\/lib_goods.php \u6587\u4ef6\uff08\u5efa\u8bae\u4f7f\u7528editplus\uff09 \u627e\u5230\u4e0b\u9762\u4ee3\u7801\uff08\u5927\u6982\u5728287\u884c\u5de6\u53f3\uff09 &nbsp; \/\/\u53d6\u51fa\u6240\u6709\u7b26\u5408\u6761\u4ef6\u7684\u5546\u54c1\u6570\u636e\uff0c\u5e76\u5c06\u7ed3\u679c\u5b58\u5165\u5bf9\u5e94\u7684\u63a8\u8350\u7c7b\u578b\u6570\u7ec4\u4e2d &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $sql = &#8216;SELECT g.goods_id, g.goods_name, g.goods_name_style, g.market_price, g.shop_price AS org_price, g.promote_price, &#8216; . &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;IFNULL(mp.user_price, g.shop_price * &#8216;$_SESSION[discount]&#8217;) AS shop_price, &#8220;. \u4fee\u6539\u4e3a \/\/\u53d6\u51fa\u6240\u6709\u7b26\u5408\u6761\u4ef6\u7684\u5546\u54c1\u6570\u636e\uff0c\u5e76\u5c06\u7ed3\u679c\u5b58\u5165\u5bf9\u5e94\u7684\u63a8\u8350\u7c7b\u578b\u6570\u7ec4\u4e2d &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $sql = &#8216;SELECT g.goods_id, g.goods_name, g.goods_name_style, g.market_price, g.shop_price AS org_price, g.promote_price, &#8216; . &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;IFNULL(mp.user_price, g.shop_price * &#8216;$_SESSION[discount]&#8217;) AS shop_price, g.goods_number,&#8221;. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-59118","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/59118","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=59118"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/59118\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=59118"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=59118"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=59118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}