Overview
In this how-to you will learn how to create a product with filters. At the end
of it you will have added a property group a property, a category with three
products and a filter portlet.
Note
If you don’t have a working LFS instance yet, you can just use our demo
shop at http://demo.getlfs.com. Please be aware that we reset the database
every two hours.
Steps
First we will add the corresponding filter portlet:
- Go to Management / Shop / Preferences.
- Go to the “Portlets” tab.
- Select Filter portlet and click Add portlet. Enter Filter in the
Title field and click Save portlet. You should now see the filter
portlet within the Left slot section.
Now we will add properties, which are the base for the product filters.
- Go to Management / Properties / Properties.
- Add a new property by clicking Add property. (If there is no property.
at all yet you will see the Add property form automatically).
- Enter the Name of the property, in our case Size and click
Add property.
- Go to Field type, select Select field and click Save property
type.
- Now go to Options and fill in the Name field. In our case Small.
Click Add option.
- Repeat step 8 for Middle and Large. Now you should see three options
within property Size: Small, Middle and Large.
Now we will add a property group.
Note
Every property has to belong exactly to one property group in order to
use it with a product.
- Got to Management / Properties / Property Groups.
- Add a new property group by clicking the Add property group button.
(If there is no property group at all yet you will see the Add property
group form automatically).
- Enter the Name of the property, in our case T-Shirts and click
Add property group.
Now assign the property to the property group:
- Go to the “Properties” tab.
- Select Size and click Assign properties.
You should now see Size within Assigned properties.
We will now add the Property group to some products.
- Go to Management / Catalog / Products.
- Add a new product clicking Add product. (If there is no product at all
yet you will see the Add product” form automatically).
- Fill in Name T-Shirt One and Price 10.00 and click Add product.
No we assign values to the properties:
- Go to the Properties tab of that product.
- Select our Property group T-Shirts and click Update property groups
You will now see the Property Size.
- Select Size Small.
- Repeat Steps 16 - 20 for T-Shirt Two and T-Shirt Three and assign
sizes Middle and Large and prices 100.00 and 1000.00. Now you should
have three products T-Shirt One, T-Shirt Two and T-Shirt Three with
sizes Small, Middle and Large and prices 10.00, 100.00 and
1000.00.
We need to make the products active:
- Go to Management / Catalog / Products Overview.
- Select Active for all products and click Save.
Now we add a new category T-Shirts:
Note
Filtering takes place on products of a category, hence we add a category
for our newly products.
- Go to Management / Catalog / Categories.
- Add a new category by clicking “Add category”. (If there is no category at
all yet you will see the “Add category” form automatically).
- Fill in the Name: T-Shirts and click Add category.
Now we assign the products to the category:
- Go to the products tab of that category.
- Select the products T-Shirt One, T-Shirt Two, T-Shirt Three and
click Add to category.
Now we are ready to preview our new content:
- Click on the Preview button. You should now see the filter portlet
with the ability to select the sizes Small, Middle and Large and prices 0 - 500.00 and 501.00 - 1000.00.