Webal Phoca Search is a search box for your Phoca Cart shop. A visitor types some words and presses Search. They arrive on your shop's own list of products, and Phoca Cart finds the products. The results are the same ones Phoca Cart's own search box gives.
Use it in the header or above the products. It is an ordinary form, so it works with scripts switched off.
This module is part of Webal Phoca Blocks, which needs Phoca Cart 6 or later.
Tip. The module only sends the words to Phoca Cart. It does not search, sort or price anything itself. To change how Phoca Cart matches words, change the search settings in Phoca Cart's options.
What it needs
Your shop needs a menu item for its list of products. Without one, the module shows nothing to visitors. If you are signed in as an administrator, a short message at the top of the page tells you why.
What the visitor sees
- A box and a Search button. The word Search above the box can be shown or hidden from the eye. A screen reader always reads it.
- After a search, the words are put back in the box on the list of products, so the visitor can change them.
- A Clear search link, next to the box, goes back to the same page without the words.
- An empty search shows the whole list.
Phoca Cart's own search box can also show the filters in use as small tags. This module does not do that yet.
Where the search looks
- In all products. The visitor goes to the list of products and the whole shop is searched, whatever filters they were using.
- Within what the visitor has already filtered. On Phoca Cart's list of products, or on a category page, the category and the filters in the address are kept. A search inside a category finds only the products in that category. On any other page, the whole shop is searched.
Phoca Cart's own module lets the visitor choose between the two with two round buttons. Here you make the choice once, when you set up the module.
Add it to a page
These steps follow the order of the screens in Joomla. Nothing is saved until you press Save.
- Log in to the Joomla administrator. In the menu on the left, choose Content, then Site Modules.
- Press New. A list of module types opens.
- Choose Webal Phoca Search from the list.
- Type a Title for the module.
- On the Module tab, under Search, choose Where the search looks.
- Choose whether the button shows, and type the words for the empty box if you want your own.
- Choose a Position in the right-hand column. A position is a named place in your template where a module can go. A header position that shows on every page works well.
- Press Save. The message "Module saved." appears.
- Open the Menu Assignment tab. To show the box on every page, choose On all pages.
- Press Save & Close.
- Open a page of your site. Type a word that one of your products has in its name. Press Search. The list of products shows only the matches.
Accessibility. If you put more than one Webal Phoca Search on a page, give each a different title, so a screen reader can tell them apart. If you type a Title, set Show Title to Hide, so the page does not get two headings.
Options
Module tab
| Option | What it does | Default |
|---|---|---|
| Title | An optional heading above the box. If you type one, set Show Title to Hide. | No title |
| Where the search looks | In all products, or within what the visitor has already filtered. | In all products |
| Show the word Search above the box | Shows the word above the box. Off hides it from the eye only. A screen reader still reads it. | Off |
| Words in the empty box | The hint inside the empty box. Leave it empty to use the standard words in the language of the page. | Empty |
| The search button | Shown, or hidden. A hidden button still works with the Enter key, and it comes into view for a keyboard user who tabs to it. The Clear link is not shown when the button is hidden. | Shown |
| Show a magnifying glass on the button | A small picture before the word Search. The word is always there. | On |
Look tab
| Option | What it does | Default |
|---|---|---|
| Button colour | The primary colour or grey. | Primary colour |
| Button and box size | Small, normal or large. Every size is at least 44 pixels high. | Normal |
The Layout tab and the Animation tab hold the same shared groups as other Webal modules. See the General, Spacing, Width, Colour scheme and Animation groups.
Speed and stored pages
The box holds nothing that belongs to one visitor, so a page with the box on it can be stored by Joomla's System - Page Cache plugin, and each search address is stored as its own page. If you use a cache outside Joomla, such as one your web host runs, make sure it treats an address with ?search= as a separate page.
For keyboards and screen readers
- The form is a search landmark with a name, so a screen reader user can jump to it.
- The box has a label, shown or hidden from the eye, never missing.
- Tab moves to the box, then the button. Enter in the box searches.
- Every control is at least 44 pixels high, and the focus ring is 3 pixels wide.
- Nothing happens until the visitor presses Enter or the button.
Tip. If the box does not appear, check that Phoca Cart has a menu item for its list of products. If you are signed in as an administrator, the message at the top of the page names the module that found none.