variations

WooCommerce variable products: Display some variations values in an HTML table

我的未来我决定 提交于 2019-12-22 18:41:23
问题 In Woocommerce, I would like to create a function which outputs a simple HTML table with height , width , regular price and sale price for each variation of a variable product . For example, let's say that the variable product comes with three variations with different dimensions and I need to make my function output this HTML: <table> <thead> <tr> <th>Height</th> <th>Width</th> <th>Regular price</th> <th>Sale price</th> </tr> </thead> <tbody> <tr> <td>180cm</td> <td>100cm</td> <td>224€</td>

Product variation WP_Query with a product category in Woocommerce

試著忘記壹切 提交于 2019-12-22 18:28:42
问题 With Woocommerce, I am trying to make a WP_Query for product variations post type with a product category 'Apple'. $args = array( 'product_cat' => 'Apple', 'post_type' => array('product', 'product_variation'), 'post_status' => 'publish', 'key' => '_visibility', 'value' => 'visible', 'posts_per_page' => 100, 'taxonomy' => 'pa_size', 'meta_value' => '39', 'meta_query' => array( array( 'key' => '_stock', 'value' => 0, 'compare' => '>' ) ) ); But I can't get it work in this query. If I remove

Product variation WP_Query with a product category in Woocommerce

最后都变了- 提交于 2019-12-22 18:28:02
问题 With Woocommerce, I am trying to make a WP_Query for product variations post type with a product category 'Apple'. $args = array( 'product_cat' => 'Apple', 'post_type' => array('product', 'product_variation'), 'post_status' => 'publish', 'key' => '_visibility', 'value' => 'visible', 'posts_per_page' => 100, 'taxonomy' => 'pa_size', 'meta_value' => '39', 'meta_query' => array( array( 'key' => '_stock', 'value' => 0, 'compare' => '>' ) ) ); But I can't get it work in this query. If I remove

Replace the Variable Price range by the chosen variation price in WooCommerce 3

蓝咒 提交于 2019-12-22 17:38:10
问题 On WooCommerce I would like to change the Variable single product page layout. Because, when you have an variable product you get this wired price rage ( below product title ) in the Variable Product page and it shows in the shop page as well. For me the standard way is to show the lowest price of the product in the shop as well as product page and change that price according to user selection of variables. I can't believe why. I can remove the price range and show the lowest price using this

Enable sale price for logged users and regular price for unlogged users in Woocommerce

六月ゝ 毕业季﹏ 提交于 2019-12-22 13:57:56
问题 In Woocommerce I have a variable products with many variations and every variation has its own REGULAR price and SALE price. I would like when user: is logged in, the sale price will be the active price is not logged in, the regular price will be the active price. I have added this hooked function in my child theme function.php file: add_filter( 'woocommerce_available_variation', 'my_variation', 10, 3); function my_variation( $data, $product, $variation ) { wc_delete_product_transients(

Woocommerce Show default variation price

▼魔方 西西 提交于 2019-12-22 09:39:52
问题 I'm using Woocommerce and product variations and all my variations have a default variation defined. I would like to know, how I can find the default variation and display it's price. This is the code I got so far, but it displays the cheapest variation price, and I'm looking for my default variation product price instead. // Use WC 2.0 variable price format, now include sale price strikeout add_filter( 'woocommerce_variable_sale_price_html', 'wc_wc20_variation_price_format', 10, 2 ); add

add additional button on product page for woocommerce

旧巷老猫 提交于 2019-12-21 05:31:15
问题 I have spent the majority of the day trying to figure out how to adjust the single product page using woocommerce. I would like to add a custom button next to the "Add to cart" button that would be a custom link that says "Next". I am working on an invitation website where there are numerous components to an invitation, so after a user adds a product to their cart, I want there to be an option that says "Next" so they can go ahead and customize the next piece of the invitation. (I will have

Add Woocommerce Temporary product

纵然是瞬间 提交于 2019-12-19 06:56:56
问题 Help Needed: Is it possible to make a user-generated temporary product to be added to cart in WooCommerce? I'm trying to transfer a non-wordpress website to WordPress, but the site already has a sophisticated e-commerce system that the client doesn't want to change. What basically happens is a visitor specifies the measurement of the product that the client is selling, add different variations to it, and then after submitting, the website generates the product's price based on the visitor's

Add Woocommerce Temporary product

邮差的信 提交于 2019-12-19 06:52:28
问题 Help Needed: Is it possible to make a user-generated temporary product to be added to cart in WooCommerce? I'm trying to transfer a non-wordpress website to WordPress, but the site already has a sophisticated e-commerce system that the client doesn't want to change. What basically happens is a visitor specifies the measurement of the product that the client is selling, add different variations to it, and then after submitting, the website generates the product's price based on the visitor's

Add Woocommerce Temporary product

元气小坏坏 提交于 2019-12-19 06:52:28
问题 Help Needed: Is it possible to make a user-generated temporary product to be added to cart in WooCommerce? I'm trying to transfer a non-wordpress website to WordPress, but the site already has a sophisticated e-commerce system that the client doesn't want to change. What basically happens is a visitor specifies the measurement of the product that the client is selling, add different variations to it, and then after submitting, the website generates the product's price based on the visitor's