Changes all references to the "shopping cart" to refer instead to the "shopping basket" in Drupal Commerce. A common requirement for UK-based websites.

Americans tend to use "shopping cart" or "cart" for online shops.

In the UK we call the things with wheels "shopping trolleys", so "cart" doesn't make so much sense to a British person. So UK online shops tend to prefer "basket" (and, more rarely, "trolley" or "bag").

Usage

Install the module, note how "cart" has been changed to "basket".

Drupal 7

Methods used:

  • Adds string overrides for most strings. Plays nicely with String Overrides module.
  • Implements hook_menu_alter() to copy menu item for 'cart' to also work as 'basket'.
  • Implements hook_url_outbound_alter() to change all links pointing to 'cart' to point to 'basket'.

Drupal 8

Methods used:

  • Adds a Translation class for most strings. Will translate if another Translation hasn't already done so.
  • Adds a new route for /basket that duplicates the /cart route, so both URLs work.
  • Adds an OutboundPathProcessor to change outgoing link paths from /cart to /basket.
Supporting organizations: 
Created this module

Project information

Releases