Home › Forums › WoodMart support forum › Product style promotional price is not displayed
Product style promotional price is not displayed
- This topic has 14 replies, 2 voices, and was last updated 11 months ago by Aizaz Imtiaz Awan.
-
AuthorPosts
-
January 11, 2024 at 9:18 am #528898
Grelo ZhangParticipantI noticed that products without variations are showing sale prices
Products with multiple variations do not show promotional prices- This topic was modified 11 months ago by Grelo Zhang.
- This topic was modified 11 months ago by Grelo Zhang.
Attachments:
You must be logged in to view attached files.January 11, 2024 at 1:29 pm #529010
Aizaz Imtiaz AwanKeymasterHello,
If you want to hide sale price use this custom css code in Theme Settings > Custom CSS > Global Custom CSS:
.price del { display: none; }
Navigate to Theme Settings > Shop > Variable Products > Make sure that “Hide to price” option is disable:
https://ibb.co/LQVwL9jBest Regards.
January 11, 2024 at 6:48 pm #529108
Grelo ZhangParticipantI want to show the promotional price, not the hidden price, thank you
Attachments:
You must be logged in to view attached files.January 12, 2024 at 9:49 am #529188
Aizaz Imtiaz AwanKeymasterHello,
Please add the below code to functions.php in the Child theme
// For simple products. add_filter( 'woocommerce_format_sale_price', 'dcwd_sale_price', 20, 3 ); function dcwd_sale_price( $price, $regular_price, $sale_price ) { /*global $product; // Show regular and sale price for specified product IDs if ( in_array( $product->get_id(), array( 1, 2, 3, 28 ) ) ) { return $price; } // Show regular and sale price if product is in any of the specified categories. if ( has_term( array( 'hoodies', 'accessories', 'tshirts' ), 'product_cat', $product->get_id() ) ) { return $price; }*/ return wc_price( $sale_price ); } // For variable products. add_filter( 'woocommerce_variable_price_html', 'dcwd_variable_price', 10, 2 ); function dcwd_variable_price( $price_html, $product ) { if ( $product->is_on_sale() ) { /*// Show regular and sale price for specified product IDs if ( in_array( $product->get_id(), array( 1, 2, 3, 7932 ) ) ) { return $price_html; } // Show regular and sale price if product is in any of the specified categories. if ( has_term( array( 'hoodies', 'accessories', 'tshirts' ), 'product_cat', $product->get_id() ) ) { return $price_html; }*/ $prices = $product->get_variation_prices( true ); $min_price = current( $prices['price'] ); $price = wc_price( $min_price ); return 'From: ' . $price; } return $price_html; }
Best Regards.
January 12, 2024 at 10:38 am #529206
Grelo ZhangParticipantNothing happened after I added the code
- This reply was modified 11 months ago by Grelo Zhang.
- This reply was modified 11 months ago by Grelo Zhang.
Attachments:
You must be logged in to view attached files.January 12, 2024 at 10:58 am #529223
Grelo ZhangParticipantAnd the promotional prices on product pages disappeared.
I want both original and promotional prices to be displayed.
- This reply was modified 11 months ago by Grelo Zhang.
Attachments:
You must be logged in to view attached files.January 12, 2024 at 11:05 am #529226
Grelo ZhangParticipantAttach pictures
Attachments:
You must be logged in to view attached files.January 12, 2024 at 12:39 pm #529275
Aizaz Imtiaz AwanKeymasterHello,
Can you please share the wp-login details I will check and give you a possible solution.
Best Regards.
January 12, 2024 at 5:14 pm #529400
Grelo ZhangParticipantOkay, thanks a lot for the help
January 13, 2024 at 9:39 am #529499
Aizaz Imtiaz AwanKeymasterHello,
You have not added the “sale price” in your products. You need to add “”sale price” in the products from the edit product page: https://ibb.co/YZDDFFT. When you add the sale price it will show the both regular and sale price.
Best Regards.
January 13, 2024 at 9:58 am #529504
Grelo ZhangParticipantSorry, I didn’t explain the question clearly. I recorded a video.
As you can see in the video, the product page will display the promotional and selling prices. Still, the promotional price is not displayed when we return to the product category page to look at the “Archive Products”.January 13, 2024 at 3:33 pm #529562
Aizaz Imtiaz AwanKeymasterHello,
Navigate to Theme Settings > Shop > variable products > and disable the price option.
https://ibb.co/HLct2xyBest Regards.
January 13, 2024 at 4:04 pm #529574
Grelo ZhangParticipantThanks for the reply. Please check it for me. I will send the content to private.
Attachments:
You must be logged in to view attached files.January 13, 2024 at 8:35 pm #529607
Grelo ZhangParticipantBy deactivating both options, the products that initially disappeared from the product category page have now been restored to their original state.
Would you like a parent product featuring various variations to be presented as “Show single variation”? This would enable the display of promotional prices.
Ideally, I’d prefer parent products with multiple variations to also showcase sale prices. If the implementation is more troublesome, we can leave it unchanged for now.
- This reply was modified 11 months ago by Grelo Zhang.
Attachments:
You must be logged in to view attached files.January 15, 2024 at 10:12 am #529737
Aizaz Imtiaz AwanKeymasterHello,
Yes when you disable the options about “Price”. It will show the sale price and variations in price ranges.
If you want to use show single variation check his documentation how it works and how to configure:
https://xtemos.com/docs-topic/show-single-variation/Best Regards.
-
AuthorPosts
- You must be logged in to create new topics. Login / Register