{"id":59300,"date":"2025-04-23T12:12:31","date_gmt":"2025-04-23T04:12:31","guid":{"rendered":"https:\/\/fwq.ai\/blog\/59300\/"},"modified":"2025-04-23T12:12:31","modified_gmt":"2025-04-23T04:12:31","slug":"ecshop%e9%94%80%e5%94%ae%e6%8e%92%e8%a1%8c%e8%b0%83%e7%94%a8%e4%bf%83%e9%94%80%e4%bb%b7%e6%a0%bc%e5%92%8c%e5%b8%82%e5%9c%ba%e4%bb%b7%e6%a0%bc","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/59300\/","title":{"rendered":"ecshop\u9500\u552e\u6392\u884c\u8c03\u7528\u4fc3\u9500\u4ef7\u683c\u548c\u5e02\u573a\u4ef7\u683c"},"content":{"rendered":"<p>&nbsp;<span style=\"font-family: Verdana, Arial, Tahoma;font-size: 14px;line-height: 25px\">\u6211\u4eec\u77e5\u9053\u5728<\/span><span style=\"font-family: Verdana, Arial, Tahoma;font-size: 14px;line-height: 25px\">ecshop<\/span><span style=\"font-family: Verdana, Arial, Tahoma;font-size: 14px;line-height: 25px\">\u67d0\u4e9b\u4ea7\u54c1\u9500\u552e\u4e4b\u540e\uff0c\u9500\u552e\u91cf\u9ad8\u7684\u4ea7\u54c1\u9500\u552e\u51fa\u53bb\u4e4b\u540e\uff0c\u80fd\u5f62\u6210\u9500\u552e\u6392\u884c\uff0c<\/span><span style=\"font-family: Verdana, Arial, Tahoma;font-size: 14px;line-height: 25px\">ecshop\u7684\u9500\u552e\u6392<\/span><span style=\"font-family: Verdana, Arial, Tahoma;font-size: 14px;line-height: 25px\">\u884c\u5fc5\u987b\u4fdd\u6301\u4e24\u4e2a\u6761\u4ef6\uff0c\u9996\u5148\u662fecshop\u7684\u5546\u54c1\u5fc5\u987b\u5e93\u5b58\u8db3\u591f\uff0c\u5176\u6b21\u5546\u54c1\u8be5\u5546\u54c1\u5fc5\u987b\u4e0a\u67b6\u7684\u3002<\/span><\/p>\n<p style=\"padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;font-family: Verdana, Arial, Tahoma;font-size: 14px;line-height: 25px\">&nbsp;&nbsp;&nbsp;&nbsp; \u6211\u4eec\u5206\u6790\u5982\u4f55\u5728ecshop\u9500\u552e\u6392\u884c\u8c03\u7528\u4fc3\u9500\u4ef7\u683c\u548c\u5e02\u573a\u4ef7\u683c\uff0c\u9996\u5148\u627e\u5230ecshop\u4e2d\u7684lib_goods.php\u4e2d\u7684\u51fd\u6570function get_top10($cats = &#8221;)\uff0c\u5148\u68c0\u7d22\u5546\u54c1\u5e02\u573a\u4ef7\u683c\uff0cg.market_price\uff0c\u5176\u6b21\u83b7\u53d6\u4fc3\u9500\u4ef7\u683c\u548c\u4fc3\u9500\u7684\u5f00\u59cb\u548c\u7ed3\u675f\u65f6\u95f4g.promote_start_date, g.promote_end_date,g.promote_price\u3002<\/p>\n<p style=\"padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;font-family: Verdana, Arial, Tahoma;font-size: 14px;line-height: 25px\">&nbsp;&nbsp;&nbsp;&nbsp; \u901a\u8fc7\u4fc3\u9500\u4ef7\u683c\u7684\u5f00\u59cb\u548c\u7ed3\u675f\u65f6\u95f4\uff0c\u53d6\u5f97\u4fc3\u9500\u4ef7\u683c\u3002\u5982\u679c\u4ef7\u683c\u4e0d\u4e3a\u96f6\uff0c\u90a3\u4e48\u662f\u5904\u4e8e\u4fc3\u9500\u65f6\u95f4\u5185\u3002\u90a3\u4e48\u80fd\u8c03\u7528\u6b63\u5e38\u4ef7\u683c\u3002<\/p>\n<p style=\"padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;font-family: Verdana, Arial, Tahoma;font-size: 14px;line-height: 25px\">&nbsp;&nbsp;&nbsp;&nbsp; if ($arr[$i][&#8216;promote_price&#8217;] &gt; 0)<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $arr[$i][&#8216;promote_price&#8217;] = bargain_price($arr[$i][&#8216;promote_price&#8217;], $arr[$i][&#8216;promote_start_date&#8217;], $arr[$i][&#8216;promote_end_date&#8217;]);<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $arr[$i][&#8216;promote_price&#8217;] = 0;<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br \/> &nbsp;&nbsp;$arr[$i][&#8216;promote_price_format&#8217;] = price_format($arr[$i][&#8216;promote_price&#8217;]);<\/p>\n<p style=\"padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;font-family: Verdana, Arial, Tahoma;font-size: 14px;line-height: 25px\">&nbsp;&nbsp;&nbsp; \u83b7\u53d6\u5e02\u573a\u4ef7\u683c\u66f4\u5bb9\u6613\uff0c$arr[$i][&#8216;market_price_format&#8217;] = price_format($arr[$i][&#8216;market_price&#8217;]);<\/p>\n<p style=\"padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;font-family: Verdana, Arial, Tahoma;font-size: 14px;line-height: 25px\">&nbsp;&nbsp;&nbsp; \u6211\u4eec\u53ef\u4ee5\u5728\u6a21\u677f\u4e2d\u8fd9\u6837\u4f7f\u7528\u3002<\/p>\n<p style=\"padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;font-family: Verdana, Arial, Tahoma;font-size: 14px;line-height: 25px\">&nbsp;&nbsp; {if $goods.promote_price}<\/p>\n<p style=\"padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;font-family: Verdana, Arial, Tahoma;font-size: 14px;line-height: 25px\">&nbsp;{$goods.promote_price}&nbsp;<\/p>\n<p style=\"padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;font-family: Verdana, Arial, Tahoma;font-size: 14px;line-height: 25px\">{else}<\/p>\n<p style=\"padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;font-family: Verdana, Arial, Tahoma;font-size: 14px;line-height: 25px\">&nbsp;{$goods.price}&nbsp;<\/p>\n<p style=\"padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;font-family: Verdana, Arial, Tahoma;font-size: 14px;line-height: 25px\">{\/if}<\/p>\n<p style=\"padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;font-family: Verdana, Arial, Tahoma;font-size: 14px;line-height: 25px\">&nbsp;\u90a3\u4e48\u5e02\u573a\u4ef7\u683c\u5982\u4f55\u5728ecshop\u9500\u552e\u6392\u884c\u4e2d\u663e\u793a\u5462\u3002<\/p>\n<p style=\"padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;font-family: Verdana, Arial, Tahoma;font-size: 14px;line-height: 25px\">&nbsp;{$goods.market_price_format}&nbsp;<\/p>\n<p style=\"padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;font-family: Verdana, Arial, Tahoma;font-size: 14px;line-height: 25px\">&nbsp; \u4ee5\u4e0a\u5c31\u662fecshop\u9500\u552e\u6392\u884c\u8c03\u7528\u4fc3\u9500\u4ef7\u683c\u548c\u5e02\u573a\u4ef7\u683c\u7684\u601d\u8def<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp;\u6211\u4eec\u77e5\u9053\u5728ecshop\u67d0\u4e9b\u4ea7\u54c1\u9500\u552e\u4e4b\u540e\uff0c\u9500\u552e\u91cf\u9ad8\u7684\u4ea7\u54c1\u9500\u552e\u51fa\u53bb\u4e4b\u540e\uff0c\u80fd\u5f62\u6210\u9500\u552e\u6392\u884c\uff0cecshop\u7684\u9500\u552e\u6392\u884c\u5fc5\u987b\u4fdd\u6301\u4e24\u4e2a\u6761\u4ef6\uff0c\u9996\u5148\u662fecshop\u7684\u5546\u54c1\u5fc5\u987b\u5e93\u5b58\u8db3\u591f\uff0c\u5176\u6b21\u5546\u54c1\u8be5\u5546\u54c1\u5fc5\u987b\u4e0a\u67b6\u7684\u3002 &nbsp;&nbsp;&nbsp;&nbsp; \u6211\u4eec\u5206\u6790\u5982\u4f55\u5728ecshop\u9500\u552e\u6392\u884c\u8c03\u7528\u4fc3\u9500\u4ef7\u683c\u548c\u5e02\u573a\u4ef7\u683c\uff0c\u9996\u5148\u627e\u5230ecshop\u4e2d\u7684lib_goods.php\u4e2d\u7684\u51fd\u6570function get_top10($cats = &#8221;)\uff0c\u5148\u68c0\u7d22\u5546\u54c1\u5e02\u573a\u4ef7\u683c\uff0cg.market_price\uff0c\u5176\u6b21\u83b7\u53d6\u4fc3\u9500\u4ef7\u683c\u548c\u4fc3\u9500\u7684\u5f00\u59cb\u548c\u7ed3\u675f\u65f6\u95f4g.promote_start_date, g.promote_end_date,g.promote_price\u3002 &nbsp;&nbsp;&nbsp;&nbsp; \u901a\u8fc7\u4fc3\u9500\u4ef7\u683c\u7684\u5f00\u59cb\u548c\u7ed3\u675f\u65f6\u95f4\uff0c\u53d6\u5f97\u4fc3\u9500\u4ef7\u683c\u3002\u5982\u679c\u4ef7\u683c\u4e0d\u4e3a\u96f6\uff0c\u90a3\u4e48\u662f\u5904\u4e8e\u4fc3\u9500\u65f6\u95f4\u5185\u3002\u90a3\u4e48\u80fd\u8c03\u7528\u6b63\u5e38\u4ef7\u683c\u3002 &nbsp;&nbsp;&nbsp;&nbsp; if ($arr[$i][&#8216;promote_price&#8217;] &gt; 0) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $arr[$i][&#8216;promote_price&#8217;] = bargain_price($arr[$i][&#8216;promote_price&#8217;], $arr[$i][&#8216;promote_start_date&#8217;], $arr[$i][&#8216;promote_end_date&#8217;]); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $arr[$i][&#8216;promote_price&#8217;] = 0; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;$arr[$i][&#8216;promote_price_format&#8217;] = price_format($arr[$i][&#8216;promote_price&#8217;]); &nbsp;&nbsp;&nbsp; \u83b7\u53d6\u5e02\u573a\u4ef7\u683c\u66f4\u5bb9\u6613\uff0c$arr[$i][&#8216;market_price_format&#8217;] = price_format($arr[$i][&#8216;market_price&#8217;]); &nbsp;&nbsp;&nbsp; \u6211\u4eec\u53ef\u4ee5\u5728\u6a21\u677f\u4e2d\u8fd9\u6837\u4f7f\u7528\u3002 &nbsp;&nbsp; {if $goods.promote_price} &nbsp;{$goods.promote_price}&nbsp; {else} &nbsp;{$goods.price}&nbsp; {\/if} &nbsp;\u90a3\u4e48\u5e02\u573a\u4ef7\u683c\u5982\u4f55\u5728ecshop\u9500\u552e\u6392\u884c\u4e2d\u663e\u793a\u5462\u3002 &nbsp;{$goods.market_price_format}&nbsp; &nbsp; \u4ee5\u4e0a\u5c31\u662fecshop\u9500\u552e\u6392\u884c\u8c03\u7528\u4fc3\u9500\u4ef7\u683c\u548c\u5e02\u573a\u4ef7\u683c\u7684\u601d\u8def<\/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-59300","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/59300","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=59300"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/59300\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=59300"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=59300"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=59300"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}