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

replace productid with product SKU.......Any help!!!

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 06-16-2004, 12:41 AM
 
info@bazar.com.my info@bazar.com.my is offline
 

Advanced Member
  
Join Date: Feb 2004
Location: malaysia
Posts: 34
 

Default replace productid with product SKU.......Any help!!!

Hi every body,
I have been trying to replace the productid with the product sku, but I don't know where to start from.
I also want to allow searching SKU....

Can any one help me with this..

Your help is highly appreciated.
Thanks


x-cart 3.5.4 (windows)

Reply With Quote
  #2  
Old 06-16-2004, 07:38 AM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

search.php needs to be amended to allow for this

search for where it says something like:

Code:
$sql_tbl[products].product like '%$substring%'

and change to:

Code:
$sql_tbl[products].product like '%$substring%' or $sql_tbl[products].productcode like '%$substring%'

This needs to be in customer/search.php as well as admin/search.php and provider/search.php for soem reason xcart did not unify this search mechanism on the 3.5 version and older store.

The productid shown on the product detail page is drawn from func.php

replace line 1773:
Code:
$product["producttitle"]="$product[product] #$product[productid]";
with:
Code:
$product["producttitle"]="$product[product] #$product[productcode]";

hth
__________________
ex x-cart guru
Reply With Quote
  #3  
Old 06-16-2004, 11:28 PM
 
info@bazar.com.my info@bazar.com.my is offline
 

Advanced Member
  
Join Date: Feb 2004
Location: malaysia
Posts: 34
 

Default

Dear funkydunk,
Thank you for your reply.

I have amended the first code in the customer/search.php, but I could not find the admin/search.php and the provider/search.php.

Where can I find the func.php. I could not find it.

Thank you
Reply With Quote
  #4  
Old 06-20-2004, 12:35 AM
 
cotc2001 cotc2001 is offline
 

X-Man
  
Join Date: Feb 2003
Location: Shrewsbury, UK
Posts: 2,351
 

Default

anyone know how to do this for v 3.3.3 ???
I made the changes above and it had no effect (not even negative one)
__________________
x-cart 4.0.5 (live and heavily modded)
Server: freebsd
Reply With Quote
  #5  
Old 06-20-2004, 11:36 AM
  caucus's Avatar 
caucus caucus is offline
 

eXpert
  
Join Date: Oct 2003
Location: FLorida U.S.A
Posts: 356
 

Default

Hello Group

The func.php can be found in the include file folder at yourdomain/xcart/include

I found the line of code at line 1704
__________________
Staying To The Right
But Left of Rush

X-cart Current version: 4.4.2
X-cart Current version: 4.4.1
X-cart Version 4.0.14
X-cart Version 4.1.6
Litecomm Version: 2.2.35
Operating System Linux
PHP Version 5.2.14
Apache/2.2.16 (Unix)
MySQL client version: 5.091
Reply With Quote
  #6  
Old 06-20-2004, 11:52 AM
 
cotc2001 cotc2001 is offline
 

X-Man
  
Join Date: Feb 2003
Location: Shrewsbury, UK
Posts: 2,351
 

Default

couldnt find it at 1704 BUT i have just noticed that if I put in the SKU (not article id) into the product name it comes up with the correct one, which is good enough for me
__________________
x-cart 4.0.5 (live and heavily modded)
Server: freebsd
Reply With Quote
  #7  
Old 06-20-2004, 10:52 PM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

Quote:
Originally Posted by cotc2001
anyone know how to do this for v 3.3.3 ???
I made the changes above and it had no effect (not even negative one)

cotc - pretty sure that the producttitle bit was taken out of the store on your sites (removed from product.tpl)
__________________
ex x-cart guru
Reply With Quote
  #8  
Old 06-22-2004, 11:40 PM
 
info@bazar.com.my info@bazar.com.my is offline
 

Advanced Member
  
Join Date: Feb 2004
Location: malaysia
Posts: 34
 

Default

Hi group,

I need your help, I am using x-cart v3.5.4. I have been trying to replace the SKU instead of the productid. I have been given the basic tips to do so, but i have problems in findinf the following file:

<xcart_root_folder>/include/func.php

I tried searching the Administrator's area/Edit templates. I could not find it.

Anyone knows where to find this file and how.....??
Any help is really appreciated.
Thank you
Reply With Quote
  #9  
Old 06-23-2004, 03:39 AM
  caucus's Avatar 
caucus caucus is offline
 

eXpert
  
Join Date: Oct 2003
Location: FLorida U.S.A
Posts: 356
 

Default

Hello

OK, You may have renamed the xcart folder if so start at the location where all the files are located. You cannot find it from inside the admin section of X. You have to use a FTP program such as Ws_FTP_pro.

Via FTP program open up your x folder then locate the include folder. The func.php will be in there. Download it to your computer. Open it up and make your changes.

I use Homesite to make my changes but I am sure anything that gives you the line numbers will work. Dreamweaver works great also.

I hope this helped you out.
__________________
Staying To The Right
But Left of Rush

X-cart Current version: 4.4.2
X-cart Current version: 4.4.1
X-cart Version 4.0.14
X-cart Version 4.1.6
Litecomm Version: 2.2.35
Operating System Linux
PHP Version 5.2.14
Apache/2.2.16 (Unix)
MySQL client version: 5.091
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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:19 AM.

   

 
X-Cart forums © 2001-2020