1

我正在研究如何使用自己的设计在 WordPress 和 WooCommerce 上创建在线商店。换句话说,我已经创建了 html+css 布局页面。现在我需要包装到 Woocommerce

我遇到了一个小问题。这家店的产品根据罐子的容量而有所不同(店的主题是蜂蜜)。

截屏

而且我不知道如何将标准选择和数量输入包装到我的设计中。我知道将 WooCommerce 的模板复制到我的 Wordpress 主题的文件夹中。我正在使用它。标题,简短描述一切都很好(我正在使用content-product-single.php文件。

我现在有类似的东西(代码片段):

         <div class="container content details">
            <div class="col-lg-3">
                <img class="img-responsive img-thumbnail" src="<?php the_post_thumbnail_url(); ?>">
            </div>
            <div class="col-lg-6">
                <h2><?php the_title();?></h2>
                <p><?php the_excerpt();?></p>
            </div>
            <div class="col-lg-3">
                <h4>Price: <span id="price"><?php global $product; echo $product->get_price_html(); ?></span></h4>
                <label for="value">Capacity:</label>
                <select class="form-control" id="value">
                    <option>Example 1</option>
                    <option>Example 2</option>
                    <option>Example 3</option>
                    <option>Example 4</option>
                </select>
                <label id="q" for="quantity">Quantity:</label>
                <input type="number" class="form-control" id="quantity" name="quant" value="1" min="1" max="5">
                <button type="button" class="btn btn-danger">Add to cart</button>
            </div>

如您所见,我需要将标准选择和变化形式的输入包装到我的引导布局中。你能告诉我我该怎么做吗?谢谢你的提前!

4

0 回答 0