Tagged: cart page, woocommerce
-
AuthorPosts
-
April 6, 2021 at 10:08 pm #1292915
Hi there,
I’d like to change customize few texts ,links on my Enfold child theme related to woocommerce products. Probably not a big change on the functions.php file, but I need some help, if possible. Maybe someone already had the same problem.
1) Basically, we have installed a plugin to select a product with variables on quick view mode, and stay on the same page. So instead of “Scegli” under each “add to cart” product, we’d like to change to “Dettagli” or another phrase. Using the inspection tool, it’s easy to localize the text. But how to implement it on the website?
2) Same on the cart page, when this is empty. There is a button link that redirects you to the default shop page. As we created an alternative shop page, how is it possible to change the “href” in this button? And also here we’d like to change the “Ritorno al negozio” text into something else.
I’ve had a look at your guide here: https://kriesi.at/documentation/enfold/woocommerce-shop/ Custom WooCommerce Shop Overview, but even following point 1, on the empty cart this redirect default button option stays . As the layout editor is disabled on the default shop page.
3) Are you aware of a way to display a minimum advertised price for each product instead of the minimum – maximum range price on variable products?
Many thanks for your help!
RegardsApril 8, 2021 at 12:56 pm #1293249Hey DeliciousBologna,
1. If you want to customise text coming from a plugin, then you would have to reach out to their support for help.
2. If you are looking to change texts in WooCommerce core, then this might help you out: https://awhitepixel.com/blog/woocommerce-change-common-texts/
3. I’m not aware of any solutions for what you are asking unfortunately, did you try searching for a plugin or third party code?
Best regards,
RikardApril 8, 2021 at 4:15 pm #1293314Hi there,
thanks for your answer.
regarding point 1 and 2, ok I’ll try to look it online to find some explanation.
Regarding point 3 of our question, we found a way by adding rule below to functions.php in our child theme. Where you can use instead ” A partire da” (line 2) anything you want.
Cheers
`// WooCommerce price for variable products with no range
function rox_varb_price_range( $wcv_price, $product ) {$prefix = sprintf(‘%s: ‘, __(‘A partire da:’, ‘wooprice_norange’));
$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’, ‘rox_varb_price_range’, 10, 2 );
add_filter( ‘woocommerce_variable_price_html’, ‘rox_varb_price_range’, 10, 2 );April 11, 2021 at 4:53 am #1293724 -
AuthorPosts
- You must be logged in to reply to this topic.