-
AuthorPosts
-
May 11, 2021 at 5:59 pm #1299743
I would like to know how to change the price display of items with variants (example: from “€ 10.00 – € 15.00” to “starting from € 10.00 …”).
May 12, 2021 at 4:10 am #1299781Hi signumsrl,
Can you try adding this CSS code in Enfold > General Styling > Quick CSS:
#top .summary .price:before { content: "starting from"; margin-right: 5px; }
Let us know if this helps.
Best regards,
NikkoMay 12, 2021 at 9:50 am #1299862Using this css I will display “strarting from 10 € – 15 €”.
Can I remove the higher price?
(only for items with variants and therefore variable price)May 12, 2021 at 10:51 am #1299870Hi signumsrl,
I see, please remove the code I gave and also this solution would require using a child theme.
If you are not using one yet, then you can download and find the instructions in our documentation: https://kriesi.at/documentation/enfold/child-theme/Then add this code in functions.php of the child theme:
function wc_varb_price_range( $wcv_price, $product ) { $prefix = sprintf('%s: ', __('starting 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 ) : '<del>' . wc_price( $wcv_reg_min_price ) . '</del>' . '<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 );
reference: https://wedevs.com/blog/105501/disable-woocommerce-variable-product-price
Hope it helps.Best regards,
Nikko -
AuthorPosts
- You must be logged in to reply to this topic.