{"id":61036,"date":"2025-04-26T10:17:00","date_gmt":"2025-04-26T02:17:00","guid":{"rendered":"https:\/\/fwq.ai\/blog\/61036\/"},"modified":"2025-04-26T10:17:00","modified_gmt":"2025-04-26T02:17:00","slug":"zencart%e6%8c%89%e6%97%b6%e9%97%b4%e9%9a%8f%e6%9c%ba%e6%95%b0%e7%bb%93%e5%90%88%e4%ba%a7%e7%94%9f%e8%ae%a2%e5%8d%95%e5%8f%b7%e8%ae%a2%e5%8d%95%e6%96%b9%e4%be%bf%e7%ae%a1%e7%90%86%e4%b8%8e%e7%a1%ae","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/61036\/","title":{"rendered":"Zencart\u6309\u65f6\u95f4+\u968f\u673a\u6570\u7ed3\u5408\u4ea7\u751f\u8ba2\u5355\u53f7(\u8ba2\u5355\u65b9\u4fbf\u7ba1\u7406\u4e0e\u786e\u8ba4)"},"content":{"rendered":"<p>Zencart\u6309\u65f6\u95f4+\u968f\u673a\u6570\u7ed3\u5408\u4ea7\u751f\u8ba2\u5355\u53f7(\u8ba2\u5355\u65b9\u4fbf\u7ba1\u7406\u4e0e\u786e\u8ba4),\u6ce8\u610f\uff1a <\/p>\n<p> \u4fee\u6539\u524d\u4e00\u5b9a\u8981\u5907\u4efd\u597d\u81ea\u5df1\u7684\u6570\u636e\u5e93\uff01\uff01\uff01<\/p>\n<p> \u628aorders\u5b57\u6bb5\u4e2dorders_id \u7684 Auto_increment \u5173\u95ed\uff1b<\/p>\n<p> 1\u3001\u5728 function create($zf_ot_modules, $zf_mode = 2) {&nbsp;<br \/> global $db;\u4e0b\u63d2\u5165<\/p>\n<p> \/*&#8212;&#8212;\u6309\u65f6\u95f4+\u968f\u673a\u6570\u7ed3\u5408\u4ea7\u751f\u8ba2\u5355\u53f7&#8212;&#8211;*\/&nbsp;<br \/> $t1 = date(&#8220;Ymd&#8221;);&nbsp;<br \/> srand ((float) microtime() * 10000000);&nbsp;<br \/> $input = array (&#8220;1&#8221;, &#8220;2&#8221;, &#8220;3&#8221;, &#8220;4&#8221;, &#8220;5&#8221;, &#8220;6&#8221;, &#8220;7&#8221;, &#8220;8&#8221;, &#8220;9&#8221;, &#8220;0&#8221;);&nbsp;<br \/> $rand_keys = array_rand ($input, 2);&nbsp;<br \/> \/\/$t1 = $input[$rand_keys[0]];&nbsp;<br \/> $t2 = $input[$rand_keys[1]];&nbsp;<br \/> $t3 = rand(0,9);<\/p>\n<p> $ordernum = $t1.$t2.$t3;&nbsp;<br \/> \/*&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;*\/<\/p>\n<p> &nbsp;<\/p>\n<p> 2\u3001 if ($_SESSION[&#8216;shipping&#8217;] == &#8216;free_free&#8217;) {&nbsp;<br \/> $this-&gt;info[&#8216;shipping_module_code&#8217;] = $_SESSION[&#8216;shipping&#8217;];&nbsp;<br \/> }\u63d2\u5165<\/p>\n<p> \/*\u5728\u8fd9\u91cc\u6dfb\u52a0orders_id\u5b57\u6bb5\uff0c\u624b\u5de5\u63d2\u5165\uff1a*\/&nbsp;<br \/> $sql_data_array = array(&#8216;orders_id&#8217; =&gt; $ordernum,<\/p>\n<p> &nbsp;<\/p>\n<p> 3\u3001 zen_db_perform(TABLE_ORDERS, $sql_data_array);\u63d2\u5165\u4fee\u6539<\/p>\n<p> \/*\u4fee\u6539\u539f\u6765\u7684\u8c03\u7528\u81ea\u52a8\u63d2\u5165\u51fd\u6570\u4e3a$ordernum\u53d8\u91cf*\/&nbsp;<br \/> $insert_id = $ordernum;<\/p>\n<p> \/\/ $insert_id = $db-&gt;Insert_ID();<\/p>\n<p> for ($i=0, $n=sizeof($zf_ot_modules); $i&lt;$n; $i++) {&nbsp;<br \/> $sql_data_array = array(&#8216;orders_id&#8217; =&gt; $insert_id,<\/p>\n<p> \u4ee5\u4e0a\u7b80\u5355\u7684\u4fee\u6539\u540e\uff0c\u8ba2\u5355\u53f7\u4f1a\u8f93\u51fa\u5982\uff1a20101201013334985&nbsp;<br \/> \u8868\u793a\uff1a20010\u5e7412\u67081\u65e51\u65f633\u520634\u79d2985\u968f\u673a\u6570&nbsp;<br \/> \u539fmod\u51fa\u5904\uff1awww.oscommerce.com\uff1b\u6211\u4fee\u6539\u4e86\u65e5\u671f\u663e\u793a\u53ca\u8ba2\u5355\u53f7\u6392\u5217\u987a\u5e8f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Zencart\u6309\u65f6\u95f4+\u968f\u673a\u6570\u7ed3\u5408\u4ea7\u751f\u8ba2\u5355\u53f7(\u8ba2\u5355\u65b9\u4fbf\u7ba1\u7406\u4e0e\u786e\u8ba4),\u6ce8\u610f\uff1a \u4fee\u6539\u524d\u4e00\u5b9a\u8981\u5907\u4efd\u597d\u81ea\u5df1\u7684\u6570\u636e\u5e93\uff01\uff01\uff01 \u628aorders\u5b57\u6bb5\u4e2dorders_id \u7684 Auto_increment \u5173\u95ed\uff1b 1\u3001\u5728 function create($zf_ot_modules, $zf_mode = 2) {&nbsp; global $db;\u4e0b\u63d2\u5165 \/*&#8212;&#8212;\u6309\u65f6\u95f4+\u968f\u673a\u6570\u7ed3\u5408\u4ea7\u751f\u8ba2\u5355\u53f7&#8212;&#8211;*\/&nbsp; $t1 = date(&#8220;Ymd&#8221;);&nbsp; srand ((float) microtime() * 10000000);&nbsp; $input = array (&#8220;1&#8221;, &#8220;2&#8221;, &#8220;3&#8221;, &#8220;4&#8221;, &#8220;5&#8221;, &#8220;6&#8221;, &#8220;7&#8221;, &#8220;8&#8221;, &#8220;9&#8221;, &#8220;0&#8221;);&nbsp; $rand_keys = array_rand ($input, 2);&nbsp; \/\/$t1 = $input[$rand_keys[0]];&nbsp; $t2 = $input[$rand_keys[1]];&nbsp; $t3 = rand(0,9); $ordernum = $t1.$t2.$t3;&nbsp; \/*&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;*\/ [&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-61036","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/61036","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=61036"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/61036\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=61036"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=61036"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=61036"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}