Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Provider Search/Display for productcode instead of productID
 
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features
 
Thread Tools Search this Thread
  #1  
Old 08-15-2003, 10:49 AM
 
rodneyw rodneyw is offline
 

Senior Member
  
Join Date: Mar 2003
Posts: 162
 

Default 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') ");
To:
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') ");
To:
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}">
To:
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>
To:
Code:
<td width=1%>#{$products[cat_num].productcode}</td>


Hope this helps someone
Reply With Quote
  #2  
Old 08-20-2003, 02:33 AM
 
info@auction-help.com info@auction-help.com is offline
 

Member
  
Join Date: Jul 2003
Posts: 15
 

Default Works Great

It works great - Thanks for the mod
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 06:49 PM.

   

 
X-Cart forums © 2001-2018