【问题标题】:WooCommerce Plugin or script - Bulk orders enquiries [closed]WooCommerce 插件或脚本 - 批量订单查询 [关闭]
【发布时间】:2013-09-26 12:02:25
【问题描述】:

我想知道是否可以在我的网站上设置一个供零售商登录以进行批量订购的部分。它不需要定价(因为我可能已经与不同的零售商协商了不同的价格)。它需要的只是一个地方,他们可以在产品清单上下订单,然后通过电子邮件提交......

有谁知道这样的插件吗? (不用登录也没关系)

有没有一些简单的方法可以让我在我的 WooCommerce 商店中获取所有产品名称和编号,并将它们添加到电子邮件表单中,将产品编号和用于添加数量的框...像这样:

PHP 明智吗?任何帮助都会很棒!

【问题讨论】:

  • 这个问题属于 wordpress.stackexchange.com 。

标签: php wordpress forms email woocommerce


【解决方案1】:

制作一个页面模板,然后像这样构建您的表单:

        $args = array(
            'posts_per_page'   => '',
            'offset'           => 0,
            'category'         => '',
            'orderby'          => 'post_date',
            'order'            => 'DESC',
            'include'          => '',
            'exclude'          => '',
            'meta_key'         => '',
            'meta_value'       => '',
            'post_type'        => 'product',
            'post_mime_type'   => '',
            'post_parent'      => '',
            'post_status'      => 'publish',
            'suppress_filters' => true );

        $products = get_posts( $args );

        foreach ($products as $product) {
            //echo out your table, eg
            $pid = $product->ID;
            $pname = $product->post_title;
            $inputName = $pid.'quantity';

            echo "<tr>
                    <td>$pid</td>
                    <td>$pname</td>
                    <td><input type='text' name='$inputName' value=''> </td>
                  </tr>";
        }

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-14
    • 2010-10-14
    • 1970-01-01
    • 2019-01-26
    相关资源
    最近更新 更多