HomeGuides
Submit Documentation FeedbackJoin Developer CommunityLog In

ISiteContext

This topic describes ISiteContext.

Returns true if the specified role is assigned to the current user.

Returns

  • roleName - The name of role. This can be a standard or custome role (not provided by B2B Commerce Cloud).

Parameters

bool IsUserInRole(string roleName)

Indicates whether or not the specified role is assigned to the current user.

IsUserInRole(string)

Methods

WebsiteDto WebsiteDto { get; }

Gets the current website being browsed by the user.

WebsiteDto

WarehouseDto WarehouseDto { get; }

Gets the default warehouse for the current ship-to or bill-to customer. If a default warehouse can not be found, the default warehouse for the application is returned.

WarehouseDto

UserProfile UserProfile { get; }

Gets the current user.

UserProfile

Customer ShipTo { get; }

Gets the current ship-to customer.

ShipTo

UserProfile RememberedUserProfile { get; }

Gets the remembered user profile. This will only return an object if the current user chose to have his or her account remembered when he or she logged into the Storefront.

RememberedUserProfile

WarehouseDto PickUpWarehouseDto { get; }

Gets the current PickUp warehouse. Used only when FulfillmentMethod is PickUp.

PickUpWarehouseDto

PersonaDto PersonaDto { get; }

Gets the current persona applied to the current user. This will only return an object if the current user has a persona applied.

PersonaDto

string Microsite { get; }

Gets the microsite identifier for the current microsite. This only applies if the current user is browsing a microsite.

Microsite

LanguageDto LanguageDto { get; }

Gets the current language.

LanguageDto

string FulfillmentMethod { get; }

Gets the current fulfillment method. This can be Ship or PickUp. If the Enable Warehouse Pickup setting is No, it will always be Ship.

FulfillmentMethod

DeviceType DeviceType { get; }

Gets the current device type. This can be one of Desktop, Tablet, or Phone.

DeviceType

CurrencyDto CurrencyDto { get; }

Gets the current currency.

CurrencyDto

Customer BillTo { get; }

Gets the current bill-to customer.

BillTo

Properties

The context for the current Storefront session. The context includes objects like the current bill-to and ship-to customers, language, currency, website, and user. To obtain the current site context, you should use SiteContext.Current. This object is created new for each HTTP request.


Did this page help you?