{"id":199130,"date":"2025-05-03T12:54:18","date_gmt":"2025-05-03T04:54:18","guid":{"rendered":"https:\/\/server.hk\/cnblog\/199130\/"},"modified":"2025-05-03T12:54:18","modified_gmt":"2025-05-03T04:54:18","slug":"%e5%9c%a8ecshop%e5%90%8e%e5%8f%b0%e6%89%93%e5%8d%b0%e8%ae%a2%e5%8d%95%e9%a1%b5%e9%9d%a2%e5%b0%86%e5%95%86%e5%93%81%e6%8c%89%e8%b4%a7%e5%8f%b7%e6%8e%92%e5%ba%8f","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/199130\/","title":{"rendered":"\u5728Ecshop\u540e\u53f0\u6253\u5370\u8ba2\u5355\u9875\u9762\u5c06\u5546\u54c1\u6309\u8d27\u53f7\u6392\u5e8f"},"content":{"rendered":"<p>&nbsp;<span style=\"font-family: \u5b8b\u4f53, Verdana, Arial;font-size: 12px;line-height: 18px\">ECSHOP\u540e\u53f0\u7ba1\u7406\u91cc\u7684\u201c\u6253\u5370\u8ba2\u5355&#8221; \u9875\u9762\u91cc\u7684\u5546\u54c1\u6392\u5e8f\u6709\u70b9\u4e71\uff0c\u73b0\u5728\u60f3\u6539\u6210\u6309\u5e8f\u53f7\u6765\u6392\u5e8f\uff0c\u4fee\u6539\u65b9\u6cd5\u5982\u4e0b<\/p>\n<p> \u4e0b\u9762\u662f\u57282.7.2\u57fa\u7840\u4e0a\u505a\u7684\u4fee\u6539<\/p>\n<p> \u6253\u5f00 admin\/order.php&nbsp;&nbsp;\u6587\u4ef6<\/p>\n<p> \u627e\u5230(\u5927\u7ea6\u5728311\u884c\u5de6\u53f3)<\/p>\n<p> <\/span><\/p>\n<table cellspacing=\"0\" cellpadding=\"5\" style=\"border-right-width: 1px;border-right-style: solid;border-top-width: 1px;border-top-style: solid;background-image: initial;background-attachment: initial;border-left-width: 1px;border-left-style: solid;width: 674px;border-bottom-width: 1px;border-bottom-style: solid;background-position: initial initial;background-repeat: initial initial\">\n<tbody>\n<tr>\n<td><font style=\"border-top-style: none;border-right-style: none;border-bottom-style: none;border-left-style: none;border-width: initial;border-color: initial;list-style-type: none;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px\">$sql = &#8220;SELECT o.*, IF(o.product_id &gt; 0, p.product_number, g.goods_number) AS storage, o.goods_attr, g.suppliers_id, IFNULL(b.brand_name, &#8221;) AS brand_name, p.product_sn<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FROM &#8221; . $ecs-&gt;table(&#8216;order_goods&#8217;) . &#8221; AS o<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LEFT JOIN &#8221; . $ecs-&gt;table(&#8216;products&#8217;) . &#8221; AS p<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ON p.product_id = o.product_id<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LEFT JOIN &#8221; . $ecs-&gt;table(&#8216;goods&#8217;) . &#8221; AS g<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ON o.goods_id = g.goods_id<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LEFT JOIN &#8221; . $ecs-&gt;table(&#8216;brand&#8217;) . &#8221; AS b<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ON g.brand_id = b.brand_id<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE o.order_id = &#8216;$order[order_id]'&#8221;;<\/font><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u4fee\u6539\u4e3a<\/p>\n<p><span style=\"font-family: \u5b8b\u4f53, Verdana, Arial;font-size: 12px;line-height: 18px\"> <\/p>\n<table cellspacing=\"0\" cellpadding=\"5\" style=\"border-right-width: 1px;border-right-style: solid;border-top-width: 1px;border-top-style: solid;background-image: initial;background-attachment: initial;border-left-width: 1px;border-left-style: solid;width: 673px;border-bottom-width: 1px;border-bottom-style: solid;background-position: initial initial;background-repeat: initial initial\">\n<tbody>\n<tr>\n<td><font style=\"border-top-style: none;border-right-style: none;border-bottom-style: none;border-left-style: none;border-width: initial;border-color: initial;list-style-type: none;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px\">$sql = &#8220;SELECT o.*, IF(o.product_id &gt; 0, p.product_number, g.goods_number) AS storage, o.goods_attr, g.suppliers_id, IFNULL(b.brand_name, &#8221;) AS brand_name, p.product_sn<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FROM &#8221; . $ecs-&gt;table(&#8216;order_goods&#8217;) . &#8221; AS o<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LEFT JOIN &#8221; . $ecs-&gt;table(&#8216;products&#8217;) . &#8221; AS p<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ON p.product_id = o.product_id<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LEFT JOIN &#8221; . $ecs-&gt;table(&#8216;goods&#8217;) . &#8221; AS g<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ON o.goods_id = g.goods_id<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LEFT JOIN &#8221; . $ecs-&gt;table(&#8216;brand&#8217;) . &#8221; AS b<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ON g.brand_id = b.brand_id<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE o.order_id = &#8216;$order[order_id]&#8217;order by g.goods_sn&#8221;;<\/p>\n<p> <\/font><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u8fd9\u6837\u4fee\u6539\u4ee5\u540e\u5c31\u53ef\u4ee5\u6309\u7167\u5546\u54c1\u5e8f\u53f7\u8fdb\u884c\u6392\u5e8f\u4e86<\/span> <\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp;ECSHOP\u540e\u53f0\u7ba1\u7406&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4925],"tags":[],"class_list":["post-199130","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/199130","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=199130"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/199130\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=199130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=199130"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=199130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}