{"id":60372,"date":"2025-04-24T10:31:28","date_gmt":"2025-04-24T02:31:28","guid":{"rendered":"https:\/\/fwq.ai\/blog\/60372\/"},"modified":"2025-04-24T10:31:28","modified_gmt":"2025-04-24T02:31:28","slug":"ecshop%e4%bc%9a%e5%91%98%e4%b8%ad%e5%bf%83%e5%a2%9e%e5%8a%a0%e8%ae%a2%e5%8d%95%e6%90%9c%e7%b4%a2%e5%8a%9f%e8%83%bd-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/60372\/","title":{"rendered":"ecshop\u4f1a\u5458\u4e2d\u5fc3\u589e\u52a0\u8ba2\u5355\u641c\u7d22\u529f\u80fd"},"content":{"rendered":"<p>\u5b9e\u73b0ecshop\u4f1a\u5458\u4e2d\u5fc3\u589e\u52a0\u8ba2\u5355\u641c\u7d22\u529f\u80fd\uff0c\u5728user.php\u4e2d\u7684act=order_list\u4e2d\u589e\u52a0\u4ee5\u4e0b\u7a0b\u5e8f\u3002   &nbsp;   &nbsp;   $order_sn = isset($_REQUEST[&#8216;order_sn&#8217;])?$_REQUEST[&#8216;order_sn&#8217;]:&#8221;;   &nbsp;$consignee = isset($_REQUEST[&#8216;consignee&#8217;])?$_REQUEST[&#8216;consignee&#8217;]:&#8221;;   &nbsp;$start_date = isset($_REQUEST[&#8216;start_date&#8217;])?$_REQUEST[&#8216;start_date&#8217;]:&#8221;;   &nbsp;$end_date = isset($_REQUEST[&#8216;end_date&#8217;])?$_REQUEST[&#8216;end_date&#8217;]:&#8221;;   &nbsp;$pay_status = isset($_REQUEST[&#8216;pay_status&#8217;])?$_REQUEST[&#8216;pay_status&#8217;]:&#8221;;   &nbsp;$shipping_status = isset($_REQUEST[&#8216;shipping_status&#8217;])?$_REQUEST[&#8216;shipping_status&#8217;]:&#8221;;   &nbsp;$order_status = isset($_REQUEST[&#8216;order_status&#8217;])?$_REQUEST[&#8216;order_status&#8217;]:&#8221;;   &nbsp;$where =&#8221;&#8221;;   &nbsp;if($order_sn){   &nbsp; $where.=&#8221; and order_sn =&#8217;$order_sn'&#8221;;   &nbsp;}   &nbsp;if($consignee){   &nbsp; $where.=&#8221; and consignee = &#8216;$$consignee'&#8221;;   &nbsp;}   &nbsp;if($start_date){   &nbsp; $t = strtotime($start_date);   &nbsp; $where.=&#8221; and add_time &gt;= $t&#8221;;   &nbsp;}   &nbsp;if($end_date){   &nbsp; $t = strtotime($end_date);   &nbsp; $where.=&#8221; &nbsp;and add_time &lt;= $t&#8221;;   &nbsp;}   &nbsp;if($pay_status &amp;&amp; $pay_status!= &#8216;-1&#8217;){   &nbsp; $where.=&#8221; pay_status = &#8216;$pay_status'&#8221;;   &nbsp;}   &nbsp;if($shipping_status &amp;&amp; $shipping_status!= &#8216;-1&#8217;){   &nbsp; $where.=&#8221; and shipping_status = &#8216;$shipping_status'&#8221;;   &nbsp;}   &nbsp;if($order_status &amp;&amp; $order_status!= &#8216;-1&#8217;){   &nbsp; $where.=&#8221; and order_status = &#8216;$order_status'&#8221;;   &nbsp;}   &nbsp;   &nbsp;   &nbsp; &nbsp; $record_count = $db-&gt;getOne(&#8220;SELECT COUNT(*) FROM &#8221; .$ecs-&gt;table(&#8216;order_info&#8217;). &#8221; WHERE user_id = &#8216;$user_id&#8217; $where&#8221;);   &nbsp;   &nbsp; &nbsp; $pager &nbsp;= get_pager(&#8216;user.php&#8217;, array(&#8216;act&#8217; =&gt; $action,&#8217;order_status&#8217;=&gt;$order_status,&#8217;order_sn&#8217;=&gt;$order_sn,&#8217;consignee&#8217;=&gt;$consignee,&#8217;start_date&#8217;=&gt;$start_date,&#8217;end_date&#8217;=&gt;$end_date,&#8217;pay_status&#8217;=&gt;$pay_status,&#8217;shipping_status&#8217;=&gt;$shipping_status), $record_count, $page);   &nbsp;   &nbsp; &nbsp; $orders = get_user_orders($user_id, $pager[&#8216;size&#8217;], $pager[&#8216;start&#8217;]);   &nbsp; &nbsp; $merge &nbsp;= get_user_merge($user_id);   &nbsp;$smarty-&gt;assign(&#8216;os_list&#8217;, get_status_list(&#8216;order&#8217;));   &nbsp; &nbsp; $smarty-&gt;assign(&#8216;ps_list&#8217;, get_status_list(&#8216;payment&#8217;));   &nbsp; &nbsp; $smarty-&gt;assign(&#8216;ss_list&#8217;, get_status_list(&#8216;shipping&#8217;));   &nbsp; &nbsp; $smarty-&gt;assign(&#8216;merge&#8217;, &nbsp;$merge);   &nbsp; &nbsp; $smarty-&gt;assign(&#8216;pager&#8217;, &nbsp;$pager);   &nbsp; &nbsp; $smarty-&gt;assign(&#8216;orders&#8217;, $orders);   &nbsp; &nbsp; $smarty-&gt;display(&#8216;user_transaction.dwt&#8217;);   &nbsp;   &nbsp; &nbsp;\u5728\u5206\u9875\u6a21\u677f\u4e2d\uff0c\u4f20\u9012\u8981\u67e5\u8be2\u7684\u53c2\u6570\u3002   &nbsp;   2:\u6a21\u677f\u4e2d\u589e\u52a0\u4ee5\u4e0b\u7a0b\u5e8f\u3002\u7528\u4e8e\u641c\u7d22\u8868\u5355   &nbsp;   &nbsp;   &lt;link href=&#8221;js\/calendar\/calendar.css&#8221; rel=&#8221;stylesheet&#8221; type=&#8221;text\/css&#8221; \/&gt;   &nbsp; &nbsp; &lt;script type=&#8221;text\/javascript&#8221; src=&#8221;js\/calendar.php&#8221;&gt;&lt;\/script&gt;   &nbsp;   &nbsp;&lt;tr align=&#8221;center&#8221;&gt;   &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td bgcolor=&#8221;#ffffff&#8221; colspan=&#8221;5&#8243;&gt;&lt;div align=&#8221;left&#8221;&gt;\u8ba2\u5355\u7f16\u53f7&amp;nbsp;&amp;nbsp;   &nbsp; &nbsp;&lt;input type=&#8221;hidden&#8221; name=&#8221;act&#8221; value=&#8221;order_list&#8221;&gt;   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;input type=&#8221;text&#8221; name=&#8221;order_sn&#8221;&gt;&lt;br&gt;   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \u6536\u8d27\u4eba\u59d3\u540d   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;input type=&#8221;text&#8221; name=&#8221;consignee&#8221;&gt;   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;br&gt;   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \u4e0b\u5355\u65f6\u95f4&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;input name=&#8221;start_date&#8221; value=&#8221;{$start_date}&#8221; style=&#8221;width:80px;&#8221; onclick=&#8221;return showCalendar(this, &#8216;%Y-%m-%d&#8217;, false, false, this);&#8221; \/&gt;   &nbsp; &amp;nbsp;-   &nbsp; &lt;input name=&#8221;end_date&#8221; value=&#8221;{$end_date}&#8221; style=&#8221;width:80px;&#8221; onclick=&#8221;return showCalendar(this, &#8216;%Y-%m-%d&#8217;, false, false, this);&#8221; \/&gt;   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;br&gt;   &nbsp; &nbsp;\u8ba2\u5355\u72b6\u6001\uff1a &lt;select name=&#8221;order_status&#8221; id=&#8221;select9&#8243;&gt;   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;option value=&#8221;-1&#8243;&gt;\u8bf7\u9009\u62e9&lt;\/option&gt;   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {html_options options=$os_list selected=-1}   &nbsp; &nbsp; &nbsp; &nbsp; &lt;\/select&gt;   &nbsp; &nbsp; &nbsp; \u4ed8\u6b3e\u72b6\u6001\uff1a &nbsp; &nbsp; &nbsp; &lt;select name=&#8221;pay_status&#8221; id=&#8221;select11&#8243;&gt;   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;option value=&#8221;-1&#8243;&gt;\u8bf7\u9009\u62e9&lt;\/option&gt;   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {html_options options=$ps_list selected=-1}   &nbsp; &nbsp; &nbsp; &nbsp; &lt;\/select&gt;   &nbsp; &nbsp; &nbsp; &nbsp; \u53d1\u8d27\u72b6\u6001\uff1a &nbsp; &nbsp; &nbsp; &nbsp;&lt;select name=&#8221;shipping_status&#8221; id=&#8221;select10&#8243;&gt;   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;option value=&#8221;-1&#8243;&gt;\u8bf7\u9009\u62e9&lt;\/option&gt;   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {html_options options=$ss_list selected=-1}   &nbsp; &nbsp; &nbsp; &nbsp; &lt;\/select&gt;&amp;nbsp;&lt;input type=&#8221;submit&#8221; value=&#8221;\u641c\u7d22&#8221;&gt;&lt;\/div&gt;&lt;\/td&gt;   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;\/tr&gt;   &nbsp;   3:\u5c06\u4ee5\u4e0b\u641c\u7d22\u6761\u4ef6\u52a0\u5230\u641c\u7d22\u51fd\u6570\u4e2d\u53bb\u3002\u5728includes\/lib_transaction.php\u4e2decshop\u51fd\u6570get_user_orders()\u4e2d   &nbsp;   &nbsp;$order_sn = isset($_REQUEST[&#8216;order_sn&#8217;])?$_REQUEST[&#8216;order_sn&#8217;]:&#8221;;   &nbsp;$consignee = isset($_REQUEST[&#8216;consignee&#8217;])?$_REQUEST[&#8216;consignee&#8217;]:&#8221;;   &nbsp;$start_date = isset($_REQUEST[&#8216;start_date&#8217;])?$_REQUEST[&#8216;start_date&#8217;]:&#8221;;   &nbsp;$end_date = isset($_REQUEST[&#8216;end_date&#8217;])?$_REQUEST[&#8216;end_date&#8217;]:&#8221;;   &nbsp;$pay_status = isset($_REQUEST[&#8216;pay_status&#8217;])?$_REQUEST[&#8216;pay_status&#8217;]:&#8221;;   &nbsp;$shipping_status = isset($_REQUEST[&#8216;shipping_status&#8217;])?$_REQUEST[&#8216;shipping_status&#8217;]:&#8221;;   &nbsp;$order_status = isset($_REQUEST[&#8216;order_status&#8217;])?$_REQUEST[&#8216;order_status&#8217;]:&#8221;;   &nbsp;$where =&#8221;&#8221;;   &nbsp;if($order_sn){   &nbsp; $where.=&#8221; and order_sn =&#8217;$order_sn'&#8221;;   &nbsp;}   &nbsp;if($consignee){   &nbsp; $where.=&#8221; and consignee = &#8216;$$consignee'&#8221;;   &nbsp;}   &nbsp;if($start_date){   &nbsp; $t = strtotime($start_date);   &nbsp; $where.=&#8221; and add_time &gt;= $t&#8221;;   &nbsp;}   &nbsp;if($end_date){   &nbsp; $t = strtotime($end_date);   &nbsp; $where.=&#8221; &nbsp;and add_time &lt;= $t&#8221;;   &nbsp;}   &nbsp;if($pay_status &amp;&amp; $pay_status!= &#8216;-1&#8217;){   &nbsp; $where.=&#8221; pay_status = &#8216;$pay_status'&#8221;;   &nbsp;}   &nbsp;if($shipping_status &amp;&amp; $shipping_status!= &#8216;-1&#8217;){   &nbsp; $where.=&#8221; and shipping_status = &#8216;$shipping_status'&#8221;;   &nbsp;}   &nbsp;if($order_status &amp;&amp; $order_status!= &#8216;-1&#8217;){   &nbsp; $where.=&#8221; and order_status = &#8216;$order_status'&#8221;;   &nbsp;}   &nbsp;  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b9e\u73b0ecshop\u4f1a\u5458\u4e2d\u5fc3\u589e\u52a0\u8ba2\u5355\u641c\u7d22\u529f\u80fd\uff0c\u5728user.php\u4e2d\u7684act=order_list\u4e2d\u589e\u52a0\u4ee5\u4e0b\u7a0b\u5e8f\u3002 &nbsp; &nbsp; $order_sn = isset($_REQUEST[&#8216;order_sn&#8217;])?$_REQUEST[&#8216;order_sn&#8217;]:&#8221;; &nbsp;$consignee = isset($_REQUEST[&#8216;consignee&#8217;])?$_REQUEST[&#8216;consignee&#8217;]:&#8221;; &nbsp;$start_date = isset($_REQUEST[&#8216;start_date&#8217;])?$_REQUEST[&#8216;start_date&#8217;]:&#8221;; &nbsp;$end_date = isset($_REQUEST[&#8216;end_date&#8217;])?$_REQUEST[&#8216;end_date&#8217;]:&#8221;; &nbsp;$pay_status = isset($_REQUEST[&#8216;pay_status&#8217;])?$_REQUEST[&#8216;pay_status&#8217;]:&#8221;; &nbsp;$shipping_status = isset($_REQUEST[&#8216;shipping_status&#8217;])?$_REQUEST[&#8216;shipping_status&#8217;]:&#8221;; &nbsp;$order_status = isset($_REQUEST[&#8216;order_status&#8217;])?$_REQUEST[&#8216;order_status&#8217;]:&#8221;; &nbsp;$where =&#8221;&#8221;; &nbsp;if($order_sn){ &nbsp; $where.=&#8221; and order_sn =&#8217;$order_sn&#8217;&#8221;; &nbsp;} &nbsp;if($consignee){ &nbsp; $where.=&#8221; and consignee = &#8216;$$consignee&#8217;&#8221;; &nbsp;} &nbsp;if($start_date){ &nbsp; $t = strtotime($start_date); &nbsp; $where.=&#8221; and add_time &gt;= $t&#8221;; &nbsp;} &nbsp;if($end_date){ &nbsp; [&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-60372","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/60372","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=60372"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/60372\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=60372"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=60372"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=60372"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}