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

Namespace: CMS.Ecommerce
Assembly: CMS.Ecommerce (in CMS.Ecommerce.dll) Version: 13.0.131
Syntax
C#
ShoppingCartInfo CreateCart(
	SiteInfoIdentifier site,
	UserInfo user
)

Parameters

site
Type: CMS.DataEngineSiteInfoIdentifier
ID or site code name where the cart is created.
user
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. Also ShoppingCartCurrencyID property is initialized to currency which can be used on site.
See Also