eCab

Shortcodes

eCab shortcodes reference for embedding taxi booking forms.

eCab has one main shortcode, [mptbm_booking], that shows the booking form. The pricing model, the form layout and the optional tabs are all set with attributes. A few more shortcodes show your fleet, your stops and your customers’ bookings.

Note: shortcodes such as [ecab_booking], [ecab_hourly_booking] and [ecab_fixed_booking] do not exist in the plugin. They show up as plain text on the page. Use the shortcodes below.

Booking Form

Shows the booking form: pickup date and time, locations, transfer type and a Search button. After a search the customer picks a vehicle and places the order.

[mptbm_booking]
Booking form, distance pricing
[mptbm_booking] with the default distance pricing.

Attributes

Attribute Values What it does
price_based dynamic, manual, fixed_hourly, fixed_daily, fixed_distance, fixed_zone, fixed_zone_dropoff, fixed_route Which pricing form to show. See the table below. An unknown value falls back to dynamic. Default: dynamic
form horizontal, inline, vertical Layout of the form. horizontal spreads the fields in a row. inline and vertical both stack them. Default: horizontal
map yes, no no hides the map before a search. To hide it everywhere, use Show Map on Search Result Page in Settings. Default: yes
progressbar yes, no Shows the 3 step bar (Enter Ride Details, Choose A Vehicle, Place Order). It is hidden when tabs are on. Default: yes
tab yes, no yes shows one form with tabs for several pricing models. Default: no
tabs Comma separated list Which tabs to show, in this order, when tab="yes". See Tabs below. Default: distance,hourly,manual
vehicle_id Vehicle ID Books one vehicle. The form then uses that vehicle’s own pricing model. Default: 0
pickup Text Fills the pickup location field. Default: (empty)
dropoff Text Fills the drop-off location field. Default: (empty)
pickup_zone Location ID Preselects the pickup location in the zone forms. Default: (empty)
dropoff_zone Location ID Preselects the drop-off location in the zone forms. Default: (empty)
route Route name Preselects a named route in the fixed route form and plots its stops. Default: (empty)
stops Comma separated names Shows stop names between pickup and drop-off as text only. They do not change the distance or the price. Default: (empty)

Pricing forms

Use the value that matches the Price Based option of your vehicles (set on each vehicle under Price Settings).

price_based Form for Vehicle price option
dynamic Distance and time from the map. Customers type pickup and drop-off addresses. Distance as google map / Duration / Distance + Duration
manual Customers choose from your saved locations. Manual as fixed Location
fixed_hourly Customers choose a number of hours. Fixed Hourly
fixed_daily Customers choose a number of days. Fixed Daily
fixed_distance Fixed price for a trip drawn on the map. Fixed with Map
fixed_zone Zone pricing where the fixed point (for example an airport) is the pickup. Fixed Zone
fixed_zone_dropoff Zone pricing where the fixed point is the drop-off. Use it with fixed_zone to price each direction. Fixed Zone
fixed_route Customers choose a predefined named route. Fixed Route

If Pricing system based on map is set to Without map api in Map API Settings, the form always uses fixed locations (manual) unless you set a vehicle_id.

Examples

Shortcode Result
[mptbm_booking] Distance based form.
[mptbm_booking price_based="fixed_hourly"] Hourly form.
[mptbm_booking price_based="manual" form="inline"] Fixed location form with stacked fields.
[mptbm_booking price_based="fixed_daily"] Per day form.
[mptbm_booking form="vertical" map="no"] Stacked form without the map before search.
[mptbm_booking vehicle_id="46"] Booking form for vehicle 46 only (use your own vehicle ID).
[mptbm_booking pickup="Gulshan 1" dropoff="Banani"] Form with the locations already typed in.
Fixed hourly booking form
[mptbm_booking price_based=”fixed_hourly”]: the hours selector replaces the transfer type.
Fixed location booking form
[mptbm_booking price_based=”manual” form=”inline”]: customers pick saved locations.

Tabs

Show several pricing models in one form:

[mptbm_booking tab="yes" tabs="hourly,distance,manual"]
Booking form with tabs
Tabs in the order given in the tabs attribute. The tab labels are Hourly, Distance and Flat rate.
tabs value Tab Needs
distance Distance Free
hourly Hourly Free
manual Flat rate (fixed locations) Free
daily Daily Free
fixed_route Fixed route Free
fixed_map, fixed_zone_pickup, fixed_zone_dropoff Fixed with map, zone pickup, zone drop-off eCab Pro

Two Forms On One Page

Shows two independent booking forms, one above the other. By default a flat rate (fixed location) form is on top and a distance form below.

[mptbm_dual_booking]
Two booking forms on one page
[mptbm_dual_booking]: flat rate search on top, distance search below.
Attribute Values
top_price_based dynamic, manual, fixed_hourly, fixed_daily, fixed_distance, fixed_zone, fixed_zone_dropoff, fixed_map
Default: manual
bottom_price_based same values
Default: dynamic
top_form / bottom_form horizontal, inline, vertical
Default: inline / horizontal
top_map / bottom_map yes, no
Default: no / yes
top_label / bottom_label Text above each form
Default: Flat Rate Search / Distance Based Search
show_labels yes, no
Default: yes

Only one live map works on a page. If both forms use a pricing model with a map (for example both dynamic), only the first form’s map loads.

Fleet List

Shows all your vehicles as a grid or list, without the booking form. Good for an “Our Fleet” page.

[mptbm_taxi_list title="Our Fleet" column="3" show="6"]
Fleet list
[mptbm_taxi_list] showing the vehicles with price, passengers and bags.
Attribute Values What it does
title Text Heading above the list. Default: (empty)
view grid, list View shown first. Visitors can switch. Default: grid
column 1 to 6 Columns in grid view. Default: 3
show Number Vehicles shown at first and per Load More click. Default: 20

Stops List

Shows your saved stops (Stoppages) as cards. Each card opens a detail view of that stop. If you have not added any stop yet, it shows “No stoppages have been added yet.”

[mptbm_stoppages_list columns="3" per_page="8"]
Attribute Values
title Text
Default: (empty)
columns 2, 3, 4
Default: 3
view grid, list
Default: grid
per_page 1 to 24
Default: 8
load_more yes, no
Default: yes

Customer Pages

These shortcodes are for the pages customers see after booking. Most are created or used automatically, so you only add them if you build your own pages.

Shortcode What it shows Needs
[mptbm_booking_confirmation] The booking confirmation after a Custom Payment booking. It needs the booking in the page address, so it only works as the confirmation page. Choose the page under Payments → Booking Confirmation Page. Custom Payment mode
[mptbm_customer_portal] “My Bookings”: the customer’s bookings, booking details and PDF invoice. Logged in customers see their bookings. Guests can look one up with email and booking reference. eCab Pro
[mptbm_user_dashboard] The logged in customer’s bookings. Logged out visitors see “You must be logged in to view your bookings.” eCab Pro
[mptbm_gps_driver] The driver’s live tracking page. Only assigned drivers can open it. GPS Tracking add-on
[mptbm_gps_tracking] The customer’s live tracking map. It needs a valid tracking link (booking_id and token in the address), otherwise it shows “This tracking link is invalid or expired.” GPS Tracking add-on

Embedding & Placement Tips

Page Placement

  • Add the shortcode to any page or post.
  • In the block editor, add a Shortcode block and paste the shortcode. There is also an eCab booking block (mptbm/booking) with the same options.
  • In Elementor, use the Shortcode widget.
  • To show search results on a different page, set Show Search Result In A Different Page in Settings → Transportation Settings.

Troubleshooting

  • If the shortcode shows as plain text, check the spelling. The names start with mptbm_.
  • If the form says no transport is available, check that your vehicles are published and use the same Price Based option as the shortcode.
  • If the map does not load, check Map API Settings. OpenStreetMap needs no key. Google map needs a key.
  • If booking works only when you are logged in, clear the page cache. A cached page can carry an old security token.