Home › Forums › WoodMart support forum › Remove price variation of a product from shop page, category and single product
Remove price variation of a product from shop page, category and single product
- This topic has 7 replies, 3 voices, and was last updated 4 years ago by Elise Noromit.
-
AuthorPosts
-
April 14, 2019 at 12:26 pm #118757
wurlnetParticipantHi
I have set my products into categories, each product will have price variations and other variations that will affect the price before it is added to basket, this is fine.
However I would like to remove the price variation (i.e. £35 – £70) from below the Product heading. I would like this change to affect everywhere where the single product would be displayed, but only for items that have variations.
i.e.
Items with variations, price variation is removed.
Items with fixed price (Simple product), price variation is displayed
Many thanks!
Attachments:
You must be logged in to view attached files.April 14, 2019 at 4:00 pm #118771
Elise NoromitMemberHello,
It is not possible to show the price range in variation and hide on a simple product with custom CSS. Such modification would require complicated Woocommerce template customization what is not covered by our support.
Best Regards
April 14, 2019 at 5:57 pm #118789
wurlnetParticipantThanks for your reply. I believe it is possible to hide the price range for both variation and a simple product, could you provide the custom CSS for this?
**I searched the forum before raising the ticket and found a thread / code from xtemos for doing this with the Basel theme, but i couldn’t make it work for Woodmart**
Thanks
April 15, 2019 at 5:35 am #118823
Elise NoromitMemberHello,
Please have a look at the screenshot http://prntscr.com/nc0x7a
If you accept this add this code to the Theme Settings > Custom CSS > Global:
body .product-image-summary .summary-inner>.price{ display:none; }
Best Regards
April 15, 2019 at 9:51 am #118882
wurlnetParticipantHi Elise – Unfortunately this code has no affect?
April 15, 2019 at 1:36 pm #118921
Elise NoromitMemberHello,
Please provide me the screen of code in Custom CSS > Global and product page URL for checking.
Best Regards
November 18, 2020 at 3:01 pm #242644
Oriol DuarriParticipantHi Elise,
I want to remove the highest price of the variable products, for example,
5€-45€
I want just to show the 5€, is it possible? thanks!
I used this code at the child theme, but I want to know if woodmart theme have this functionallity integrated:
function wc_varb_price_range( $wcv_price, $product ) {
$prefix = sprintf(‘%s: ‘, __(‘From’, ‘wcvp_range’));
$wcv_reg_min_price = $product->get_variation_regular_price( ‘min’, true );
$wcv_min_sale_price = $product->get_variation_sale_price( ‘min’, true );
$wcv_max_price = $product->get_variation_price( ‘max’, true );
$wcv_min_price = $product->get_variation_price( ‘min’, true );$wcv_price = ( $wcv_min_sale_price == $wcv_reg_min_price ) ?
wc_price( $wcv_reg_min_price ) :
‘‘ . wc_price( $wcv_reg_min_price ) . ‘‘ . ‘<ins>’ . wc_price( $wcv_min_sale_price ) . ‘</ins>’;return ( $wcv_min_price == $wcv_max_price ) ?
$wcv_price :
sprintf(‘%s%s’, $prefix, $wcv_price);
}add_filter( ‘woocommerce_variable_sale_price_html’, ‘wc_varb_price_range’, 10, 2 );
add_filter( ‘woocommerce_variable_price_html’, ‘wc_varb_price_range’, 10, 2 );November 18, 2020 at 9:27 pm #242706
Elise NoromitMemberHello,
Please remove all your code and find the option in the Theme Settings > Shop > find “Hide “to” price”
This option has been recently added.
Best Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register