Skip to the main content

Webal Phoca SVG Scheme shows a picture of a place, such as a shop floor plan, a shelf, a building or a map. A shape sits over each of your Phoca Cart categories. When a visitor chooses a shape, a close-up picture of that category opens. It has a shape over each product, and each product shape goes to the product page.

It replaces the SVG Scheme module of Phoca Cart. A list of links below every picture does the same job as the picture. It works with scripts switched off.

This module is part of Webal Phoca Blocks, which needs Phoca Cart 6 or later.

Tip. A shape is a list of corner points. Each point is two numbers: how far across the picture, then how far down, counted in the pixels of that picture. For example 120,40 300,40 300,200 120,200 is a rectangle with four corners.

What you prepare first

Phoca Cart keeps the shapes, so you fill them in there before you use the module.

  1. Choose a main picture. Put it in the images folder of your site. A JPG, PNG, WebP or GIF is best.
  2. Draw a shape over each category on that picture. You can draw in a vector editor and copy the points of the polygon, or read the pixel positions in a picture editor. Do not resize the picture afterwards, because the numbers belong to its size.
  3. In Phoca Cart, open each category. In Special parameter, paste its shape. In Special image, choose the close-up picture of that category, such as a drawing of one shelf.
  4. Draw a shape over each product on its category's close-up picture. Open each product in Phoca Cart and paste the shape in its Special parameter.

A category without a Special image has no close-up. Its shape goes straight to the category page. A product without a shape is still in the list of links, but has no shape on the picture.

Text that is not numbers, such as HTML or a script, is never used. The module leaves that shape out. If you are signed in as an administrator, a message at the top of the page names the items it left out.

Add it to a page

These steps follow the order of the screens in Joomla. Nothing is saved until you press Save.

  1. Log in to the Joomla administrator. In the menu on the left, choose Content, then Site Modules.
  2. Press New. A list of module types opens.
  3. Choose Webal Phoca SVG Scheme from the list.
  4. Type a Title for the module.
  5. On the Module tab, under Picture, choose the Main picture.
  6. In Categories on the picture, type the numbers of the categories that have a shape, with commas between them. To find a number, open Phoca Cart in another tab: Components, Phoca Cart, then Categories. The number is in the ID column.
  7. Choose a Position in the right-hand column. A position is a named place in your template where a module can go.
  8. Press Save. The message "Module saved." appears. If a number is not a Phoca Cart category, the save is refused and the message names the number.
  9. Open the Menu Assignment tab and choose the pages. Then press Save & Close.
  10. Open the page and look at the module. Point at a shape, or press the Tab key to reach it. A caption opens. Choose a shape to open its close-up.

Accessibility. Give each Webal Phoca SVG Scheme on a page a different title. The title names the module for screen readers. Describe the main picture in Describe the picture if it carries meaning that the list of categories does not.

How a visitor uses it

  • With a mouse or finger. Choose a shape on the main picture. The close-up of that category opens below it. Choose a product shape to go to the product.
  • With the keyboard. Each shape can be reached with the Tab key and chosen with Enter. The caption opens when the shape has focus. Press Escape to close it. This needs the small script of the module. With scripts switched off no caption opens, and the list of links under the picture holds every word the caption would have had.
  • With the list of links. Under each picture is a list of the same categories or products, with the same words. It has large rows that are easy to touch.
  • Back. Each close-up has a Back to the main picture link and a link to the category in the shop. The Back button of the browser also closes a close-up.

The caption is never the only place a word appears. No price is shown here. The product page of Phoca Cart shows prices.

Options

Picture tab

Options on the Picture tab
OptionWhat it doesDefault
TitleAn optional heading above the picture. If you type one, set Show Title to Hide.No title
Main pictureThe picture the category shapes lie on. It must be in the images folder. An SVG picture is drawn only after the Webal SVG check passes it, and must be smaller than 384 KB.None
Describe the pictureA short description for people who cannot see the picture. Leave it empty if the list of categories says everything.Empty
Categories on the pictureThe numbers of the categories that have a shape, with commas between them. At most 24. A category that is not published, or not open to the visitor, is left out. The module shows nothing until you list one.Empty
Show the shapesAlways as a thin outline, or only when pointed at or focused. The outline helps people on phones, who cannot point.Always
The list of linksOpen below the picture, or folded behind a button. It is on the page either way.Open

Words tab

Options on the Words tab
OptionWhat it doesDefault
Words before the product countWords put before the number of products in a category caption. With "Contains" the caption reads "Contains 12 products".Empty
Show the product text in the captionAdds the start of the product description to the caption and to the product's line in the list. The text is plain.On
Product parameters in the captionThe aliases of the Phoca Cart product parameters whose values you want in the caption, with commas between them. Each one adds a short word after the product name. Phoca Cart is asked once for each product, so use few.Empty
Product parameters as CSS classesThe aliases of parameters whose values become CSS classes of the product shape. A value with the alias sold gives the class wblp-svg-v-sold, so you can colour sold products in your template.Empty

Where tab

Options on the Where tab
OptionWhat it doesDefault
Show only on these componentsComponent names with commas between them, for example com_phocacart. Empty shows the module on every page it is assigned to.Empty
Show only on these viewsView names, for example category, items. Needs a component.Empty
Show only for these numbersCategory or product numbers from the address. Needs a component and a view.Empty
Only items in the page languageFor a site with more than one language. Shows the categories and products made for the language of the page and for all languages.Off

The Layout and Animation tabs hold the shared Webal groups. They are explained on the page for common options.

What is different from Phoca Cart's module

  • The close-up is part of the page. Phoca Cart fetches it with a script and shows it in a pop-up. Here it needs no script, and the Back button closes it.
  • The caption does not follow the pointer. It sits at the foot of the picture, and it opens for the keyboard too.
  • The shapes are shown as a thin outline by default. Choose "Only when pointed at or focused" for Phoca Cart's look.
  • The classes made from parameter values start with wblp-svg-v-. If you styled the plain alias before, add the prefix.
  • A category or product the visitor may not see has no shape and no link. Phoca Cart's module did not check that.
  • An SVG main picture works. In Phoca Cart's module it caused an error.

Limits

  • At most 24 categories, 48 products in one close-up, and 150 product shapes in the whole module.
  • The module does not show prices, stock or buttons.
  • The caption does not move with the pointer.
  • With scripts switched on, moving the pointer from one shape across another shape swaps the caption at once. On a crowded picture you cannot always rest the pointer on a caption, so pointing at a crowded picture does not fully meet WCAG 1.4.13 (content on hover or focus). The list of links and the keyboard are the complete way in.
  • A link to a place on the same page, such as the Back to top button, closes a close-up that is open. The Back button of the browser opens it again.
  • A parameter value that is switched off in Phoca Cart still shows in the caption and the list. Phoca Cart's own module does the same.
  • Keep Joomla's own .htaccess file in the images folder. It tells the server that an SVG file may not run script, which matters if someone opens the picture's address directly.

Other ways to reach us

Ask the community