Notice: Undefined variable: s_offline in /homepages/6/d168803796/htdocs/officetrio.com/o3/o3start.php on line 314
OfficeTrio: Search - User Manual OfficeTrio: The Integrated ECommerce Solution OfficeTrio: The Integrated ECommerce Solution OfficeTrio: Features OfficeTrio: User Manual OfficeTrio: Testimonials OfficeTrio: The Demo is Offline! OfficeTrio: Order O3 Now
EWS is no longer available


Notice: Undefined variable: us_name in /homepages/6/d168803796/htdocs/officetrio.com/right-menu.php on line 35

Notice: Undefined variable: us_email in /homepages/6/d168803796/htdocs/officetrio.com/right-menu.php on line 35
U:
P:

Login Page

Introduction
Payments
Users
Login
Access
Categories
Products
Downloads
Deliveries
Containers
Catalog
Cart
Search
Orders
Emails
IPN
Stats

Modules
Affiliates
Content
Types
List Items
Image Upload
Scheduler
File Browser
Stock Control

Appendices
Settings
Functions
Actions
Caching



Forums
Members Area
Customers Area
Affiliates

Contribute
Installation
Contact Details
Terms
FAQ
Testimonials

Free Tutorials
Free EBooks
Free Scripts

PayPal - Accept Credit Cards Online

StormPay - Accept Credit Cards Online

PHP: Open-Source Server-Side Scripting Language

MySQL: Fast Relational Database



O3 comes with a full 30-day, no-quibble money back guarantee.



To accomplish great things, we must not only act, but also dream; not only plan, but also believe.
    Anatole




Search

Search Form | Product Search | Site Search

O3 allows you to put separate product and site search results tables anywhere in your web pages with a few simple lines of code...

You can see the search in action on the test page.

Search Form

You can put the search form anywhere on your web pages with this code:

<?
$search_page='';
$noord='';
include 'search-form.php';
?>

You can get the form to submit the data to a different page by setting the variable 'search_page' (above the include statement). If it's blank it'll submit the search data to the current page. This can also be set globally in the settings, in which case you don't need to specify it here.

To hide the 'Order By' field, set the value of 'noord' to 'Y'. The product search orders by price by default.


Product Search

The search data from the search form is picked up by this script which searches the database for matching products and displays them in a table. It searches the product name, description and category for any partial word match.

The results table contains these rows: Image, Name, Description, Price (inc. handling) (& Shipping), Web page (a link to).

The background color of the result rows alternates to make each line stand out better. You can set these two colours in the Settings.

Also in the settings, you can set the maximum number of products a search should return - 'searchlimit'.

To include the search results in your web page use this code:

<?
include 'product-search.php';
?>

Site Search

The search data from the search form can also be picked up by this script which searches your entire website by recursively scanning all the directories, and looking in all the defined file types for matching text.

The search is case insensitive. It filters out all the HTML tags from web pages before searching for the search text. It searches the product name, description and category for any partial word match.

The results table contains these rows:

  • Image
  • Product Name
  • Description
  • Price (inc handling) (& Shipping)
  • Web page (a link to).

The background color of the result rows alternates to make each line stand out better. You can set these two colours in the Settings.

Also in the settings, you can set 'searchlength' - which is how much text from each file the search should show.

To include the search results in your web page use this code:

<?
include 'site-search.php';
?>

You can include and exclude files and directories in a few different ways. To exclude a file, either put the exclude text ('!SSIGNORE' by default) in it, or list it in the exclude_files array (these settings are defined in the script itself: site-search.php)

Here's the code from the top of site-search.php defining this stuff. It's pretty self-explanatory. You can add any number of elements to the array, just put a comma between them, and ensure they're in quotes as in the example:

//========================
// EXCLUDES & INCLUDES...
//-----------------------------------------------------------------------
// A list of file names / directory names to exclude from the search.
//-----------------------------------------------------------------------
$exclude_files=array('footer.php', 'menu.php');
$exclude_dirs=array('cgi-bin', 'tmp', 'files');

//-------------------------------------------------------------------
// If files contain this string they'll be excluded from the search.
//-------------------------------------------------------------------
$exclude_text='!SSIGNORE';

//-----------------------------------------------------------------------------------
// A list of file types to include from the search. (last 3 letters of the filename)
//-----------------------------------------------------------------------------------
$include_filetypes=array('php', 'tml', 'htm');

OfficeTrio: The Integrated ECommerce Solution
Search FeaturesUser Manual



Powered By OfficeTrio