Home Forums WoodMart support forum Problem with price

Problem with price

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #609358

    dars222
    Participant

    Hi, I have a problem with the price. I have 3 attributes in all products. But before entering the product I only want one main attribute with a higest price and an option to add to cart. Its is possible change in this theme?

    • This topic was modified 1 month ago by dars222.
    Attachments:
    You must be logged in to view attached files.
    #609404

    Hello,

    Navigate to Theme Settings > Shop > variable Product Enable the option “Hide Price”.

    Best Regards

    #609421

    dars222
    Participant

    Not working Sir, after “Hide to price” I have the smallest price and button the option.

    I want the highest price and button add to basket

    Attachments:
    You must be logged in to view attached files.
    #609428

    Hello,

    Add the code below in the functions.php file in your child theme:

    add_filter('woocommerce_variable_price_html', 'custom_variation_price', 10, 2);
    function custom_variation_price( $price, $product ) {
    // Get the highest priced variation
    $highest_price = $product->get_variation_price('max');
    if ($highest_price > 0) {
         // Display the highest price
         $price = wc_price($highest_price);
     }
     return $price;
    }

    Best Regards

    #609431

    dars222
    Participant

    Thank you, price is okay but still button is not ok.

    At now is : select options
    I want: add to basket

    #609604

    Hello,

    The “Select Options” button is displayed by default for variable products on the shop page.

    If you want to change the text, You can use the loco translate plugin.
    For more information please read the theme documentation here:
    https://xtemos.com/docs-topic/translate-woodmart-theme-with-loco-translate/

    Best Regards

Viewing 6 posts - 1 through 6 (of 6 total)