I was going to post this in the KB thread, but thought I would wait until someone else has tested this and maybe refined it...
This HACK allows you to use any variables and layout in your results page. Its not perfect, but until something comes out better, it'll do... and if like me you are only just entering product details its pretty easy! You must not be using your extended info page for anything else and there is a small change in one of the scripts. Note: If the product doesnt have a extended info page or the script can't find the page - it will skip and move on.
I apologise if I make a mistake - it was complicated to do the first time and I may well have forgotton a step. Ask questions and it will prompt me <s>.
You may test this on my site www.madmash.com and use the search on the left. CUFFLINKS and BLOCK produce results.
If you can make this better, let us all know.
Paul.
---
If you are happy to carry on, MAKE A FULL BACKUP and then do this:
1. SCRIPT: Open up SearchScript.pl in the actinic folded and find
and add underneith:
This will not affect any other searches or uses of this file as it looks for a specific field which we will use later.
2. Open up a product and select the product extended info page. You need to name the page ex_???.php whereby the ??? is the product reference (you might want to turn on the ref bit so it is next to the product name). Then add any html you want to the extended info design (this is INLINE html and not a page, so no body or html tags etc). You can use any code or variables you use anywhere else. (you can see the file format above if you want to change it). (Is there a way to pass the extendedinfo page name into the results page?)
3.You shouldnt have extended info links on your pages (if you do, then you either should remove them or stop doing this hack). Because we are not linking to the extended info page, they don't get uploaded so we need to trigger actinic to make them and upload them. I found that doing this works, but there may be a better way and not even sure if this is needed. Somewhere on your products main page, add
Then open that up and add this:
4. Turn off index duplicates and extended info pages in the search options.
5. Open the Search Results page. Move the "SearchResultsList" anywhere outside the form should be outside the form. Then within "SearchResultsList" it should be empty bar "SearchResult". Inside "SearchResult" should be this:
This is what is replaced with the html from the extended info page (and is what supplies the script with the product reference).
Done. Upload and test.
<b>Known Problems:</b>
When you link to the results page, the page skips to the input box in the search so you either have to fix this somehow or move the input box. This isnt a problem for me as I don't use it.
You need to remove the <ACTINIC:SECTION > blob from the add to cart code. Not sure what that does, but it still works for me (maybe it wont work in logged in mode?).
p.s. i used some bits from other people to get this working so thanks to all of those (forget who they are).
This HACK allows you to use any variables and layout in your results page. Its not perfect, but until something comes out better, it'll do... and if like me you are only just entering product details its pretty easy! You must not be using your extended info page for anything else and there is a small change in one of the scripts. Note: If the product doesnt have a extended info page or the script can't find the page - it will skip and move on.
I apologise if I make a mistake - it was complicated to do the first time and I may well have forgotton a step. Ask questions and it will prompt me <s>.
You may test this on my site www.madmash.com and use the search on the left. CUFFLINKS and BLOCK produce results.
If you can make this better, let us all know.
Paul.
---
If you are happy to carry on, MAKE A FULL BACKUP and then do this:
1. SCRIPT: Open up SearchScript.pl in the actinic folded and find
Code:
$ACTINIC::B2B->SetXML('S_ITEM', ($nCount + 1));
Code:
my $sExtendedFilename; my $sExtendedHTML; $sExtendedFilename = "../acatalog/ex_"; $sExtendedFilename .= $$rarrResults[$nCount]; $sExtendedFilename .= ".php"; if (-e $sExtendedFilename) { open(FH, $sExtendedFilename); $sExtendedHTML = do { local $/; <FH> }; close(FH); $ACTINIC::B2B->SetXML('S_PRODREF', $sExtendedHTML); }
2. Open up a product and select the product extended info page. You need to name the page ex_???.php whereby the ??? is the product reference (you might want to turn on the ref bit so it is next to the product name). Then add any html you want to the extended info design (this is INLINE html and not a page, so no body or html tags etc). You can use any code or variables you use anywhere else. (you can see the file format above if you want to change it). (Is there a way to pass the extendedinfo page name into the results page?)
3.You shouldnt have extended info links on your pages (if you do, then you either should remove them or stop doing this hack). Because we are not linking to the extended info page, they don't get uploaded so we need to trigger actinic to make them and upload them. I found that doing this works, but there may be a better way and not even sure if this is needed. Somewhere on your products main page, add
Code:
<actinic:variable name="ExtendedInformationLinks" />
Code:
<actinic:block if="%3cactinic%3avariable%20name%3d%22IsPopUpPageGenerated%22%20%2f%3e"> <actinic:variable name="ExtendedInfoPageDesign"/> </actinic:block>
5. Open the Search Results page. Move the "SearchResultsList" anywhere outside the form should be outside the form. Then within "SearchResultsList" it should be empty bar "SearchResult". Inside "SearchResult" should be this:
Code:
<Actinic:S_PRODREF/>
Done. Upload and test.
<b>Known Problems:</b>
When you link to the results page, the page skips to the input box in the search so you either have to fix this somehow or move the input box. This isnt a problem for me as I don't use it.
You need to remove the <ACTINIC:SECTION > blob from the add to cart code. Not sure what that does, but it still works for me (maybe it wont work in logged in mode?).
p.s. i used some bits from other people to get this working so thanks to all of those (forget who they are).
Comment