This is what I would do:
- Add these parameters to the virtuemart backend under the "Add product" form. You would have to add new columns to the database to support these. This fix is quite easy in fact.
You can do this by:
Add the form boxes to the product form in admin (administrator\components\com_virtuemart\html\product.product_form.php):
<tr class="row0">
<td width="21%"><div style="text-align:right;font-weight:bold;">
<div>Year:</div>
</td>
<td width="79%">
<input type="text" class="inputbox" name="year" value="<?php $db->sp("year"); ?>" size="2" maxlength="2" />
</td>
</tr>
Then you need to make sure these values get inserted in the database. In file (administrator\components\com_virtuemart\classes\ps_product.php) around line 273 you will find something like this - add in the line which is not indented like the rest:
$fields = array ( 'vendor_id' => $vendor_id,
'product_parent_id' => vmRequest::getInt('product_parent_id'),
'product_sku' => vmGet($d,'product_sku'),
'product_name' => vmGet($d,'product_name'),
'year' => vmGet($d,'year'),
'product_desc' => vmRequest::getVar('product_desc', '', 'default', '', VMREQUEST_ALLOWHTML),
'product_s_desc' => vmRequest::getVar('product_s_desc', '', 'default', '', VMREQUEST_ALLOWHTML),
'product_thumb_image' => vmGet($d,'product_thumb_image'),
'product_full_image' => vmGet($d,'product_full_image'),
- Then what you need to do is add a form into your browse page and create functions in ps_product.php and shop.browse.php, in admin/classes and admin/html respectively, in order to restrict the products you display on your browse page according to the search options. I won't go into the code on this as it's quite lengthy and personally I like to get paid for this type of work. You may also customise the Virtuemart search module, maybe that would be an easier option, but I have never used the search module before so I wouldn't know. Explore your options. Good luck!