Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
en:modifications:search-custom-productfields-during-productsearch [2015/02/06 15:31] swarnat created |
en:modifications:search-custom-productfields-during-productsearch [2015/02/06 15:32] (current) swarnat |
||
---|---|---|---|
Line 28: | Line 28: | ||
<code php> | <code php> | ||
- | if($module == 'Products'){ | + | if($module == 'Products'){ |
- | $query = 'SELECT label, crmid, setype, createdtime FROM vtiger_crmentity | + | $query = 'SELECT label, crmid, setype, createdtime FROM vtiger_crmentity |
- | INNER JOIN vtiger_products ON vtiger_products.productid = vtiger_crmentity.crmid | + | INNER JOIN vtiger_products ON vtiger_products.productid = vtiger_crmentity.crmid |
- | INNER JOIN vtiger_productcf ON | + | INNER JOIN vtiger_productcf ON vtiger_products.productid = vtiger_productcf.productid |
- | vtiger_products.productid = vtiger_productcf.productid WHERE (label LIKE ? OR cf_645 LIKE ?) AND vtiger_crmentity.deleted = 0 | + | WHERE (label LIKE ? OR cf_645 LIKE ?) AND vtiger_crmentity.deleted = 0 |
- | AND vtiger_products.discontinued = 1 AND setype = ?'; | + | AND vtiger_products.discontinued = 1 AND setype = ?'; |
- | $params[] = "%$searchKey%"; | + | $params[] = "%$searchKey%"; |
- | }else if($module == 'Services'){ | + | }else if($module == 'Services'){ |
- | $query = 'SELECT label, crmid, setype, createdtime FROM vtiger_crmentity INNER JOIN vtiger_service ON | + | $query = 'SELECT label, crmid, setype, createdtime FROM vtiger_crmentity INNER JOIN vtiger_service ON |
- | vtiger_service.serviceid = vtiger_crmentity.crmid WHERE label LIKE ? AND vtiger_crmentity.deleted = 0 | + | vtiger_service.serviceid = vtiger_crmentity.crmid WHERE label LIKE ? AND vtiger_crmentity.deleted = 0 |
- | AND vtiger_service.discontinued = 1 AND setype = ?'; | + | AND vtiger_service.discontinued = 1 AND setype = ?'; |
- | } | + | } |
</code> | </code> |