Question: How-to create filters using Custom Fields in Virtuemart 2 and Virtuemart 3

Complete process consists of two steps:
  • 1. Creating Custom Fields (CFs); and
  • 2. Assigning values to products using already created CFs.

Please note, there are some features that are absent in ChP for Custom Fields (mostly from this demo category). Such as the ability to filter by parameters with trackbar and color palette filters.

For using Custom Fields you'd need to install a version of Cherry Picker that has a "CF" suffix: cherry_picker_cf.

We will be working in this section of Virtuemart (BTW, it's a complete filter structure that provides this demo):

(images are clickable)




The approach in creating CFs is somewhat similar to what we did with Product Types.
We will start from creating a Parent Custom Field that will hold other CFs.

Note
In Virtuemart 3 Parent Custom Field was renamed to Group Custom Field.



Click New and enter the data like following:





Then choose New again and create a CF that will serve as an actual filtering parameter. Important notes:
  • Title is used in URLs, like "&brand=Apple|LG". For this reason this field must be unique among all CFs. So if you're going to have, for example, two Parent CFs "Televisions" and "Phones" and each of them will have "Brand" then the names must be uniquely given, like "tv_brand" and "phone_brand".
    Also "Title" should not have any spaces and non-alphanumeric characters.

  • Description is used as a header in filters.


Choose "String" as "Custom Field Type". Specify "Title" and "Description" and choose our previously created Parent "Televisions".



In this way create as many CFs as you like.



When you are complete with creating Custom Fields we proceed to the second step — assigning filters to products.

Open product details and go to the last tab "Custom Fields". From the drop-down select Parent CF "Televisions" (or how you named it) and then fill in the data in a form that appears below. And Save.





You can assign as many Parent Custom Fields to one product as you wish. Like in example below we chose "Electronics" to add two more fields.

If you want to assign Multiple values just do so through semicolon without spaces: "Black;White;Blue" or "L;XL;XXL" or "Summer;Winter", etc.





Important! You would need to replace product.php file in Virtuemart in order for it to "understand" our filter selection. You will find an appropriate file for your version of VM over here. Otherwise, filter results will not be updated.



You can use filters now!

Visit AsianSexCenter.Com for the best asian xxx.