-
AuthorPosts
-
June 1, 2016 at 11:03 pm #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
June 3, 2016 at 9:00 am #642466Hi 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,
RikardJune 3, 2016 at 9:30 am #642474Hey 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,
VinayJune 3, 2016 at 10:35 am #642487Hi 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, 6 months ago by Hanniball.
June 3, 2016 at 7:33 pm #642675I 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; }
June 5, 2016 at 2:49 am #643050 -
AuthorPosts
- You must be logged in to reply to this topic.