{"id":199108,"date":"2025-05-03T12:43:07","date_gmt":"2025-05-03T04:43:07","guid":{"rendered":"https:\/\/server.hk\/cnblog\/199108\/"},"modified":"2025-05-03T12:43:07","modified_gmt":"2025-05-03T04:43:07","slug":"%e5%b0%86ecshop%e4%b8%ad%e6%94%b6%e8%b4%a7%e4%ba%ba%e4%bf%a1%e6%81%af%e7%9a%84%e7%9c%81%e5%b8%82%e5%8c%ba%e8%ae%be%e6%88%90%e9%9d%9e%e5%bf%85%e9%80%89%e9%a1%b9","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/199108\/","title":{"rendered":"\u5c06Ecshop\u4e2d\u6536\u8d27\u4eba\u4fe1\u606f\u7684\u7701\u5e02\u533a\u8bbe\u6210\u975e\u5fc5\u9009\u9879"},"content":{"rendered":"<p>&nbsp;<span style=\"font-family: \u5b8b\u4f53, Verdana, Arial;line-height: 18px;font-size: 12px\">\u4e00\u822c\u9762\u5411\u56fd\u5916\u7528\u6237\u7684ECSHOP\u5546\u57ce\uff0c\u53ef\u80fd\u4f1a\u6709\u8fd9\u65b9\u9762\u7684\u9700\u6c42\uff1a\u3010\u5c06Ecshop\u4e2d\u6536\u8d27\u4eba\u4fe1\u606f\u7684\u7701\u5e02\u533a\u8bbe\u6210\u975e\u5fc5\u9009\u9879\u3011\uff0c <\/span><\/p>\n<p 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\">\u5176\u5b9e\u4e5f\u5c31\u662f\u53ea\u7559\u4e00\u4e2a\u201c\u8bf7\u9009\u62e9\u56fd\u5bb6\u201d\u7684\u4e0b\u62c9\u9009\u62e9\u6846\u3002<\/p>\n<p> \u7b2c\u4e00\u6b65\uff0c\u5148\u4fee\u6539\u76f8\u5173JS\u6587\u4ef6<br \/> \u6253\u5f00 \/js\/shopping_flow.js \u6587\u4ef6<br \/> \u5c06\u4e0b\u9762JS\u4ee3\u7801\u5220\u9664\u6389<\/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>\n<p 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\"><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\">if (frm.elements[&#8216;province&#8217;] &amp;&amp; frm.elements[&#8216;province&#8217;].value == 0 &amp;&amp; frm.elements[&#8216;province&#8217;].length &gt; 1)<br \/> &nbsp; {<br \/> &nbsp;&nbsp;&nbsp; err = true;<br \/> &nbsp;&nbsp;&nbsp; msg.push(province_not_null);<br \/> &nbsp; }<\/font><\/p>\n<p 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\"><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\">&nbsp; if (frm.elements[&#8216;city&#8217;] &amp;&amp; frm.elements[&#8216;city&#8217;].value == 0 &amp;&amp; frm.elements[&#8216;city&#8217;].length &gt; 1)<br \/> &nbsp; {<br \/> &nbsp;&nbsp;&nbsp; err = true;<br \/> &nbsp;&nbsp;&nbsp; msg.push(city_not_null);<br \/> &nbsp; }<\/font><\/p>\n<p 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\"><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\">&nbsp; if (frm.elements[&#8216;district&#8217;] &amp;&amp; frm.elements[&#8216;district&#8217;].length &gt; 1)<br \/> &nbsp; {<br \/> &nbsp;&nbsp;&nbsp; if (frm.elements[&#8216;district&#8217;].value == 0)<br \/> &nbsp;&nbsp;&nbsp; {<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; err = true;<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; msg.push(district_not_null);<br \/> &nbsp;&nbsp;&nbsp; }<br \/> &nbsp; }<\/font><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u7b2c\u4e8c\u6b65\uff0c\u4fee\u6539\u76f8\u5173\u7a0b\u5e8f\u6587\u4ef6<br \/>\n<br \/> \u4fee\u6539 \/inlcudes\/lib_order.php \u6587\u4ef6<br \/>\n<br \/> \u5c06\u4e0b\u5217PHP\u4ee3\u7801\u5220\u9664\u6389<br \/>\n <\/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\">&nbsp;if ($res)<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (empty($consignee[&#8216;province&#8217;]))<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/* \u6ca1\u6709\u8bbe\u7f6e\u7701\u4efd\uff0c\u68c0\u67e5\u5f53\u524d\u56fd\u5bb6\u4e0b\u9762\u6709\u6ca1\u6709\u8bbe\u7f6e\u7701\u4efd *\/<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $pro = get_regions(1, $consignee[&#8216;country&#8217;]);<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $res = empty($pro);<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; elseif (empty($consignee[&#8216;city&#8217;]))<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/* \u6ca1\u6709\u8bbe\u7f6e\u57ce\u5e02\uff0c\u68c0\u67e5\u5f53\u524d\u7701\u4e0b\u9762\u6709\u6ca1\u6709\u57ce\u5e02 *\/<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $city = get_regions(2, $consignee[&#8216;province&#8217;]);<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $res = empty($city);<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; elseif (empty($consignee[&#8216;district&#8217;]))<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $dist = get_regions(3, $consignee[&#8216;city&#8217;]);<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $res = empty($dist);<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<\/font><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u7136\u540e\u6536\u8d27\u4eba\u4fe1\u606f\u90a3\u91cc\uff0c\u53ea\u9009\u62e9\u56fd\u5bb6\u4e0d\u9009\u62e9\u7701\u5e02\u533a\uff0c\u4e5f\u7167\u6837\u80fd\u63d0\u4ea4\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp;\u4e00\u822c\u9762\u5411\u56fd\u5916\u7528\u6237\u7684E&#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-199108","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/199108","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=199108"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/199108\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=199108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=199108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=199108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}