If you look at your OpenCart page in a browser and view source, you can find the HTML that draws the search form and its search box. Look for something that looks somewhat like this:
<form action="/results.php" method="get">
<input type="text" name="q" />
<input type="submit" value="Search" />
</form>
There will probably be a lot more code around it than that, and I’m not sure at all of the names of the fields, but that’s the bare bones of it. You can attack integrating this into your Freeway pages a couple of different ways once you have found it.
The simplest (but least WYSIWYG) would be to just copy this code, place a Markup Item where you want the form to appear, and paste the code into the Markup Item’s dialog box. You won’t see anything on your design page except an empty box with a little < H > in the corner. But when you publish the page and view on the Web, you will see a (hopefully working) search form. If you do this, you cannot have any other form elements on the same page, unless you also use the Multiple Forms Action to un-nest the forms. (Freeway always wraps the entire page in a form if any form elements are drawn on the page, and form tags cannot be nested inside one another.)
The other way to handle this is to use Freeway’s native form tools to design your form, and the Page / Form Setup dialog to enter the action attribute (/results.php in my example above) to match the code you found in your PHP pages. You’ll have to be sure to set the Method to GET (if that’s what you found in the source) and to name the search field precisely, using the third tab from the left in the Inspector while the search field is selected. The benefit to this is that you will have a WYSIWYG view of the page in Freeway’s design view, but the downside will be that you will need to repeat these steps for each page where you place the search fields, versus copy and paste of the Markup Item.
Walter
On Aug 20, 2012, at 4:44 AM, Jonathan Riddle wrote:
Hi all,
I have a site which is mixed with Freeway designed content and database searchable content set up in OpenCart. I have had a request from the client to now have a search box on every single page of the website, which of course is a big issue as the OpenCart content and the Freeway content are two completely different animals. The client didn’t originally want this facility, otherwise I would have had to set the whole site up in OpenCart.
I know where the search box code snippet is within OpenCart, but I was just wondering if there was a way of using that code as mark-up within the Freeway section, and should somebody carry out a search on those static Freeway pages, somehow point the search to the OpenCart database, and then load the results as part of the normal OpenCart page content.
Thanks in advance.
dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options