Skip to content

Instantly share code, notes, and snippets.

@drsii
Last active December 22, 2015 07:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drsii/6440903 to your computer and use it in GitHub Desktop.
Save drsii/6440903 to your computer and use it in GitHub Desktop.

#Cart v1.0.0-alpha

A framework agnostic shopping cart package featuring multiple cart instances and item variants. Part of the Cartalyst Arsenal & licensed OSI BSD 3. Code well, rock on.

##Package Story

History and future capabilities.

####Incomplete

  • Cart::save('instance') User can save a cart instance.
  • Items can have attributes. (label, value, price, operation)
  • Cart::discount(Discount object) User can set a discount\coupon object.

####Complete

  • 05-Sep-13 - v0.9.1
    • Cart::total() User can return cart total.
    • Cart::weight() User can return the total cart weight.
  • 15-Aug-13 - v0.9.0
    • Cart::add(...) User can add an item to cart.
    • Cart::add(...,...) User can add multiple items to cart.
    • Cart::remove(...) User can remove an item from cart.
    • Cart::remove(...,... User can remove multiple items from cart.
    • Cart::update('id', 'quantity') User can update an items quantity.
    • Cart::update(...) User can update a single item.
    • Cart::update(...,...) User can update multiple items.
    • Cart::item('id') User can return info of item in cart.
    • Cart::items() User can return info of all items in cart.
    • Cart::subtotal() User can return the subtotal of the cart.
    • Cart::tax() User can return the tax total.
    • Cart::quantity() User can return total # of items in cart.
    • Cart::find(...) User can search for items in cart.
    • Cart::find(..., 'instance') User can search for items in other cart instances.
    • Cart::clear() User can empty the cart.
    • Cart::instance() User can create a cart instance.
    • Cart::identify() User can return the current cart instance name.
    • Cart::instances() User can return all cart instances.
    • Cart::destroy('instance') User can remove a cart instance.

Versioning

We version under the Semantic Versioning guidelines as much as possible.

Releases will be numbered with the following format:

<major>.<minor>.<patch>

And constructed with the following guidelines:

  • Breaking backward compatibility bumps the major (and resets the minor and patch)
  • New additions without breaking backward compatibility bumps the minor (and resets the patch)
  • Bug fixes and misc changes bumps the patch

Support

Have a bug? Please create an issue here on GitHub that conforms with necolas's guidelines.

https://github.com/cartalyst/cart/issues

Follow us on Twitter, @cartalyst.

Join us for a chat on IRC.

Server: irc.freenode.net Channel: #cartalyst

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment