Home Forums WoodMart support forum Price of products in theme options

Price of products in theme options

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

    av_admin_1984
    Participant

    Hi

    1-I want to change the order of price and promotion price
    the promotion price comes up and the original price with tag shows under the promotion price
    Also, want to change the color of the theme

    2-Hide Price If Out of Stock

    3-Show only the lowest prices in WooCommerce variable products

    With php snippet and css I achieved that already, want to add this in theme options,
    Thanks

    #514781

    Hello,

    Please refer to the Woocommerce community on this issue as our support does not cover the Woocommerce customization.

    03. Go to Theme Settings > Shop > Variable Product > disable the option show single variation and Hide variation parent.

    Best Regards.

    #516104

    av_admin_1984
    Participant

    for number 1 I add this code

    function changeorder_sale_price_html( $price, $product ) {
        if ( $product->is_on_sale() ) {
            $sale_price = wc_get_price_to_display( $product );
            $regular_price = $product->get_regular_price();
            $price = '<ins>' . wc_price( $sale_price ) . '</ins> <br>  <del>' . wc_price( $regular_price ) . '</del>';
        }
        return $price;
    }
    add_filter( 'woocommerce_get_price_html', 'changeorder_sale_price_html', 10, 2 );

    it works fine for products are in promotion sell, but in product with single price, it’s hide that and only on hover show the price (product style: buttons on hover)
    any help would be appreciated

    #516363

    Hello,

    Sorry to say such modification requires complicated code customization which is not covered by our support.

    Hope you can understand!

    Best Regards.

    #516388

    av_admin_1984
    Participant

    I fixed that

    function solde_sale_price_html( $price, $product ) {
        if ( $product->is_on_sale() ) {
            $sale_price = wc_get_price_to_display( $product );
            $regular_price = $product->get_regular_price();
            
            if ( $sale_price > 0 ) {
                $price = '<ins>' . wc_price( $sale_price ) . '</ins> <br>  <del>' . wc_price( $regular_price ) . '</del>';
            }
        }
        return $price;
    }
    add_filter( 'woocommerce_get_price_html', 'solde_sale_price_html', 10, 2 );

    You are too slow in answering

    #516449

    Sounds Great! that your issue has been solved.

    I’m so happy to hear you are pleased with the Theme and Support. XTEMOS strives to deliver the best customer experience, and it makes our day to hear we have accomplished that.

    We count ourselves lucky to have you as a customer. You can always reach us at any time. We are always here to help you.

    Thanks for contacting us.
    Have a great day.

    Topic Closed.
    Best Regards.

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