Jump to content

Categories and related filters


Recommended Posts

Hello, 

Let's assume I'm organizing products.  I'm looking to setup categories and filters so visitors can efficiently find products.  The visitor will drill down/navigate through categories then be presented with additional taxonomies to further filter the results.  I see Amazon doing this.

Categories are pretty straight forward. In PW I'll create a page for each category.  I'll then assign one or many of those categories/pages to the product using the page reference field.

Filters aren't coming to me so easily though.  How do I allow the user to assign filters from a predefined list based on the type of product their inputting?  The products will be vastly different so they won't share the same attributes.  Random clarification: When looking for a beer mug you won't filter based on fabric. 

Consider the attached, taken from this projects wireframes. Those filters (style, frame materials, etc.) are relevant to the type of product listed on the page. 

How would you folks recommend setting up the back-end (within PW) for this type of structure.  I think what's getting me is how do I allow the client to grow the site - to allow him to setup his own filters based on new product categories. 

Any insight would be greatly appreciated. 

wires.jpg

Link to comment
Share on other sites

A super easy way and not complicated to be extended by the client (even for only one product) is using something like this https://modules.processwire.com/modules/textbox-list/ with an implementation like this https://help.shopify.com/manual/using-themes/themes-by-shopify/supply#product-tips-tips-specific later use the API to filter the pages, this works easy with localization too

Link to comment
Share on other sites

This is just an idea, haven't put it to practice.

35 minutes ago, Chris Falkenstein said:

Filters aren't coming to me so easily though.  How do I allow the user to assign filters from a predefined list based on the type of product their inputting?  The products will be vastly different so they won't share the same attributes.  Random clarification: When looking for a beer mug you won't filter based on fabric. 

You would add the filters to the category pages the same way you add the categories to the product pages.

And when you view products from category X you get the filters from that category page and maybe it's children, if any.

Product A is in category X, which has the following filters: color, size, weight.

View category X, available filters color, size, weight. 

  • Like 1
Link to comment
Share on other sites

Thanks for the replies.

I was considering how it would be to add filters to the categories.  What about assigning those filter values when inputting the product?  For example, I'm inputting a t-shirt on the edit screen, what's the experience for inputting the available colors?  How does the edit screen for the product know to show the appropriate filter?  The edit screen would have to determine what category they chose and display the appropriate filters so the user can select from a value or add a value to that filter group.  Hmmmm...

Link to comment
Share on other sites

For each filter you have, you create a field and add it to the product template. You also add the filters page field.

Now you set up each filter field to only show if it was selected in the filters page field. http://processwire.com/api/selectors/inputfield-dependencies/#example-page

filters.gif.025330912e837e5a25f1c556243149ea.gif

You can automated the creation of the fields by hooking the page save and creating a filter field when a filter page is added.

  • Like 5
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...