Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Is there any woocommerce plugin that allows you to display a product page filtered by badge?

Posted on 2014-12-15
10
Medium Priority
?
254 Views
Last Modified: 2014-12-16
Hi all,

Does anyone know of any plugin, free or commercial, that might allow me to display a page with products filtered by badge such as "NEW" or "ON SALE" or "OUT OF STOCK"? What I very probably am looking for is a plugin that allows me to first assign custom badges to products and then filter through them too.

thanks in advance.
0
Comment
Question by:badwolfff
  • 5
  • 4
9 Comments
 
LVL 3

Expert Comment

by:Morgan Finley
ID: 40501317
You should probably do this by adding items to categories, which would allow for filtering and other manipulation. You could then add a class to each image/post based on the category, and use CSS to add the "badges" to each.
0
 

Author Comment

by:badwolfff
ID: 40501825
Hmm thanks but not what I am looking for. My items all have categories. But across these categories there are items that from time-to-time share "on sale" or "out of stock" etc. badges. Some of these badges are auto-generated too. I need a plugin capable of loading a page with items grouped by the badge. No CSS hack can do that.
0
 
LVL 3

Expert Comment

by:Morgan Finley
ID: 40501854
My solution involves both categories and CSS. To clarify with an example:

Create a category called "On Sale" so that wp can query the database for posts/items that are on sale
The category name should now be amended to the post as a class, depending on your theme's output
Target posts with the category in your CSS and style them however you would like (perhaps overlay the badges on the post images, etc.)

You should try not to use a plugin to do something WordPress can do natively-- querying the database for posts/items of a type/category.

The benefit of doing it this way is that you can apply that badge to the post/item anywhere it's displayed on site, regardless of if they are looking at only items on sale. So if they are looking at all items/posts of a category, the CSS will style the items with the "on sale" class to have the desired badge.

What plugin generates the badges? Does it output them as images you can re-use? If it's auto-generating them, it should be able to programmatically apply them to posts of a type/category/tag. Either way it will use CSS to add the badges- it's just a question of where that CSS comes from, the plugin or the theme.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:badwolfff
ID: 40501935
When items go out of stock on woocommerce, all the plugins that handle badges automatically put in a out of stock badge. Same applies to time based coupon promotions or discounts. See it is impossible with a site full of content to do it using your method. Too mechanical :(

thanks anyway
0
 
LVL 3

Accepted Solution

by:
Morgan Finley earned 2000 total points
ID: 40501964
My solution is still the same. CSS is being applied through the plugin, probably using custom fields (which are tracked through the back end). Look at the classes and CSS of these posts/items and you will see what is happening.

Only difference from my previous answer is that instead of filtering/querying by category, it's filtering by custom field. Find out what custom fields or post meta are used by your woocommerce plugin and you will have the answer for how to filter or query the database and display only those posts you want to show.
0
 
LVL 3

Expert Comment

by:Morgan Finley
ID: 40501965
Even if it's actually adding a badge image with the img tag, it's based on what custom fields or post meta is associated with the items.
0
 

Author Comment

by:badwolfff
ID: 40501993
now that is an interesting thought worth thinking. Hmmmm...
I need to experiment. You have to be right. There must be some custom field that makes the badge go on or off.
Will keep you posted :D
0
 

Author Comment

by:badwolfff
ID: 40501996
You see the thing is, I am NOT trying to apply the badges. They are already there automatically or manually and some even expire on their own. I just want to filter them. And I think with this custom field business there might be a chance. Only problem is I have to find such info inside the plugin's code because on the GUI there are none.
0
 
LVL 3

Expert Comment

by:Morgan Finley
ID: 40501998
I understand you are not applying the badges,  but to filter them you will have to either dive into the plugin code or the plugin documentation, and find out how they are being applied. That's the first step to solve this problem.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
It’s a season to be thankful, and we’re thankful for users like you who engage on site, solve technology problems, and network with others in the industry. What tech are we most thankful for? Keep reading.
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…
Suggested Courses

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question