Forum Replies Created
-
AuthorPosts
-
Hi,
I would like to display sale price only in category “promotions” on the listing shop page & “promotions” page.
Thanks
Hi,
It’s not ok, “&& is_product_category( ‘promotions’ )” it apply for promotions but there is no price on another page
Thanks
Hi,
The code here :
add_filter( ‘woocommerce_variable_sale_price_html’, ‘wc_shopy_variation_price_format’, 10, 2 );
add_filter( ‘woocommerce_variable_price_html’, ‘wc_wc_shopy_variation_price_format’, 10, 2 );function wc_shopy_variation_price_format( $price, $product ) {
$min_price = $product->get_variation_price( ‘min’, true );
if ($product->product_type == ‘variable’) {
$available_variations = $product->get_available_variations();
for ($i = 0; $i < count($available_variations); ++$i) {
$variation_id = $available_variations[$i][‘variation_id’];
$variable_product1 = new WC_Product_Variation($variation_id);
$regular_price = $variable_product1->regular_price;
}
$price = sprintf( __( ‘A partir de%1$s<ins>%2$s</ins>’, ‘woocommerce’ ), wc_price( $regular_price ) , wc_price( $min_price ) );
}
else{
$price = sprintf( __( ‘A partir de %1$s’, ‘woocommerce’ ), wc_price( $min_price ) );
}
return $price;
}So there is no filter on category so it apply for all variation price, this is a problem for variation with no SALE, could you help me for apply this on variation with a category call “promotions” ?
Thanks
Hi,
I found the solution and product listing support this , see screenshot. Can I purchase another 6 month support with you ? for your help with this settings code for futur enhancement ?
Thx
Attachments:
You must be logged in to view attached files.Hi,
Yes , display on the listing page
Hi,
Yes but I would like to display http://take.ms/8HvCvw on the WALL SHOP page too
Thx
Hi,
Yes but I would like the two same price display on the screen 1 on the screen 2 : price with “crossed out price”
the class=”woocommerce-variation-price” on the screen 1
Thanks
Hi Foster,
Where is this news version please ?
thx
Hi All,
Which version please ?
This reply has been marked as private. -
AuthorPosts