Digital experiences for all disciplines
New Landing › How can we help? › Atelier › Free Badge Bug
New Landing › How can we help? › Atelier › Free Badge Bug
- This topic has 13 replies, 4 voices, and was last updated 8 years by Swift Ideas – Ed.
-
Posted in: Atelier
-
June 23, 2015 at 9:26 pm #187706
The “FREE” badge is displaying on the product page and thumbnails for products with no price. In WooCommerce if a product has no price, not a $0 price, then it’s a “catalog only/not for sale” item. The add to cart and wishlist buttons don’t display which is correct, but the free badge should not be displayed.
Thanks,
TerryJune 24, 2015 at 1:23 pm #188033Hi Terry,
The Catalog mode in Woocommerce it’s applied globally and not per product basis, altough when you have a product with no price it’s not supposed to show the free badge.
Check if that product has any variation with price 0 because I tested in mine an it’s not showing the free badge.
-Rui
June 24, 2015 at 3:39 pm #188139There is a global catalog mode but individual products with an empty price should be in “catalog mode” as well. You can google this to verify.
The product that I was referring to does not have variations.
I created a new product and set nothing on it but the name and assigned a category (the price is empty by default) and the New badge displays. What did you do in your test to make the New badge disappear so you could test the Free badge?
I’m currently testing this functionality because half of my website will be for sale items and half will be catalog items, and I need to ensure that it will all work. So far it looks like the buy button and price are hidden everywhere they need to be on the catalog items.
June 24, 2015 at 3:51 pm #188140I placed the price to 0 and it shows up the Free badge, when I cleared the value leaving it empty the Free badge was gone. Also tested with Twenty 15, try to make this same test with Twenty 15.
Let me know the result probably will need admin access and the url of the product.
-Rui
June 24, 2015 at 4:12 pm #188152This reply has been marked as private.June 25, 2015 at 8:30 am #188355Hi
Try clearing your cache
– Kyle
June 25, 2015 at 3:37 pm #188671Clearing the cache didn’t change anything.
June 25, 2015 at 3:38 pm #188672will check it now.
-RuiJune 25, 2015 at 4:23 pm #188690couldn’t replicate my situation that was working so took a look at the code and needed to change an if statement to verify if the returned price was zero. Only in those situations the free badge appears now.
I added the modified function to the bottom of the functions.php of your child theme.
Will revise this code with Ed so we can send it in the next update(no ETA at the moment).Check again your product without price.
-Rui
June 25, 2015 at 4:28 pm #188696Yes, it’s working now. Thank you Rui!
Terry
June 25, 2015 at 4:38 pm #188704No problem. Glad it’s sorted.
-RuiJuly 21, 2015 at 6:31 pm #196484The changelog for release 1.6 says that this is fixed: “Fixed issue with free badge showing when no price is set”. However, I removed the replacement for sf_woo_product_badge() in my functions.php that you guys added and the bug reappears. I know this is low priority. I would just like to keep my custom code as minimal as possible. My theme version is 1.6 and the plugin version is 1.4.
Terry
July 22, 2015 at 8:34 am #196558Hi
I see this is not yet fixed, will report to the developer
– Kyle
July 22, 2015 at 1:33 pm #196691Apologies – was some confusion over the fix. Have definitely resolved it now.
– Ed
-
Posted in: Atelier
You must be logged in and have valid license to reply to this topic.