{"id":60953,"date":"2025-04-26T08:29:03","date_gmt":"2025-04-26T00:29:03","guid":{"rendered":"https:\/\/fwq.ai\/blog\/60953\/"},"modified":"2025-04-26T08:29:03","modified_gmt":"2025-04-26T00:29:03","slug":"%e8%a7%a3%e5%86%b3zencart%e6%89%b9%e9%87%8f%e5%af%bc%e5%85%a5%e4%ba%a7%e5%93%81size%e9%80%89%e9%a1%b9%e4%b9%b1%e5%ba%8f%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/60953\/","title":{"rendered":"\u89e3\u51b3zencart\u6279\u91cf\u5bfc\u5165\u4ea7\u54c1size\u9009\u9879\u4e71\u5e8f\u95ee\u9898"},"content":{"rendered":"<p> \u4f7f\u7528zen cart\u7684easypopulate\u6279\u91cf\u5bfc\u5165\u4ea7\u54c1\u540e\u78b0\u5230\u4e00\u4e2a\u95ee\u9898\uff0c\u5c31\u662f\u5bfc\u5165\u7684size\u9009\u9879\u987a\u5e8f\u4e71\u4e86\u5957\u3002\u6709\u53ef\u80fd\u662f\u56e0\u4e3a\u5bfc\u5165\u7684\u65f6\u5019\u6ca1\u6709\u4e3asize\u9009\u9879\u6307\u5b9aorder\u7684\u503c\u3002\u4f46\u662f\u5373\u4f7f\u6307\u5b9aorder\u53ef\u4ee5\u6392\u5e8f\u4e5f\u5f88\u9ebb\u70e6\u3002\u5982\u679c\u80fd\u591f\u6309\u7167\u5bfc\u5165\u65f6\u6570\u636e\u6587\u4ef6\u4e2d\u7684\u987a\u5e8f\u4e3a\u987a\u5e8f\u5c31\u65b9\u4fbf\u5f88\u591a\u3002\u4e5f\u5c31\u662f\u8bf4\u76f4\u63a5\u6309\u7167size\u9009\u9879\u7684ID\u6765\u6392\u5e8f\u3002\u4e3a\u4e86\u5b9e\u73b0\u8fd9\u4e2a\uff0c\u9700\u8981\u5bf9includes\/modules\/attributes.php\u8fdb\u884c\u4fee\u6539<\/p>\n<p> &#8230;<br \/> &#8230;<br \/> \/\/change the $order_by variable<br \/> $order_by = &#8216; order by pov.products_options_values_id&#8217;;<\/p>\n<p> while (!$products_options_names-&gt;EOF) {<br \/> $products_options_array = array();<\/p>\n<p> \/*<br \/> pa.options_values_price, pa.price_prefix,<br \/> pa.products_options_sort_order, pa.product_attribute_is_free, pa.products_attributes_weight, pa.products_attributes_weight_prefix,<br \/> pa.attributes_default, pa.attributes_discounted, pa.attributes_image<br \/> *\/<\/p>\n<p> $sql = &#8220;select pov.products_options_values_id,<br \/> pov.products_options_values_name,<br \/> pa.*<br \/> from &#8221; . TABLE_PRODUCTS_ATTRIBUTES . &#8221; pa, &#8221; . TABLE_PRODUCTS_OPTIONS_VALUES . &#8221; pov<br \/> where pa.products_id = &#8216;&#8221; . (int)$_GET[&#8216;products_id&#8217;] . &#8220;&#8216;<br \/> and pa.options_id = &#8216;&#8221; . (int)$products_options_names-&gt;fields[&#8216;products_options_id&#8217;] . &#8220;&#8216;<br \/> and pa.options_values_id = pov.products_options_values_id<br \/> and pov.language_id = &#8216;&#8221; . (int)$_SESSION[&#8216;languages_id&#8217;] . &#8220;&#8216; &#8221; .<br \/> $order_by;<\/p>\n<p> $products_options = $db-&gt;Execute($sql);<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f7f\u7528zen cart\u7684easypopulate\u6279\u91cf\u5bfc\u5165\u4ea7\u54c1\u540e\u78b0\u5230\u4e00\u4e2a\u95ee\u9898\uff0c\u5c31\u662f\u5bfc\u5165\u7684size\u9009\u9879\u987a\u5e8f\u4e71\u4e86\u5957\u3002\u6709\u53ef\u80fd\u662f\u56e0\u4e3a\u5bfc\u5165\u7684\u65f6\u5019\u6ca1\u6709\u4e3asize\u9009\u9879\u6307\u5b9aorder\u7684\u503c\u3002\u4f46\u662f\u5373\u4f7f\u6307\u5b9aorder\u53ef\u4ee5\u6392\u5e8f\u4e5f\u5f88\u9ebb\u70e6\u3002\u5982\u679c\u80fd\u591f\u6309\u7167\u5bfc\u5165\u65f6\u6570\u636e\u6587\u4ef6\u4e2d\u7684\u987a\u5e8f\u4e3a\u987a\u5e8f\u5c31\u65b9\u4fbf\u5f88\u591a\u3002\u4e5f\u5c31\u662f\u8bf4\u76f4\u63a5\u6309\u7167size\u9009\u9879\u7684ID\u6765\u6392\u5e8f\u3002\u4e3a\u4e86\u5b9e\u73b0\u8fd9\u4e2a\uff0c\u9700\u8981\u5bf9includes\/modules\/attributes.php\u8fdb\u884c\u4fee\u6539 &#8230; &#8230; \/\/change the $order_by variable $order_by = &#8216; order by pov.products_options_values_id&#8217;; while (!$products_options_names-&gt;EOF) { $products_options_array = array(); \/* pa.options_values_price, pa.price_prefix, pa.products_options_sort_order, pa.product_attribute_is_free, pa.products_attributes_weight, pa.products_attributes_weight_prefix, pa.attributes_default, pa.attributes_discounted, pa.attributes_image *\/ $sql = &#8220;select pov.products_options_values_id, pov.products_options_values_name, pa.* from &#8221; . TABLE_PRODUCTS_ATTRIBUTES . &#8221; pa, &#8221; . TABLE_PRODUCTS_OPTIONS_VALUES . &#8221; pov where pa.products_id = &#8216;&#8221; . [&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-60953","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/60953","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=60953"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/60953\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=60953"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=60953"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=60953"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}