Click or drag to resize
ShoppingCartFactoryCreateCart Method
Creates a new instance of ShoppingCartInfo assigned to the user on given site.

Namespace: CMS.Ecommerce
Assembly: CMS.Ecommerce (in CMS.Ecommerce.dll) Version: 10.0.0
Syntax
C#
public static ShoppingCartInfo CreateCart(
	SiteInfoIdentifier site,
	UserInfo user = null
)

Parameters

site
Type: CMS.DataEngineSiteInfoIdentifier
ID or site codename where the cart is created.
user (Optional)
Type: CMS.MembershipUserInfo
User for who the cart is created.

Return Value

Type: ShoppingCartInfo
New instance of ShoppingCartInfo.
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown when site is null.
Remarks
Created ShoppingCartInfo has ShoppingCartSiteID initialized to value specified by site.
See Also