{"id":60739,"date":"2025-04-26T11:16:51","date_gmt":"2025-04-26T03:16:51","guid":{"rendered":"https:\/\/fwq.ai\/blog\/60739\/"},"modified":"2025-04-26T11:16:51","modified_gmt":"2025-04-26T03:16:51","slug":"zencart%e8%b4%ad%e7%89%a9%e8%bd%a6%e5%ae%9e%e7%8e%b0%e5%8a%a0%e5%87%8f%e6%a1%86","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/60739\/","title":{"rendered":"zencart\u8d2d\u7269\u8f66\u5b9e\u73b0\u52a0\u51cf\u6846"},"content":{"rendered":"<p>zencart\u7684\u4ea7\u54c1\u8be6\u7ec6\u9875\u9762\u5ba2\u6237\u4f53\u9a8c\u662f\u975e\u5e38\u4e0d\u597d\uff0c\u4e3a\u6b64\u63d0\u4f9b\u4e00\u4e2a\u6570\u91cf\u6846\u52a0\u51cf\u7684\u529e\u6cd5\uff1a   &nbsp;   \u8fdb\u5165includes\\templates\\\u4f60\u7684\u6a21\u677f\\templates\\tpl_product_info_display.php   &nbsp;   \u627e\u5230&lt;!&#8211;bof Add to Cart Box &#8211;&gt;   &nbsp;   &nbsp;   &nbsp;   \u5728\u524d\u9762\u52a0\u4e0a\u811a\u672c\u5f15\u7528   &nbsp;   &nbsp;   &nbsp;   &lt;script type=&#8221;text\/javascript&#8221; src=&#8221;http:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/1.6.2\/jquery.min.js&#8221;&gt;&lt;\/script&gt; &nbsp;\/\/\u5982\u679c\u7f51\u7ad9\u5df2\u5f15\u7528\u6b64\u5e93\uff0c\u53ef\u4ee5\u5c06\u8fd9\u4e00\u884c\u5220\u6389 &nbsp;&nbsp;   &lt;script&gt; &nbsp;&nbsp;   $(function(){ &nbsp;&nbsp;   &nbsp; &nbsp; var t = $(&#8220;#text_box&#8221;); &nbsp;&nbsp;   &nbsp; &nbsp; $(&#8220;#add&#8221;).click(function(){ &nbsp; &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; t.val(parseInt(t.val())+1) &nbsp;&nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; if (parseInt(t.val())!=1){ &nbsp;&nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $(&#8216;#min&#8217;).attr(&#8216;disabled&#8217;,false); &nbsp;&nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp;&nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; }) &nbsp; &nbsp;&nbsp;   &nbsp; &nbsp; $(&#8220;#min&#8221;).click(function(){ &nbsp;&nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; t.val(parseInt(t.val())-1) &nbsp;&nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; if (parseInt(t.val())==1){ &nbsp;&nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $(&#8216;#min&#8217;).attr(&#8216;disabled&#8217;,true); &nbsp;&nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp;&nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; if(parseInt(t.val())==0){ &nbsp;&nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; alert(&#8220;Quantity can not be less than 1 !&#8221;); &nbsp;&nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; t.val(parseInt(t.val())+1) &nbsp;&nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp;&nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; }) &nbsp;&nbsp;   &nbsp;&nbsp;   }) &nbsp;&nbsp;   &lt;\/script&gt; &nbsp;   \u63a5\u7740\u627e\u5230\uff1a   &nbsp;   \/\/ show the quantity box &nbsp;&nbsp;   &nbsp; &nbsp; $the_button = PRODUCTS_ORDER_QTY_TEXT . &#8216;&lt;input type=&#8221;text&#8221; name=&#8221;cart_quantity&#8221; value=&#8221;&#8216; . (zen_get_buy_now_qty($_GET[&#8216;products_id&#8217;])) . &#8216;&#8221; maxlength=&#8221;6&#8243; size=&#8221;4&#8243; \/&gt;&lt;br \/&gt;&#8217; . zen_get_products_quantity_min_units_display((int)$_GET[&#8216;products_id&#8217;]) . &#8216;&lt;br \/&gt;&#8217; . zen_draw_hidden_field(&#8216;products_id&#8217;, (int)$_GET[&#8216;products_id&#8217;]) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT); &nbsp;&nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp;   \u66ff\u6362\u6210   &nbsp;   \/\/ show the quantity box &nbsp;&nbsp;   &nbsp; &nbsp; $the_button = &#8216;&lt;input id=&#8221;min&#8221; name=&#8221;&#8221; type=&#8221;button&#8221; value=&#8221;-&#8221; \/&gt;&lt;input id=&#8221;text_box&#8221; style=&#8221;height:20px; font-size:15px; text-align:center; font-weight:bold;border: 2px solid #333333;&#8221; type=&#8221;text&#8221; name=&#8221;cart_quantity&#8221; value=&#8221;&#8216; . (zen_get_buy_now_qty($_GET[&#8216;products_id&#8217;])) . &#8216;&#8221; maxlength=&#8221;6&#8243; size=&#8221;4&#8243; \/&gt;&lt;input id=&#8221;add&#8221; name=&#8221;&#8221; type=&#8221;button&#8221; value=&#8221;+&#8221; \/&gt;&lt;br \/&gt;&#8217; . zen_get_products_quantity_min_units_display((int)$_GET[&#8216;products_id&#8217;]) . &#8216;&lt;br \/&gt;&#8217; . zen_draw_hidden_field(&#8216;products_id&#8217;, (int)$_GET[&#8216;products_id&#8217;]) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT); &nbsp;&nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp;   \u4e0b\u9762\u662f\u6548\u679c\u56fe\uff1a<br \/>\n<br \/> <br \/>\n<img decoding=\"async\" src=\"https:\/\/www.ldhost.cn\/helphmb\/uploads\/allimg\/150709\/1Q3104227-0.jpg\" style=\"width: 261px;height: 82px\" class=\"aligncenter\" title=\"zencart\u8d2d\u7269\u8f66\u5b9e\u73b0\u52a0\u51cf\u6846\u63d2\u56fe\" alt=\"zencart\u8d2d\u7269\u8f66\u5b9e\u73b0\u52a0\u51cf\u6846\u63d2\u56fe\" \/>  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>zencart\u7684\u4ea7\u54c1\u8be6\u7ec6\u9875\u9762\u5ba2\u6237\u4f53\u9a8c\u662f\u975e\u5e38\u4e0d\u597d\uff0c\u4e3a\u6b64\u63d0\u4f9b\u4e00\u4e2a\u6570\u91cf\u6846\u52a0\u51cf\u7684\u529e\u6cd5\uff1a &nbsp; \u8fdb\u5165includes\\templates\\\u4f60\u7684\u6a21\u677f\\templates\\tpl_product_info_display.php &nbsp; \u627e\u5230&lt;!&#8211;bof Add to Cart Box &#8211;&gt; &nbsp; &nbsp; &nbsp; \u5728\u524d\u9762\u52a0\u4e0a\u811a\u672c\u5f15\u7528 &nbsp; &nbsp; &nbsp; &lt;script type=&#8221;text\/javascript&#8221; src=&#8221;http:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/1.6.2\/jquery.min.js&#8221;&gt;&lt;\/script&gt; &nbsp;\/\/\u5982\u679c\u7f51\u7ad9\u5df2\u5f15\u7528\u6b64\u5e93\uff0c\u53ef\u4ee5\u5c06\u8fd9\u4e00\u884c\u5220\u6389 &nbsp;&nbsp; &lt;script&gt; &nbsp;&nbsp; $(function(){ &nbsp;&nbsp; &nbsp; &nbsp; var t = $(&#8220;#text_box&#8221;); &nbsp;&nbsp; &nbsp; &nbsp; $(&#8220;#add&#8221;).click(function(){ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; t.val(parseInt(t.val())+1) &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (parseInt(t.val())!=1){ &nbsp;&nbsp; &nbsp; &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-60739","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/60739","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=60739"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/60739\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=60739"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=60739"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=60739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}