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

    I’m building a shop with Enfold. I use variable products for the pet food like, 1 x 400g and 6 x 400g. In the overview of the shop page it shows now 3,09 € – 17,99 € But actually I only want to show the single product with it’s price 3,09 € and not the range of both variations. The variation can be choosen on th edetail page of course with th edrop down. How can I solve this? I use the German Marketpress plugin, too.

    Thx

    #642466

    Hi Thomas,

    I’m not sure this is our field of expertise unfortunately, could you try asking the same question on a WooCommerce forum as well please? I think they will be better equipped to help you out with their product. Please send us admin login details in private so that we can have a closer look at your installation.

    Regards,
    Rikard

    #642474

    Hey Thomas,

    Please try adding this at the very end of your themes / child themes functions.php file:

    function variable_price(){
    ?>
    <script>
    jQuery(window).load(function(){
         	jQuery('.price').find('.amount').eq(1).remove();
            jQuery(".product-type-grouped .price").text(function () {
        		return jQuery(this).text().replace("–", " "); 
    	});
    });
    </script>
    <?php
    }
    add_action('wp_head', 'variable_price');

    Best regards,
    Vinay

    #642487

    Hi Vinay,

    thank you, but this doesn’t work propper. I have one product, where it show sonly the one price (which is what I want), the other products in the overview page still look the same or it show something like 0,00 € or 0,00 € – 17,99 €.

    I have attached login details in private

    Thomas

    • This reply was modified 8 years, 5 months ago by Hanniball.
    #642675

    I found an earlier post with a solution that works:

    // Use WC 2.0 variable price format
    add_filter( 'woocommerce_variable_sale_price_html', 'wc_wc20_variation_price_format', 10, 2 );
    add_filter( 'woocommerce_variable_price_html', 'wc_wc20_variation_price_format', 10, 2 );
    function wc_wc20_variation_price_format( $price, $product ) {
    	$min_price = $product->get_variation_price( 'min', true );
    	$price = sprintf( __( 'Ab: %1$s', 'woocommerce' ), wc_price( $min_price ) );
    	return $price;
    }
    #643050

    Hi,

    Great! Glad you found a solution. :)

    Best regards,
    Ismael

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