Requires VirtueMart 3.0.18 or higher
We recommend VirtueMart sampledata for initial testing.
Keep defaults if not specified or desired to change. Desire to change only if you know what you do.
Before you start:
i. Ensure show search is enabled
ii. Check config of menu item
i. Show search is enabled: browse VirtueMart configuration as shown below vm > configuration > templates
ii. Check proper config of Joomla menu item to display Searchable Custom Field. To be sure that the search is displayed, check the proper configuration in the joomla menu item. Browse Joomla > Menu > Select your Shop view, former Store front. Please note both tabs, Details and Virtuemart category view settings as shown in two screenshots below.
Comment: In case you are still using older VM version with layout Front page please note the former Front page view is deprecated and will be replaced by category layout.
There are as always different solutions how to configure this setting in Joomla and VM, however for this example in VM we enabled search option globally, in Joomla Menu item config we set to use the global setting.
1. Create new custom field prototype browse /administrator/index.php?option=com_virtuemart&view=custom and create new custom field prototype as displayed below
Comment: You can use already present customfields as well.
2. Configure new Custom prototype for example use these specs as shown in image
Custom Field Type > String
Title > Color
Published > No // You can keep the customfield proto unpublished, it will hide on productdetails but still be available on search results.
Searchable > Yes // enable this to include this custom proto into search results.
Default Value > Yellow;White;Blue;Brown;Red // this creates a set of strings (colors) to be selectable on product edit
Is a list? > As Admin List // this allows in product customfields to add the color value from a dropdown list.
Save our entry
3. Assign searchable string fields to a couple of products to see some results.
For each product browse in product details to the tab Custom Fields and add the new created Customfield Color. Scroll to bottom and select a color. Save the changes.
Result: In frontend on category view you should find your searchable customfield shown as dropdown in the search area. Let us try and select yellow - result should be shown after quick reload as shown below
Try it out at demo.virtuemart.net/