8 votes

Doc Cart

** This package is for Umbraco 4.7+ running on .net 4 only **

Doc cart allows you to create basic shopping cart functionality to your Umbraco site in a few clicks. Products are Umbraco documents with a price and SKU property added.

This is not a replacement for any of the other commerce packages out there - no stock management, checkout and payment gateway integration is included. This is just an API and set of Macros for carts based on Umbraco documents. (I'll be blogging on how to use Contour and Bill4U to implement a checkout process).

The package provides the following Macros (each with a variation for UserControl, XSLT, Razor and AJAX).

  • Cart Count - Display number of items in cart
  • Add to Cart
  • View Cart - With update and delete functionality

The following API methods are provided - accessible via Base, Razor and XSLT extension:

  • string GetNumberFormat()
  • int CartCount()
  • string CartCountMessage(string emptyText, string itemsText)
  • int AddToCart(int id)
  • int AddQuantityToCart(int id, int quantity)
  • string UpdateQuantity(int id, int quantity)
  • string RemoveFromCart(int id)
  • float TotalPrice()
  • string CartAsJson()
  • XPathNodeIterator CartAsXml()
  • Void EmptyCart()

The following options can be given in web.config:

<docCart idDocumentPropertyAlias="id" titleDocumentPropertyAlias="pageName"

    priceDocumentPropertyAlias="price" defaultNumberFormat="$#,##0.00"

    maximumQuantityOfItemsInCart="10" />

 

idDocumentPropertyAlias - is the document type property that is displayed in the Id column when viewing the cart by default this just uses the NodeId.

Revision history:

1.0.1 - Added EmptyCart() method to cart service.

 

 

 

Screenshots

Package owner

Darren Ferguson

Darren Ferguson

Darren has 3254 karma points

Package Compatibility

This package is compatible with the following versions as reported by community members who have downloaded this package:
Untested or doesn't work on Umbraco Cloud
8.1.x (untested)
8.0.x (untested)
7.14.x (untested)
7.13.x (untested)
7.12.x (untested)
7.11.x (untested)
7.10.x (untested)
7.9.x (untested)
7.8.x (untested)
7.7.x (untested)
7.6.x (untested)
7.5.x (untested)
7.4.x (untested)
7.3.x (untested)
7.2.x (untested)
7.1.x (untested)
7.0.x (untested)
6.1.x (untested)
6.0.x (untested)

You must login before you can report on package compatibility.

Package Information

  • Package owner: Darren Ferguson
  • Created: 07/05/2011
  • Current version 1.0.1
  • License MIT
  • Downloads: 1725