You are here:  » A couple of questions


A couple of questions

Submitted by madison on Mon, 2006-11-13 22:00 in

David , thanks and thanks again , think im getting the hang of things now.
have had a play with the program and have added various mods that I have found on the forum, but I cant see anything regarding the related products.
Is there another script that needs adding for the related products to show up?

also is it possible to modify the search so it is more exact , say you search for fridge freezer , the reults returned are fridges , freezers and fridge freezers , can it be changed just to return results with both words only?

many thanks

Submitted by support on Mon, 2006-11-13 22:25

Hi,

Related products have been in the script for a while now; if you check your config.php for...

  $config_useRelated = ....

If that is set to true; related products should be displayed (but it is not enabled by default). If you don't have this setting, you would need to download the latest version to get the related products functionality. It is a very simple implementation; all it does is perform a search using the current product as the search term; but ignoring the first result (which would be the product itself).

The search _can_ be made more exact - the script used to work like that before we developed the full text indexing, and you can re-enable it by removing the IF statement within search.php that uses the full text index if the search text is > 3 characters long.

On line 35 you will find the following code:

        if (strlen($parts[0]) > 3)

If you change that to simply:

        if (0)

...that will force the old search method for all queries - and all words will have to be present in the query in the order that they are entered in order for results to be returned.

If you have a later version of MySQl (version 4.01 or later); you may find you prefer the results when using the full text index in BOOLEAN mode. This allows a search for the words entered but in any order. Have a look at the following thread:

http://www.pricetapestry.com/node/420

Hope this helps,
Cheers,
David.

Submitted by madison on Mon, 2006-11-13 22:28

thanks , time to have a go

Submitted by madison on Tue, 2006-11-14 08:53

Hi david , sorted the search with no problems , for me this is now much better.

i have checked config.php and there is no userelated , so i guess its an older version.

if i download the new version , how do i update everything to the new version?

Submitted by support on Tue, 2006-11-14 10:24

Hi Madison,

The only files that have changed to support related products are:

html/related.php (NEW)
products.php
config.php

If you have made changes to products.php it is probably easiest to compare the versions and add the appropriate code from the new version to your existing site.

Cheers,
David.

Submitted by madison on Tue, 2006-11-14 10:44

is it possible u could email me those files

pretty please :)

Submitted by support on Tue, 2006-11-14 13:16

On way...