{"id":60699,"date":"2025-04-26T08:29:00","date_gmt":"2025-04-26T00:29:00","guid":{"rendered":"https:\/\/fwq.ai\/blog\/60699\/"},"modified":"2025-04-26T08:29:00","modified_gmt":"2025-04-26T00:29:00","slug":"%e7%9b%b4%e6%8e%a5%e5%9c%a8zencart%e9%a6%96%e9%a1%b5%e7%9a%84%e6%9c%80%e6%96%b0%e5%95%86%e5%93%81%e4%b8%8a%e9%9d%a2%e5%8a%a0%e4%b8%8a%e7%9b%b4%e6%8e%a5%ef%bc%82%e8%b4%ad%e4%b9%b0","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/60699\/","title":{"rendered":"\u76f4\u63a5\u5728zencart\u9996\u9875\u7684\u6700\u65b0\u5546\u54c1\u4e0a\u9762\u52a0\u4e0a\u76f4\u63a5\uff02\u8d2d\u4e70"},"content":{"rendered":"<p>&nbsp;\u5728zencart\u9996\u9875\u7684\u6700\u65b0\u5546\u54c1\u4e0a\u9762<span style=\"font-size: 14px\">\u8981\u6dfb\u52a0&#8221;\u8d2d\u4e70&#8221;\u6309\u94ae\uff0c\u53ef\u4ee5\u53c2\u8003\u6b64\u6559\u7a0b:<\/span><\/p>\n<p><span>\/includes\/templates\/template_default\/templates l_product_info_display.php<\/span><\/p>\n<p><span>\u8fd9\u4e2a\u6587\u4ef6\u4e2d\u8d2d\u4e70\u6309\u94ae\u7684<span>\u4ee3\u7801<\/span>\u3002<\/span><\/p>\n<p><span>\u9700\u8981\u4fee\u6539\u7684\u4ee3\u7801\u5728\uff1a<\/span><\/p>\n<p><span>\/includes\/modules\/new_products.php<\/span><\/p>\n<p><span>\u5546\u5e97\u9996\u9875\u4e0a\u663e\u793a\u7684\u5546\u54c1\u7684\u5185\u5bb9\u90fd\u5728\u53d8\u91cf$list_box_contents\u4e2d\uff0c\u52a0\u4e0a\u9700\u8981\u7684\u5185\u5bb9\u5c31\u53ef\u4ee5\u4e86\u3002<\/span><\/p>\n<p><span>$list_box_contents[$row][$col] = array(&#8216;align&#8217; =&gt; &#8216;center&#8217;,<\/span><\/p>\n<p><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#8216;params&#8217; =&gt; &#8216;class=&#8221;smallText&#8221; width=&#8221;&#8216; . $col_width . &#8216;%&#8221; valign=&#8221;top&#8221;&#8216;,<\/span><\/p>\n<p><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#8216;text&#8217; =&gt; &#8216;&lt;a href=&#8221;&#8216; . zen_href_link(zen_get_info_page($new_products-&gt;fields[&#8216;products_id&#8217;]), &#8216;products_id=&#8217; . $new_products-&gt;fields[&#8216;products_id&#8217;]) . &#8216;&#8221;&gt;&#8217; . zen_image(DIR_WS_IMAGES . $new_products-&gt;fields[&#8216;products_image&#8217;], $new_products-&gt;fields[&#8216;products_name&#8217;], IMAGE_PRODUCT_NEW_WIDTH, IMAGE_PRODUCT_NEW_HEIGHT) . &#8216;&lt;\/a&gt;&lt;br \/&gt;&lt;a href=&#8221;&#8216; . zen_href_link(zen_get_info_page($new_products-&gt;fields[&#8216;products_id&#8217;]), &#8216;products_id=&#8217; . $new_products-&gt;fields[&#8216;products_id&#8217;]) . &#8216;&#8221;&gt;&#8217; . $new_products-&gt;fields[&#8216;products_name&#8217;] . &#8216;&lt;\/a&gt;&lt;br \/&gt;&#8217; . $products_price); &nbsp;<\/span><\/p>\n<p><span><br \/> <\/span><\/p>\n<p><span>\u6539\u4e3a\uff1a<\/span><\/p>\n<p><span>if ($products_qty_box_status == &#8216;0&#8217; or $products_quantity_order_max== &#8216;1&#8217;) {<\/span><\/p>\n<p><span>&nbsp; &nbsp; &nbsp; \/\/ hide the quantity box and default to 1<\/span><\/p>\n<p><span>&nbsp; &nbsp; &nbsp; $the_button = &#8216;&lt;input type=&#8221;hidden&#8221; name=&#8221;cart_quantity&#8221; value=&#8221;1&#8243; \/&gt;&#8217; . zen_draw_hidden_field(&#8216;products_id&#8217;, (int)$new_products-&gt;fields[&#8216;products_id&#8217;]) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);<\/span><\/p>\n<p><span>&nbsp; &nbsp; &nbsp; } else {<\/span><\/p>\n<p><span>&nbsp; &nbsp; &nbsp; \/\/ show the quantity box<\/span><\/p>\n<p><span>&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($new_products-&gt;fields[&#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)$new_products-&gt;fields[&#8216;products_id&#8217;]) . &#8216;&lt;br \/&gt;&#8217; . zen_draw_hidden_field(&#8216;products_id&#8217;, (int)$new_products-&gt;fields[&#8216;products_id&#8217;]) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);<\/span><\/p>\n<p><span>&nbsp; &nbsp; &nbsp; };<\/span><\/p>\n<p><span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<\/span><\/p>\n<p><span>&nbsp; &nbsp; &nbsp; $list_box_contents[$row][$col] = array(&#8216;align&#8217; =&gt; &#8216;center&#8217;,<\/span><\/p>\n<p><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#8216;params&#8217; =&gt; &#8216;class=&#8221;smallText&#8221; style=&#8221;width:&#8217; &nbsp;. $col_width . &#8216;%;float:left&#8221; valign=&#8221;top&#8221;&#8216;,<\/span><\/p>\n<p><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#8216;text&#8217; =&gt; &#8216;&lt;a href=&#8221;&#8216; . zen_href_link(zen_get_info_page($new_products-&gt;fields[&#8216;products_id&#8217;]), &#8216;products_id=&#8217; . $new_products-&gt;fields[&#8216;products_id&#8217;]) . &#8216;&#8221;&gt;&#8217; . zen_image(DIR_WS_IMAGES . $new_products-&gt;fields[&#8216;products_image&#8217;], $new_products-&gt;fields[&#8216;products_name&#8217;], IMAGE_PRODUCT_NEW_WIDTH, IMAGE_PRODUCT_NEW_HEIGHT) . &#8216;&lt;\/a&gt;&lt;br \/&gt;&lt;div class=&#8221;border_line01&#8243;&gt;&lt;strong&gt;Style: &lt;a class=&#8221;ab&#8221; href=&#8221;&#8216; . zen_href_link(zen_get_info_page($new_products-&gt;fields[&#8216;products_id&#8217;]), &#8216;products_id=&#8217; . $new_products-&gt;fields[&#8216;products_id&#8217;]) . &#8216;&#8221;&gt;&#8217; . $new_products-&gt;fields[&#8216;products_name&#8217;] . &#8216;&lt;\/a&gt;&lt;strong&gt;&lt;\/div&gt;&lt;div class=&#8221;border_line01&#8243;&gt;Our Price: &lt;span class=&#8221;colorr&#8221;&gt;&#8217; . $products_price &nbsp;. &#8216;&lt;\/span&gt;&lt;\/div&gt;&#8217; . zen_draw_form(&#8216;cart_quantity&#8217;, zen_href_link(zen_get_info_page($new_products-&gt;fields[&#8216;products_id&#8217;]), zen_get_all_get_params(array(&#8216;action&#8217;)). &#8216;action=add_product&#8217;), &#8216;post&#8217;, &#8216;enctype=&#8221;multipart\/form-data&#8221;&#8216;) . zen_get_buy_now_button($new_products-&gt;fields[&#8216;products_id&#8217;], $the_button) . &#8216;&lt;a href=&#8221;&#8216; .zen_href_link(zen_get_info_page($new_products-&gt;fields[&#8216;products_id&#8217;]), &#8216;products_id=&#8217; . $new_products-&gt;fields[&#8216;products_id&#8217;]) . &#8216;&#8221;&gt;more&lt;\/a&gt;&lt;\/form&gt;&lt;br \/&gt;&lt;br \/&gt;&lt;br \/&gt;&#8217;);<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp;\u5728zencart\u9996\u9875\u7684\u6700\u65b0\u5546\u54c1\u4e0a\u9762\u8981\u6dfb\u52a0&#8221;\u8d2d\u4e70&#8221;\u6309\u94ae\uff0c\u53ef\u4ee5\u53c2\u8003\u6b64\u6559\u7a0b: \/includes\/templates\/template_default\/templates l_product_info_display.php \u8fd9\u4e2a\u6587\u4ef6\u4e2d\u8d2d\u4e70\u6309\u94ae\u7684\u4ee3\u7801\u3002 \u9700\u8981\u4fee\u6539\u7684\u4ee3\u7801\u5728\uff1a \/includes\/modules\/new_products.php \u5546\u5e97\u9996\u9875\u4e0a\u663e\u793a\u7684\u5546\u54c1\u7684\u5185\u5bb9\u90fd\u5728\u53d8\u91cf$list_box_contents\u4e2d\uff0c\u52a0\u4e0a\u9700\u8981\u7684\u5185\u5bb9\u5c31\u53ef\u4ee5\u4e86\u3002 $list_box_contents[$row][$col] = array(&#8216;align&#8217; =&gt; &#8216;center&#8217;, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#8216;params&#8217; =&gt; &#8216;class=&#8221;smallText&#8221; width=&#8221;&#8216; . $col_width . &#8216;%&#8221; valign=&#8221;top&#8221;&#8216;, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &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-60699","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/60699","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=60699"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/60699\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=60699"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=60699"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=60699"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}