PDA

View Full Version : Integrating search into a cms based site


morsborn
18-10-08, 12:21
Hi

I'd like to use the shopwindow search code in my site. So far I have integrated the shop and all works well. I am running a cms so the shop is inside a wrapper (iframe) to make it work correctly (I installed to a directory outside of the root to ensure the index.php of the cms didn't break). I figured out how to add the search box in my php code that appears fine but the problem is how do I direct the search results to the right place and not break out of the site layout? I found another thread that was pretty complicated and the conclusion was rather than integrate the shopwindow code into an existing site it is easier to build around the shopwindow code - if that makes sense?

So... how do I direct the search results to an iframe the doesn't exist on all pages? (it only appears if you click on the shop link in the main menu)

Here's my site www.findatoy.co.uk

The current search is out of the box cms search which is ok but I want the power of the shop window search without having to click on the shop link first.

Thanks very much for any help and advice.

Confuscius
18-10-08, 12:45
Hi

The fact that your links from SW to a Merchant site stay within the iframe means that you are iframing the merchant site. Apart from being against, I believe, every merchants' terms and condition when visitors try to use shopping carts inside an iframe then all kinds of issues can arise.

The approach to try that has been suggested before is that you should treat your SW installation as standalone and adjust the SW template to your CMS template design to match headers/footers/navigation etc. You can then set up a custom search box on your CMS that loads your SW search page and it will appear transparent to the visitor that you have two disparate installations.

HTH

Paul

morsborn
18-10-08, 13:32
Hi, I'm a little confused by the first point about iframes... the links from within the iframe were launching out into the merchant site (e.g. you might search a a toy, find the one you like then when you click on it it loads the merchant site), I had no intention of them loading within the iframe. Is that practice allowed? I have been testing the iframe as couldn't think of another way to integrate the code.

Thanks for the info ref templates, will take a look at doing what you suggest.

M.

Amoochi
18-10-08, 13:46
Why not just have a SW template displaying just the search box in an iframe the way you are the whole page at the moment, but with the iframes scroll bars turned off so that it doesn't look so blatently obvious like an iframe, then the results of the search displaying in a new window?

I don't see how it would be doing anything particularly wrong, providing the actual scripts were installed on the same domain and the resulting merchants pages were displayed via a new page and not within the iframe itself.

Or am I missing the point?

morsborn
18-10-08, 13:55
Thanks for the ideas. will give them a go.

btw, if you look at the site at the moment I've removed the shop as I've blown the test api limit! I'm waiting for it to be upgraded. Out of interest, how are api calls counted? Is the api used each time the shop loads? (sorry if this is a daft question, just curious).

Regards

Confuscius
18-10-08, 14:14
the links from within the iframe were launching out into the merchant site

All I know is that they stayed inside the iframe when I accessed the first product that I hit.

There would be no issues with Merchants if you put the search box in an iframe as amoochi suggested.

Paul

morsborn
21-10-08, 08:51
Confuscius, my apologies, you were right, it wasn't working as intended. Having followed various advice on these threads I have managed to work out a way to put the shop together with my cms and seems to work well.

The products now launch correctly into the merchant site.

thanks for your help