{"id":59724,"date":"2025-04-23T16:01:58","date_gmt":"2025-04-23T08:01:58","guid":{"rendered":"https:\/\/fwq.ai\/blog\/59724\/"},"modified":"2025-04-23T16:01:58","modified_gmt":"2025-04-23T08:01:58","slug":"ecshop%e6%89%b9%e9%87%8f%e5%88%a0%e9%99%a4%e8%b4%ad%e7%89%a9%e8%bd%a6%e5%95%86%e5%93%81","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/59724\/","title":{"rendered":"ecshop\u6279\u91cf\u5220\u9664\u8d2d\u7269\u8f66\u5546\u54c1"},"content":{"rendered":"<p> \u5728ecshop\u5b9e\u73b0ecshop\u6279\u91cf\u5220\u9664\u8d2d\u7269\u8f66\u5546\u54c1\uff0c1.\u6dfb\u52a0checkbox\u590d\u9009\u6846\uff1a\u5728\u5546\u54c1\u56fe\u7247\u524d\u9762\u52a0\u4e00\u4e2a<\/p>\n<pre>\r\n&lt;input type=\"checkbox\" name=\"subBox\" id=\"subBox\" value=\"{$goods.rec_id}\" \/&gt;<\/pre>\n<p> 2.\u52a0\u4e0a\u4e00\u6bb5\u83b7\u53d6\u590d\u9009\u6846id\u7684\u4ee3\u7801<\/p>\n<pre>\r\nfunction group_drop_goods(){\r\n        var id =\"\";\r\n        $(\"[name='subBox']\").each(function(){\r\n                if($(this).attr(\"checked\"))\r\n                {\r\n                    if(id){\r\n                      id+=\",\"+$(this).val();  \r\n                    }else{\r\n                        id+=\"\"+$(this).val();  \r\n                    }\r\n                }\r\n         })\r\n         if(id){\r\n             if(confirm('{$lang.drop_goods_confirm}')){\r\n                location.href='flow.php?step=group_drop_goods&amp;id='+id;\r\n             }\r\n         }else{\r\n             alert('\u8bf7\u9009\u62e9\u9700\u8981\u5220\u9664\u7684\u5546\u54c1\uff01');\r\n         }\r\n\r\n    } <span style=\"color:#fff0f5\">\/\/www.ldhost.cn<\/span><\/pre>\n<p> 3.\u5728\u9875\u9762\u9002\u5f53\u7684\u4f4d\u7f6e\u52a0\u4e00\u4e2a\u5220\u9664\u94fe\u63a5<\/p>\n<pre>\r\n&lt;a class=\"pldelete\" href=\"javascript:group_drop_goods()\"&gt;\u6279\u91cf\u5220\u9664&lt;\/a&gt;<\/pre>\n<p> 4.\u5728flow.php\u4e2d\u52a0\u5165\u5982\u4e0b\u4ee3\u7801\uff1a\u52a0\u5728elseif ($_REQUEST[&#8216;step&#8217;] == &#8216;drop_goods&#8217;)\u7684\u4e0a\u4e00\u884c<\/p>\n<pre>\r\nelseif ($_REQUEST['step'] == 'group_drop_goods')\r\n{\r\n    $rec_ids = explode(',', $_GET['id']);\r\n    foreach($rec_ids as $v){\r\n        flow_drop_cart_goods($v);\r\n    }\r\n    ecs_header(\"Location: flow.php\\n\");\r\n    exit;\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5728ecshop\u5b9e\u73b0ecshop\u6279\u91cf\u5220\u9664\u8d2d\u7269\u8f66\u5546\u54c1\uff0c1.\u6dfb\u52a0checkbox\u590d\u9009\u6846\uff1a\u5728\u5546\u54c1\u56fe\u7247\u524d\u9762\u52a0\u4e00\u4e2a &lt;input type=&#8221;checkbox&#8221; name=&#8221;subBox&#8221; id=&#8221;subBox&#8221; value=&#8221;{$goods.rec_id}&#8221; \/&gt; 2.\u52a0\u4e0a\u4e00\u6bb5\u83b7\u53d6\u590d\u9009\u6846id\u7684\u4ee3\u7801 function group_drop_goods(){ var id =&#8221;&#8221;; $(&#8220;[name=&#8217;subBox&#8217;]&#8221;).each(function(){ if($(this).attr(&#8220;checked&#8221;)) { if(id){ id+=&#8221;,&#8221;+$(this).val(); }else{ id+=&#8221;&#8221;+$(this).val(); } } }) if(id){ if(confirm(&#8216;{$lang.drop_goods_confirm}&#8217;)){ location.href=&#8217;flow.php?step=group_drop_goods&amp;id=&#8217;+id; } }else{ alert(&#8216;\u8bf7\u9009\u62e9\u9700\u8981\u5220\u9664\u7684\u5546\u54c1\uff01&#8217;); } } \/\/www.ldhost.cn 3.\u5728\u9875\u9762\u9002\u5f53\u7684\u4f4d\u7f6e\u52a0\u4e00\u4e2a\u5220\u9664\u94fe\u63a5 &lt;a class=&#8221;pldelete&#8221; href=&#8221;javascript:group_drop_goods()&#8221;&gt;\u6279\u91cf\u5220\u9664&lt;\/a&gt; 4.\u5728flow.php\u4e2d\u52a0\u5165\u5982\u4e0b\u4ee3\u7801\uff1a\u52a0\u5728elseif ($_REQUEST[&#8216;step&#8217;] == &#8216;drop_goods&#8217;)\u7684\u4e0a\u4e00\u884c elseif ($_REQUEST[&#8216;step&#8217;] == &#8216;group_drop_goods&#8217;) { $rec_ids = explode(&#8216;,&#8217;, $_GET[&#8216;id&#8217;]); foreach($rec_ids as $v){ flow_drop_cart_goods($v); } ecs_header(&#8220;Location: [&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-59724","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/59724","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=59724"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/59724\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=59724"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=59724"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=59724"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}