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 3259 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
Version 8.18.x (untested)

You must login before you can report on package compatibility.

Previously reported to work on versions:

Package Information

  • Package owner: Darren Ferguson
  • Created: 07/05/2011
  • Current version 1.0.1
  • License MIT
  • Downloads on Our: 2K