{"id":60734,"date":"2025-04-26T09:17:18","date_gmt":"2025-04-26T01:17:18","guid":{"rendered":"https:\/\/fwq.ai\/blog\/60734\/"},"modified":"2025-04-26T09:17:18","modified_gmt":"2025-04-26T01:17:18","slug":"%e5%ae%9e%e7%8e%b0zencart%e5%90%8e%e5%8f%b0%e8%ae%be%e7%bd%ae%e7%bd%91%e7%ab%99%e4%b8%bb%e9%a2%98%e9%a2%9c%e8%89%b2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/60734\/","title":{"rendered":"\u5b9e\u73b0zencart\u540e\u53f0\u8bbe\u7f6e\u7f51\u7ad9\u4e3b\u9898\u989c\u8272"},"content":{"rendered":"<p> 1.\u5728SQL\u5b89\u88c5\u5de5\u5177\u6267\u884c<\/p>\n<p> INSERT INTO configuration VALUES (NULL,&#8217;\u8bbe\u7f6e\u7f51\u7ad9\u4e3b\u9898\u989c\u8272&#8217;,&#8217;WEBMAINCOLOR_CONFIG_STATUS&#8217;,&#8217;white&#8217;,&#8217;\u8bf7\u9009\u62e9\u9700\u8981\u7684\u4e3b\u9898\u989c\u8272(\u9ed8<br \/> \u8ba4:white)&#8217;,&#8217;31&#8217;,&#8217;20&#8217;,NULL, now(),NULL,&#8217;zen_cfg_select_option(array(&#8220;white&#8221;, &#8220;black&#8221;, &#8220;red&#8221;, &#8220;orange&#8221;, &#8220;yellow&#8221;, &#8220;green&#8221;, &#8220;cyan&#8221;, &#8220;blue&#8221;,<br \/> &#8220;purple&#8221;),&#8217;);<\/p>\n<p> \u5176\u4e2d\u768431\u662f\u5df2\u7ecf\u5b89\u88c5\u7684\u6279\u91cf\u5546\u54c1\u7ba1\u7406\u63d2\u4ef6\u7684\u8bbe\u7f6e\u754c\u9762configuration_group_id\u7684\u503c\uff0c20\u662f\u4e3aWEBMAINCOLOR_CONFIG_STATUS\u8be5\u5e38\u91cf\u6307\u5b9a\u7684sort_order \u503c\uff08\u53ef\u4ee5\u968f\u4fbf\u8bbe\u7f6e\uff09\uff0c\u6267\u884cSQL\u8bed\u53e5\u540e\uff0c\u5728\u540e\u53f0 \u5546\u5e97\u8bbe\u7f6e-&gt;\u6279\u91cf\u5546\u54c1\u7ba1\u7406 \u754c\u9762\u5c31\u53ef\u4ee5\u770b\u5230\u8bbe\u7f6e\u7f51\u7ad9\u4e3b\u9898\u989c\u8272\u7684\u9009\u9879\u3002<\/p>\n<p> 2.\u5728\u6a21\u677f\u7684stysheet.css\u6587\u4ef6\u4e2d\u6dfb\u52a0\uff1a<\/p>\n<p> .webmaincolor_config_white{background:white;}<br \/> .webmaincolor_config_black{background:black;}<br \/> .webmaincolor_config_red{background:red;}<br \/> .webmaincolor_config_orange{background:orange;}<br \/> .webmaincolor_config_yellow{background:yellow;}<br \/> .webmaincolor_config_green{background:green;}<br \/> .webmaincolor_config_cyan{background:cyan;}<br \/> .webmaincolor_config_blue{background:#224986;}<br \/> .webmaincolor_config_purple{background:purple;}<\/p>\n<p> 3.\u5bf9\u6240\u6709\u9700\u8981\u5f15\u7528\u8be5\u989c\u8272\u7684div\u6dfb\u52a0\u8be5class\u5373\u53ef\u5b9e\u73b0\u989c\u8272\u53d8\u6362\uff1a<\/p>\n<p> &lt;div&nbsp;class=&#8221;main_menu_panel webmaincolor_config_&lt;?php echoWEBMAINCOLOR_CONFIG_STATUS;?&gt;&#8221;&gt;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1.\u5728SQL\u5b89\u88c5\u5de5\u5177\u6267\u884c INSERT INTO configuration VALUES (NULL,&#8217;\u8bbe\u7f6e\u7f51\u7ad9\u4e3b\u9898\u989c\u8272&#8217;,&#8217;WEBMAINCOLOR_CONFIG_STATUS&#8217;,&#8217;white&#8217;,&#8217;\u8bf7\u9009\u62e9\u9700\u8981\u7684\u4e3b\u9898\u989c\u8272(\u9ed8 \u8ba4:white)&#8217;,&#8217;31&#8217;,&#8217;20&#8217;,NULL, now(),NULL,&#8217;zen_cfg_select_option(array(&#8220;white&#8221;, &#8220;black&#8221;, &#8220;red&#8221;, &#8220;orange&#8221;, &#8220;yellow&#8221;, &#8220;green&#8221;, &#8220;cyan&#8221;, &#8220;blue&#8221;, &#8220;purple&#8221;),&#8217;); \u5176\u4e2d\u768431\u662f\u5df2\u7ecf\u5b89\u88c5\u7684\u6279\u91cf\u5546\u54c1\u7ba1\u7406\u63d2\u4ef6\u7684\u8bbe\u7f6e\u754c\u9762configuration_group_id\u7684\u503c\uff0c20\u662f\u4e3aWEBMAINCOLOR_CONFIG_STATUS\u8be5\u5e38\u91cf\u6307\u5b9a\u7684sort_order \u503c\uff08\u53ef\u4ee5\u968f\u4fbf\u8bbe\u7f6e\uff09\uff0c\u6267\u884cSQL\u8bed\u53e5\u540e\uff0c\u5728\u540e\u53f0 \u5546\u5e97\u8bbe\u7f6e-&gt;\u6279\u91cf\u5546\u54c1\u7ba1\u7406 \u754c\u9762\u5c31\u53ef\u4ee5\u770b\u5230\u8bbe\u7f6e\u7f51\u7ad9\u4e3b\u9898\u989c\u8272\u7684\u9009\u9879\u3002 2.\u5728\u6a21\u677f\u7684stysheet.css\u6587\u4ef6\u4e2d\u6dfb\u52a0\uff1a .webmaincolor_config_white{background:white;} .webmaincolor_config_black{background:black;} .webmaincolor_config_red{background:red;} .webmaincolor_config_orange{background:orange;} .webmaincolor_config_yellow{background:yellow;} .webmaincolor_config_green{background:green;} .webmaincolor_config_cyan{background:cyan;} .webmaincolor_config_blue{background:#224986;} .webmaincolor_config_purple{background:purple;} 3.\u5bf9\u6240\u6709\u9700\u8981\u5f15\u7528\u8be5\u989c\u8272\u7684div\u6dfb\u52a0\u8be5class\u5373\u53ef\u5b9e\u73b0\u989c\u8272\u53d8\u6362\uff1a &lt;div&nbsp;class=&#8221;main_menu_panel webmaincolor_config_&lt;?php echoWEBMAINCOLOR_CONFIG_STATUS;?&gt;&#8221;&gt;<\/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-60734","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/60734","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=60734"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/60734\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=60734"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=60734"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=60734"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}