Bagatelles score

Experimental project

This is a sandbox project, which contains experimental code for developer use only.

bagatelle |ˌbagəˈtɛl| noun:
"something regarded as too unimportant to be worth much consideration"

This module contains a mixed bag of bagatelles for the Commerce suite.
Little trifles and trinkets to address common niggly bits, like:

  • For order reports created through Views, a field to display the Shipping costs of an order as a column, rather than a row (requires Commerce Shipping.
  • Making sure that the tax row in the order summary is always last, just above the order total. With discount and shipping lines present, the tax row can end up in the middle, which is not always the best look.
  • For themers: $variables['cart_items'] and $variables['cart_value'] are automatically available in any theme to display the number of items currently in the cart and their total monetary value
  • Change the names of existing order statuses, for example you can change Pending to Paid, not shipped (requires you to edit the .module file).
    Note: to add new statuses (for existing states), use the module Commerce Custom Order Status. To introduce an additional state+status to mark when payment is received in full, try Commerce Payment Received.
  • Programmatically put products into the visitor's shopping cart with one simple call, providing SKU and quantity.
  • Rules actions to lock a line item or an entire order in the cart. Once added to the cart visitors cannot change the item quantity or remove it. This comes in handy for items that are added programmatically based on special conditions that must not be violated by changes made through the UI. One example is products that must be bought in pairs (you must buy product A to receive product B). Another are products that must be bought in a fixed quantity, like memberships (1) or bottles of wine (by the dozen or half dozen).
  • Map of order locations. Show recent orders on a map with each location marker revealing details of the order in a popup info balloon when the marker is clicked (now fully handled by IP Geolocation Views & Maps).

See also:

Supporting organizations: 
all code and documentation

Project information

  • Module categories: E-commerce
  • Created by RdeBoer on , updated