Home Forums WoodMart support forum Problem with price

Problem with price

Viewing 5 posts - 1 through 5 (of 5 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 14 hours, 50 minutes 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

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