X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   replace productid with product SKU.......Any help!!! (https://forum.x-cart.com/showthread.php?t=8116)

info@bazar.com.my 06-16-2004 12:41 AM

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)

:roll:

funkydunk 06-16-2004 07:38 AM

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

info@bazar.com.my 06-16-2004 11:28 PM

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

cotc2001 06-20-2004 12:35 AM

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)

caucus 06-20-2004 11:36 AM

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

cotc2001 06-20-2004 11:52 AM

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

funkydunk 06-20-2004 10:52 PM

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)

info@bazar.com.my 06-22-2004 11:40 PM

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

caucus 06-23-2004 03:39 AM

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.


All times are GMT -8. The time now is 09:37 AM.

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