You are here

interface CommerceCartProviderInterface in Commerce Core 7

@file Interface for cart providers.

Hierarchy

Expanded class hierarchy of CommerceCartProviderInterface

All classes that implement CommerceCartProviderInterface

File

modules/cart/plugins/cart_provider/interface.inc, line 7
Interface for cart providers.

View source
interface CommerceCartProviderInterface {

  /**
   * Deletes either all order IDs or a specific order ID from a carts array.
   *
   * @param $order_id
   *   The order ID to remove from the array or NULL to delete the variable.
   * @param $completed
   *   Boolean indicating whether or not the operation should delete from the
   *   completed orders array instead of the active cart orders array.
   */
  public function cartDelete($order_id = NULL, $completed = FALSE);

  /**
   * Checks to see if any cart order ID or a specific cart order ID exists.
   *
   * @param $order_id
   *   Optionally specify an order ID to look for; defaults to NULL.
   * @param $completed
   *   Boolean indicating whether or not the operation should look in the
   *   completed orders array instead of the active cart orders array.
   *
   * @return
   *   Boolean indicating whether or not a cart order ID exists for the given
   *   parameters.
   */
  public function cartExists($order_id = NULL, $completed = FALSE);

  /**
   * Returns an array of cart order IDs stored.
   *
   * @param $completed
   *   Boolean indicating whether or not the operation should retrieve the
   *   completed orders array instead of the active cart orders array.
   *
   * @return
   *   An array of applicable cart order IDs or an empty array if none exist.
   */
  public function cartOrderIds($completed = FALSE);

  /**
   * Saves an order ID.
   *
   * @param $order_id
   *   The order ID to save to the array.
   * @param $completed
   *   Boolean indicating whether or not the operation should save to the
   *   completed orders array instead of the active cart orders array.
   */
  public function cartSave($order_id, $completed = FALSE);

}

Members

Namesort descending Modifiers Type Description Overrides
CommerceCartProviderInterface::cartDelete public function Deletes either all order IDs or a specific order ID from a carts array. 1
CommerceCartProviderInterface::cartExists public function Checks to see if any cart order ID or a specific cart order ID exists. 1
CommerceCartProviderInterface::cartOrderIds public function Returns an array of cart order IDs stored. 1
CommerceCartProviderInterface::cartSave public function Saves an order ID. 1