PDA

View Full Version : Open Extended Info Page at Search Results


hubba
24-Jul-2003, 01:34 PM
How do I change the product link in the Search Results Page to open up the Product Extended Info page instead of the standard list of products in the sections page?

NormanRouxel
24-Jul-2003, 07:48 PM
There's no easy way to do this AFAIK as the search scripts are unaware as to whether a product has a popup page or not.

You could patch SearchScript.pl so that it checks for a file called "info_<productreference>.html" and replaces the usual link with one to that filename if it exists. You'll need to know some Perl.

Even if you do this the extended info pages return to the calling page so you'd probably end up back in the search script rather than in the product page. You'll have to try it to see.

Norman

hubba
25-Jul-2003, 02:12 AM
Thanks for the info.

Ok .. I'll try that. I have no knowledge of perl but I guess I'll just tinkle around a bit and see what happens. :)

Btw, great job on the free add-on scripts on your website, Norman. They're life-savers.

andrewace
27-Jan-2004, 03:28 PM
I'd like to do the same thing - all my products have an extended Info page so I don't need to check if one exists, just link to it.

Trouble is, I don't know how to get the Product Reference from within the search results...

I have tried this:

<A HREF="javascript:ShowPopUp('../info_<Actinic:S_REF/>.html',550,400)">

But S_REF doen't exist. Would you know how to get the ref by any chance?

Cheers,
Andrew

andrewace
27-Jan-2004, 04:25 PM
Have answered my own question (with a little help from some similar code on norman's site). Posting solution in case anyone else is interested and so it won't waste anyone's time:

Open SearchScript.pl. Find the section with the following heading:

#
# Build the replacement tags
#

Insert the following 2 lines of code:

----
my $TheProdRef = $$rarrResults[$nCount];
$ACTINIC::B2B->SetXML('S_REF', $TheProdRef );
----

Then you can access the extended info page using

javascript:ShowPopUp('../acatalog/info_<Actinic:S_REF/>.html',550,400)