Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #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!
    Regards

    #1293249

    Hey 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,
    Rikard

    #1293314

    Hi 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 );

    #1293724

    Hi,

    Thanks for the update, and for sharing your solution. Please let us know if you should need any further help on the topic.

    Best regards,
    Rikard

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.