Screen Shot 2016-05-19 at 13.33.57A new feature in version 2.3 of the Cab Grid Pro taxi price calculator plugin for WordPress is Groups. This feature allows you to assign each area (destination or origin location) to one or more custom groups. Different versions (or instances) of the Cab Grid Pro price calculator can then be loaded in different places on a website.

For example, you could assign all local airports to a group named ‘airports‘ and display a calculator just for airport transfers. Then you could assign local schools to a group named ‘schools‘ and have an additional taxi fare calculator just for school runs.

Assigning Places to Groups

In the Cab Grid Pro admin interface there is a column titled ‘Groups’. Group names should be entered here.

Areas can be assigned to many groups at once. Each group name assigned to an area should be separated with a comma (eg: airport,schools). Do not use a space after the comma either.

Group names should be unique and avoid ambiguous or repeating characters. For example a group named simply “1” could conflict with a group named “11” or “group1” due to the way groups are currently working.

Cab Grid Pro Shortcode Group Attribute

To display the Cab Grid Pro calculator with one or more group the ‘id‘ attribute must be added to the shortcode. Considering our example above, that would equate to:

[cabGridPro id="airports"]

Combine taxi destination groups

It is also possible to combine groups in a single instance of the Cab Grid Pro calculator. For example, to include places assigned to a group called “schools”, the following shortcode could be used:

[cabGridPro id="airports,schools"]

Group Styling

Any groups created are also assigned to the CSS class attribute of the Cab Grid Pro instance. This allows targeting of that particular group instance. Each group name is prefixed with ‘cabGridProGroup-‘.

So, for example, the airports group (or instance) can be styled individually using the class ‘.cabGridProGroupairports

.cabGridProGroup-airports {background-color:green;}

Grouping within Drop-down menus

As of version 3.6 there is an option in the OPTIONS tab labelled ‘Group Areas’. This will cause the Cab Grid Pro pick up and drop off drop down menus to group areas by the group names defined in the AREAS tab alphabetically.

Tags: , , , , , , ,

Pin It on Pinterest

Share This

Share this post with your friends!