{"id":198991,"date":"2025-05-03T12:04:52","date_gmt":"2025-05-03T04:04:52","guid":{"rendered":"https:\/\/server.hk\/cnblog\/198991\/"},"modified":"2025-05-03T12:04:52","modified_gmt":"2025-05-03T04:04:52","slug":"%e5%9c%a8ecshop%e9%a6%96%e9%a1%b5%e7%9a%84%e5%8f%91%e8%b4%a7%e6%9f%a5%e8%af%a2%e9%87%8c%e6%98%be%e7%a4%ba%e7%9c%81%e5%b8%82%e5%8c%ba%e5%9c%b0%e5%9d%80%e4%bf%a1%e6%81%af","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/198991\/","title":{"rendered":"\u5728ECSHOP\u9996\u9875\u7684\u53d1\u8d27\u67e5\u8be2\u91cc\u663e\u793a\u7701\u5e02\u533a\u5730\u5740\u4fe1\u606f"},"content":{"rendered":"<p>\u95ee\u9898\u63cf\u8ff0\uff1a<br \/>\n<br \/> \u9ed8\u8ba4\u7684ECSHOP\u7cfb\u7edf\uff0c\u9996\u9875\u53d1\u8d27\u67e5\u8be2\u53ea\u663e\u793a\u8ba2\u5355\u53f7\u548c\u53d1\u8d27\u5355\u53f7\uff0c\u5982\u4f55\u5c06\u9001\u8d27\u5730\u5740\u4e2d\u7684\u201c\u7701\u4efd+\u57ce\u5e02+\u533a\u53bf\u201d \u90fd\u663e\u793a\u51fa\u6765\u5462\uff1f<\/p>\n<p> \u4e0b\u9762\u662f\u5728ECSHOP 2.7.2 \u5b98\u65b9\u9ed8\u8ba4\u6a21\u677f\u57fa\u7840\u4e0a\u7684\u4fee\u6539\u6559\u7a0b\uff1a<br \/>\n<br \/> 1\u3001<br \/>\n<br \/> \u4fee\u6539 index.php \u6587\u4ef6<br \/>\n<br \/> \u5c06 <\/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>$sql = &#8216;SELECT o.order_sn, o.invoice_no, s.shipping_code FROM &#8216; . $GLOBALS[&#8216;ecs&#8217;]-&gt;table(&#8216;order_info&#8217;) . &#8216; AS o&#8217; .<\/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>$sql = &#8216;SELECT o.province,o.city,o.district,o.order_sn, o.invoice_no, s.shipping_code FROM &#8216; . $GLOBALS[&#8216;ecs&#8217;]-&gt;table(&#8216;order_info&#8217;) . &#8216; AS o&#8217; .<\/font><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> 2\u3001<br \/>\n<br \/> \u7ee7\u7eed\u4fee\u6539index.php \u6587\u4ef6<br \/>\n<br \/> \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>$all[$key][&#8216;invoice_no&#8217;] = $shipping-&gt;query((string)$row[&#8216;invoice_no&#8217;]);<\/font><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u5728\u5b83\u4e0b\u9762\u589e\u52a0\u51e0\u884c\u4ee3\u7801<br \/>\n <\/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>$all[$key][&#8216;province&#8217;]=$GLOBALS[&#8216;db&#8217;]-&gt;getOne(&#8220;select region_name from &#8220;.$GLOBALS[&#8216;ecs&#8217;]-&gt;table(&#8216;region&#8217;).&#8221; where region_id=&#8221;.$row[&#8216;province&#8217;]);<br \/> &nbsp;&nbsp;&nbsp;$all[$key][&#8216;city&#8217;]=$GLOBALS[&#8216;db&#8217;]-&gt;getOne(&#8220;select region_name from &#8220;.$GLOBALS[&#8216;ecs&#8217;]-&gt;table(&#8216;region&#8217;).&#8221; where region_id=&#8221;.$row[&#8216;city&#8217;]);<br \/> &nbsp;&nbsp;&nbsp;$all[$key][&#8216;district&#8217;]=$GLOBALS[&#8216;db&#8217;]-&gt;getOne(&#8220;select region_name from &#8220;.$GLOBALS[&#8216;ecs&#8217;]-&gt;table(&#8216;region&#8217;).&#8221; where region_id=&#8221;.$row[&#8216;district&#8217;]);<\/font><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> 3\u3001\u4fee\u6539 \/themes\/default\/library\/invoice_query.lbi&nbsp; \u6587\u4ef6<br \/>\n<br \/> \u627e\u5230<br \/>\n <\/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><span style=\"color: #ff0000\">{$lang.order_number} {$invoice.order_sn}&lt;br \/&gt;<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u5728\u5b83\u4e0b\u9762\u589e\u52a0\u4e00\u884c\u6a21\u677f\u6807\u7b7e\u4ee3\u7801<br \/>\n <\/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>{$invoice.province}-{$invoice.city}-{$invoice.district}&lt;br \/&gt;<\/font><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u5230\u540e\u53f0\u6e05\u9664\u7f13\u5b58\u540e\uff0c\u5237\u65b0\u9996\u9875\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u95ee\u9898\u63cf\u8ff0\uff1a \u9ed8\u8ba4\u7684ECSHOP\u7cfb&#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-198991","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/198991","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=198991"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/198991\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=198991"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=198991"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=198991"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}