Tagged: dropdown, Product page
-
AuthorPosts
-
July 7, 2015 at 8:19 pm #469918
Hi There,
There is prices showing next to my sizes on my product page dropdown box. I need the prices gone. Can someone please help! http://www.asterandoak.com.au
I am running woocommerce too
Thanks!
July 7, 2015 at 10:37 pm #469968Hi mellypenny!
That happens because the variations do have different prices.
Just copy and paste below code for your theme function.php file.
function patricks_custom_variation_price( $price, $product ) { $target_product_types = array( 'variable' ); if ( in_array ( $product->product_type, $target_product_types ) ) { // if variable product return and empty string return ''; } // return normal price return $price; } add_filter('woocommerce_get_price_html', 'patricks_custom_variation_price', 10, 2);
Let me know if it helped you
Cheers!
BasilisJuly 8, 2015 at 4:46 am #470020Hi Basilis! Thanks for the quick reply :-)
Where would i find the function.php file? Is it in the theme on wordpress somehwere or do i need to go into FTP?
July 8, 2015 at 8:40 am #470068Hi!
You can access it either from FTP inside the theme folder, or from Apperance -> Edditor
Best regards,
BasilisJuly 9, 2015 at 1:05 pm #470793Hi Basilis!
I added it to the function.php file but the price still shows – https://www.asterandoak.com.au/product/fox-organic-baby-romper/
Is there anything else i needed to do? Like re-ad the product?
July 9, 2015 at 1:43 pm #470821Hey!
I am getting an error while loading your web site!
If what I posted previously is not working, please also try
add_filter('woocommerce_variable_price_html','custom_from',10); add_filter('woocommerce_grouped_price_html','custom_from',10); add_filter('woocommerce_variable_sale_price_html','custom_from',10); function custom_from($price){ return false; }
Cheers!
Basilis- This reply was modified 9 years, 5 months ago by Basilis.
July 9, 2015 at 1:47 pm #470826Sorry try again now.. It still didnt work :-(
July 9, 2015 at 2:53 pm #470914Hey!
Can you let me know if you copy the code from the email or you come to forum and copying it?
Can you also add your backend access to the postCheers!
BasilisJuly 9, 2015 at 3:00 pm #470923I came to the forum and copied it.
Do you mean my wordpress login?
July 9, 2015 at 3:12 pm #470931Hey!
Yea please, your WordPress login!
Best regards,
BasilisJuly 9, 2015 at 3:14 pm #470933Okay Thanks Will put it below.
July 9, 2015 at 4:42 pm #470997Any Luck? Do you know what the problem is?
July 10, 2015 at 8:22 am #471305Hey!
I check the product and the variations are quite different from the default woocommerce installation. There is a dollar sign beside the size attribute. There is a product variation in my installation but it doesn’t display any prices in the attribute options. Please try to deactivate the woocommerce extensions in the plugins directory.
Cheers!
Ismael- This reply was modified 9 years, 5 months ago by Ismael.
July 11, 2015 at 8:42 am #471812Thanks for that Ismael,
I deactivated the plugins and figured out it was the woocommerce wholesale pricing plugin causing it. Any ideas how to get rid of it or i need to contact them?
July 13, 2015 at 10:57 am #472234 -
AuthorPosts
- You must be logged in to reply to this topic.