{"id":199137,"date":"2025-05-03T08:48:31","date_gmt":"2025-05-03T00:48:31","guid":{"rendered":"https:\/\/server.hk\/cnblog\/199137\/"},"modified":"2025-05-03T08:48:31","modified_gmt":"2025-05-03T00:48:31","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8ecshop%e5%95%86%e5%93%81%e5%88%86%e7%b1%bb%e9%a1%b5%e6%98%be%e7%a4%ba%e4%b8%8a%e6%9e%b6%e6%97%b6%e9%97%b4","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/199137\/","title":{"rendered":"\u5982\u4f55\u5728ECSHOP\u5546\u54c1\u5206\u7c7b\u9875\u663e\u793a\u4e0a\u67b6\u65f6\u95f4"},"content":{"rendered":"<p><span style=\"font-family: \u5b8b\u4f53, Verdana, Arial;font-size: 12px;line-height: 18px\"> <\/span><\/p>\n<p style=\"border-top-style: none;border-right-style: none;border-bottom-style: none;border-left-style: none;border-width: initial;border-color: initial;list-style-type: none;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px\">\u6709\u7f51\u53cb\u95ee\u4e3a\u4ec0\u4e48\u6211\u5728ECSHOP\u5546\u54c1\u5217\u8868\u9875\u8c03\u4e0d\u51fa\u4e0a\u67b6\u65f6\u95f4\u5462\u3002<br \/> \u5728\u8fd9\u91cc\uff0c\u597d\u6a21\u677f\u544a\u8bc9\u4f60\uff0c\u56e0\u4e3a\u5546\u54c1\u5217\u8868\u9875\u7a0b\u5e8f\u6587\u4ef6 category.php \u6839\u672c\u5c31\u6ca1\u53d6\u51fa\u4e0a\u67b6\u65f6\u95f4\u5b57\u6bb5\uff08ADD_TIME\uff09\u3002<\/p>\n<p style=\"border-top-style: none;border-right-style: none;border-bottom-style: none;border-left-style: none;border-width: initial;border-color: initial;list-style-type: none;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px\">\u5176\u5b9e\u8fd9\u4e5f\u662f\u5f88\u591aECSHOP\u65b0\u624b\u5bb9\u6613\u72af\u7684\u9519\u8bef\uff0c\u603b\u662f\u60f3\u5f53\u7136\u7684\u8ba4\u4e3a\u5728\u6a21\u677f\u91cc\u53ef\u4ee5\u8c03\u7528\u4efb\u4f55\u5b57\u6bb5\uff0c\u5176\u5b9e\u4e0d\u662f\u8fd9\u6837\u7684\uff0c<br \/> \u6a21\u677f\u91cc\u7684\u53ef\u8c03\u7528\u7684\u6807\u7b7e\u90fd\u662f\u8ddf\u7a0b\u5e8f\u6709\u5173\u8054\u7684\uff0c\u7a0b\u5e8f\u8d4b\u503c\u7ed9\u5b83\uff0c\u5b83\u624d\u80fd\u8c03\u53d6\u51fa\u6765\uff0c\u7a0b\u5e8f\u6ca1\u6709\u8d4b\u503c\u7ed9\u5b83\uff0c\u5f53\u7136\u4e5f\u5c31\u8c03\u4e0d\u51fa\u6765\u4e86\u3002<\/p>\n<p style=\"border-top-style: none;border-right-style: none;border-bottom-style: none;border-left-style: none;border-width: initial;border-color: initial;list-style-type: none;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px\">\u4e0b\u9762\u5c31\u6765\u8bf4\u4e00\u8bf4\u201c\u5982\u4f55\u5728ECSHOP\u5546\u54c1\u5206\u7c7b\u9875\u8c03\u7528\u4e0a\u67b6\u65f6\u95f4\u201d\uff0c<\/p>\n<p style=\"border-top-style: none;border-right-style: none;border-bottom-style: none;border-left-style: none;border-width: initial;border-color: initial;list-style-type: none;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px\">1\uff09\u3001<\/p>\n<p style=\"border-top-style: none;border-right-style: none;border-bottom-style: none;border-left-style: none;border-width: initial;border-color: initial;list-style-type: none;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px\">\u9996\u5148\u4fee\u6539\u7a0b\u5e8f\u6587\u4ef6 \/category.php<\/p>\n<p style=\"border-top-style: none;border-right-style: none;border-bottom-style: none;border-left-style: none;border-width: initial;border-color: initial;list-style-type: none;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px\">\u5c06<\/p>\n<p style=\"border-top-style: none;border-right-style: none;border-bottom-style: none;border-left-style: none;border-width: initial;border-color: initial;list-style-type: none;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px\">&nbsp;<\/p>\n<table cellspacing=\"0\" cellpadding=\"5\" style=\"border-right-width: 1px;border-right-style: solid;border-top-width: 1px;border-top-style: solid;background-image: initial;background-attachment: initial;border-left-width: 1px;border-left-style: solid;width: 673px;border-bottom-width: 1px;border-bottom-style: solid;background-position: initial initial;background-repeat: initial initial\">\n<tbody>\n<tr>\n<td><font style=\"border-top-style: none;border-right-style: none;border-bottom-style: none;border-left-style: none;border-width: initial;border-color: initial;list-style-type: none;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px\"> <\/p>\n<p style=\"border-top-style: none;border-right-style: none;border-bottom-style: none;border-left-style: none;border-width: initial;border-color: initial;list-style-type: none;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px\">$sql = &#8216;SELECT g.goods_id, g.goods_name, g.goods_name_style, g.market_price, g.is_new, g.is_best, g.is_hot, g.shop_price AS org_price, &#8216; .<\/p>\n<p> <\/font><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u4fee\u6539\u4e3a<\/p>\n<\/p>\n<table cellspacing=\"0\" cellpadding=\"5\" style=\"border-right-width: 1px;border-right-style: solid;border-top-width: 1px;border-top-style: solid;background-image: initial;background-attachment: initial;border-left-width: 1px;border-left-style: solid;width: 673px;border-bottom-width: 1px;border-bottom-style: solid\">\n<tbody>\n<tr>\n<td style=\"font-family: Arial, Verdana, sans-serif;line-height: 22px;font-size: 14px\"><font style=\"border-top-style: none;border-right-style: none;border-bottom-style: none;border-left-style: none;border-width: initial;border-color: initial;list-style-type: none;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px\"> <\/p>\n<p style=\"border-top-style: none;border-right-style: none;border-bottom-style: none;border-left-style: none;border-width: initial;border-color: initial;list-style-type: none;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px\">$sql = &#8216;SELECT g.goods_id, g.goods_name, g.goods_name_style, g.market_price, g.is_new, g.is_best, g.is_hot, g.shop_price AS org_price, g.add_time&#8217; .<\/p>\n<p>  &nbsp;  <\/font><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u7ee7\u7eed\u5411\u4e0b\uff0c\u627e\u5230<\/p>\n<p style=\"border-top-style: none;border-right-style: none;border-bottom-style: none;border-left-style: none;border-width: initial;border-color: initial;list-style-type: none;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px\">&nbsp;<\/p>\n<p style=\"border-top-style: none;border-right-style: none;border-bottom-style: none;border-left-style: none;border-width: initial;border-color: initial;list-style-type: none;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px\">$arr[$row[&#8216;goods_id&#8217;]][&#8216;name&#8217;]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = $row[&#8216;goods_name&#8217;];<\/p>\n<p style=\"border-top-style: none;border-right-style: none;border-bottom-style: none;border-left-style: none;border-width: initial;border-color: initial;list-style-type: none;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px\">\u5728\u5b83\u4e0b\u9762\u589e\u52a0\u4e00\u884c\u4ee3\u7801<\/p>\n<p style=\"border-top-style: none;border-right-style: none;border-bottom-style: none;border-left-style: none;border-width: initial;border-color: initial;list-style-type: none;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px\"> <\/p>\n<table cellspacing=\"0\" cellpadding=\"5\" style=\"border-right-width: 1px;border-right-style: solid;border-top-width: 1px;border-top-style: solid;background-image: initial;background-attachment: initial;border-left-width: 1px;border-left-style: solid;width: 673px;border-bottom-width: 1px;border-bottom-style: solid\">\n<tbody>\n<tr>\n<td style=\"font-family: Arial, Verdana, sans-serif;line-height: 22px;font-size: 14px\"><font style=\"border-top-style: none;border-right-style: none;border-bottom-style: none;border-left-style: none;border-width: initial;border-color: initial;list-style-type: none;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px\"> <\/p>\n<p style=\"border-top-style: none;border-right-style: none;border-bottom-style: none;border-left-style: none;border-width: initial;border-color: initial;list-style-type: none;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px\">&nbsp;<\/p>\n<p style=\"border-top-style: none;border-right-style: none;border-bottom-style: none;border-left-style: none;border-width: initial;border-color: initial;list-style-type: none;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px\">$arr[$row[&#8216;goods_id&#8217;]][&#8221;add_time&#8217;] =local_date(&#8221;Y-m-d G:i:s&#8221;,$row[&#8216;add_time&#8217;]);<\/p>\n<p>  &nbsp;  <\/font><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> 2\uff09\u3001<\/p>\n<p style=\"border-top-style: none;border-right-style: none;border-bottom-style: none;border-left-style: none;border-width: initial;border-color: initial;list-style-type: none;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px\">\u6253\u5f00\u6a21\u677f\u6587\u4ef6\uff0c\/themes\/default\/library\/goods_list.lbi<\/p>\n<p style=\"border-top-style: none;border-right-style: none;border-bottom-style: none;border-left-style: none;border-width: initial;border-color: initial;list-style-type: none;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px\">\u641c\u7d22<\/p>\n<p style=\"border-top-style: none;border-right-style: none;border-bottom-style: none;border-left-style: none;border-width: initial;border-color: initial;list-style-type: none;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px\">&lt;!&#8211; {if $show_marketprice} &#8211;&gt;<\/p>\n<p style=\"border-top-style: none;border-right-style: none;border-bottom-style: none;border-left-style: none;border-width: initial;border-color: initial;list-style-type: none;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px\">\u4e00\u5171\u80fd\u627e\u5230\u4e09\u5904\uff0c\u5728\u6bcf\u4e00\u5904\u7684\u524d\u9762\u589e\u52a0\u4e0b\u9762ECSHOP\u6807\u7b7e<\/p>\n<p style=\"border-top-style: none;border-right-style: none;border-bottom-style: none;border-left-style: none;border-width: initial;border-color: initial;list-style-type: none;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px\"><span style=\"border-top-style: none;border-right-style: none;border-bottom-style: none;border-left-style: none;border-width: initial;border-color: initial;list-style-type: none;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px\">\u4e0a\u67b6\u65f6\u95f4\uff1a{$goods.add_time}&lt;br&gt;<\/span><\/p>\n<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6709\u7f51\u53cb\u95ee\u4e3a\u4ec0\u4e48\u6211\u5728ECSHOP\u5546&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4925],"tags":[],"class_list":["post-199137","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/199137","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=199137"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/199137\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=199137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=199137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=199137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}