PDA

View Full Version : categories and then edit search_function.ph


clueless
02-04-2005, 10:33 AM
I need some help with editing the search_function.php

I have already created tables in mysql for categories and products and would like to know how I can edit search_function.php to query based on category and products. This was touched upon in an old thread but I could not post my question there. Any help would be tremendiously appreciated! :) Thanks in advance. Please be as specific as possible as to where within search_function.php I would have to edit and if at all I have to make changes in any other files.....I am a newbie :)

clueless
02-04-2005, 12:29 PM
jmitchell sorry to bud in, but it would be of interest to me as well, I have figured a way to do this, I have added category and product tables to mysql but now need to have the link results to categories go into this table I am assuming that I now have to edit my search_function.php can you help with this?

jmitchell
02-04-2005, 12:46 PM
where is the category and product info? Is it in the page that you are trying to index? Is it in a feed somewhere that you can parse and add to the DB?

Need more info before I can attempt to help,

JMitchell

clueless
02-04-2005, 12:54 PM
thanks so much for your reply, well let me see if I can explain so that it makes sense, I would like to spider pages for categories/products and return the pricing results on my site sort of like comparisons shopping but better! Well....now I have added tables to mysql which are to hold the products and categories now I need to know what I can do to return the results (preferably with pictures) I was thinking that I would have to edit my search_function.php in order for it to store the results? or even grab them? I also have another quest I need to grab the pricing info on these products so that they can be searchable on my site
Thanks a million....

jmitchell
02-04-2005, 02:06 PM
I think that a custom php script would be better for your indexing. It would have to be looking for certian criteria (and it would be easier if your product pages had attributes around the things that you were trying to index, such as a comment around it) that you would then make a script that went and looked for those, and grabbed them.

those are my initial ideas.

JMitchell

clueless
02-04-2005, 04:25 PM
jmitchell thanks so much for your suggestion :) ......where do I begin, how would I include the custom script and do you have any pointers as to how I can get started on this script....I am not only new to PHPDig but also to PHP and would kinda need some help....if you're up for it.

I would not know where to start :cry:

I guess the tags would be looking something like this

<input name="cmd" type=hidden value='changeZipcode'>
<input name="newUnits" type=hidden value=''>
<input name="tag" type=hidden value=''>
<input name="category" type=hidden value='IT'>
<input name="offer" type=hidden value=''>
<input name="sort" type=hidden value='null'>
<input name="pdir" type="hidden" value="5">
<input name="node" type="hidden" value="500001">
<input name="lgsearch" type="hidden" value="">

<a name="refprice"><b>By Price:</b></a><br></div>

Honestly I am so in need of help with this......pleeease!

clueless
02-04-2005, 04:35 PM
Tired......

these would probably be the tags I'd be looking something long those lines...
<b>$712.95</b></a><div class="buyAtSeller">
I need to return the price, product, description and a link of where to get it and all of this I want to incorporate in a custom results page which when the link to the product is clicked will open a new window...oh boy the rate I am going learn as I go I will have great grand kids by time I finish this project:)

Thanks again Jmitchell :)