Rate for post

We recommend VirtueMart sampledata for initial testing. And keep defaults if not specified or desired to change.
Before you start:
– Ensure show search is enabled: browse VirtueMart configuration vm > configuration > templates
– Check config of menu item to display Searchable Custom Field. To be sure that the search is displayed, Browse Joomla > Menu > Select your Shop view, former Store front.

Note: If 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, in this example, 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
Comment: You can use already present customfields as well.

2. Configure new Custom prototype

For example use these specs
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.
Browse /administrator/index.php?option=com_virtuemart&view=product

For each product browse in product details to the tab Custom Fields and add the new created Customfield Color. Then select a color. Don’t forget save the changes.

In frontend on category view you should find your searchable customfield shown as dropdown in the search area.

If you have any question about this post, don’t hesitate to leave a comment below. And don’t forget to share with your friends if you find it useful! Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

Save 99% money with single purchase! Get All-In-One DEV package: Access all paid products! Unlimited Downloads with more than 300+ PRO items Sign Up Now!
Black Friday & Cyber Monday Sale! Get 50% OFF for your purchase on today! Coupon code: BFCM50 Redeem Now