X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Provider Search/Display for productcode instead of productID (https://forum.x-cart.com/showthread.php?t=4002)

rodneyw 08-15-2003 10:49 AM

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

info@auction-help.com 08-20-2003 02:33 AM

Works Great
 
:D It works great - Thanks for the mod


All times are GMT -8. The time now is 01:23 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.