Provider Search/Display for productcode instead of productID
looking at it now it looks simple but it has drove me mad. Just incase anyone else can use this here it is. Ability to search products through provider by productcode. Display results uses productcode as well.
It is working on 3.4.4 and I think I have documented everything I did. If I need to repost complete code for the files let me know. ------------------------------------------------------------------ PHP File: provider/search.php Around line 79 Change This Line: Code:
$productid_condition = ($search_productid==""?"":"AND ($sql_tbl[products].productid='$search_productid') "); Code:
$productcode_condition = ($search_productcode==""?"":"AND ($sql_tbl[products].productcode='$search_productcode') "); Around Line 87 Change This Line: Code:
$productid_condition = ($search_productid==""?"":"AND ($sql_tbl[products].productid='$search_productid') "); Code:
$search_query = "1 ".$category_condition.$substring_condition.$provider_condition.$productcode_condition; TEMPLATE File: skin1/main/search_results.tpl Around Line 10 Change This Line: Code:
<INPUT type=text name=search_productid size=6 value="{$smarty.get.search_productid}"> Code:
<INPUT type=text name=search_productcode size=6 value="{$smarty.get.search_productcode}"> TEMPLATE File: skin1/main/products.tpl Around Line 17 Change This Line: Code:
<td width=1%>#{$products[cat_num].productid}</td> Code:
<td width=1%>#{$products[cat_num].productcode}</td> Hope this helps someone |
Works Great
:D It works great - Thanks for the mod
|
All times are GMT -8. The time now is 02:13 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.