Context for storefront events
Functions
The following functions get and set context data.
mse.context.getCategory
Gets the Category
context.
Syntax:
Copied to your clipboardmse.context.getCategory();
mse.context.getCustomUrl
Gets the CustomUrl
context.
Syntax:
Copied to your clipboardmse.context.getCustomUrl();
mse.context.getMagentoExtension
Gets the MagentoExtension
context.
Syntax:
Copied to your clipboardmse.context.getMagentoExtension();
mse.context.getOrder
Gets the Order
context.
Syntax:
Copied to your clipboardmse.context.getOrder();
mse.context.getPage
Gets the Page
context.
Syntax:
Copied to your clipboardmse.context.getPage();
mse.context.getProduct
Gets the Product
context.
Syntax:
Copied to your clipboardmse.context.getProduct();
mse.context.getRecommendations
Gets the Recommendations
context.
Syntax:
Copied to your clipboardmse.context.getRecommendations();
mse.context.getReferrerUrl
Gets the ReferrerUrl
context.
Syntax:
Copied to your clipboardmse.context.getReferrerUrl();
mse.context.getSearchInput
Gets the SearchInput
context.
Syntax:
Copied to your clipboardmse.context.getSearchInput();
mse.context.getSearchResults
Gets the SearchResults
context.
Syntax:
Copied to your clipboardmse.context.getSearchResults();
mse.context.getShopper
Gets the Shopper
context.
Syntax:
Copied to your clipboardmse.context.getShopper();
mse.context.getShoppingCart
Gets the ShoppingCart
context.
Syntax:
Copied to your clipboardmse.context.getShoppingCart();
mse.context.getStorefrontInstance
Gets the StorefrontInstance
context.
Syntax:
Copied to your clipboardmse.context.getStorefrontInstance();
mse.context.getContext
Gets a custom Context
.
Name | Required | Description |
---|---|---|
name | Yes | Context name |
Syntax:
Copied to your clipboardmse.context.getContext(name);
mse.context.setCategory
Sets the Category
context.
Name | Required | Description |
---|---|---|
context | Yes | Category context |
Syntax:
Copied to your clipboardmse.context.setCategory(categoryCtx);
mse.context.setCustomUrl
Sets the CustomUrl
context.
Name | Required | Description |
---|---|---|
context | Yes | CustomUrl context |
Syntax:
Copied to your clipboardmse.context.setCustomUrl(customUrlCtx);
mse.context.setMagentoExtension
Sets the MagentoExtension
context.
Name | Required | Description |
---|---|---|
context | Yes | MagentoExtension context |
Syntax:
Copied to your clipboardmse.context.setMagentoExtension(magentoExtensionCtx);
mse.context.setOrder
Sets the Order
context.
Name | Required | Description |
---|---|---|
context | Yes | Order context |
Syntax:
Copied to your clipboardmse.context.setOrder(orderCtx);
mse.context.setPage
Sets the Page
context.
Name | Required | Description |
---|---|---|
context | Yes | Page context |
Syntax:
Copied to your clipboardmse.context.setPage(pageCtx);
mse.context.setProduct
Sets the Product
context.
Name | Required | Description |
---|---|---|
context | Yes | Product context |
Syntax:
Copied to your clipboardmse.context.setProduct(productCtx);
mse.context.setRecommendations
Sets the Recommendations
context.
Name | Required | Description |
---|---|---|
context | Yes | Recommendations context |
Syntax:
Copied to your clipboardmse.context.setRecommendations(recommendationsCtx);
mse.context.setReferrerUrl
Sets the ReferrerUrl
context.
Name | Required | Description |
---|---|---|
context | Yes | ReferrerUrl context |
Syntax:
Copied to your clipboardmse.context.setReferrerUrl(referrerUrlCtx);
mse.context.setSearchInput
Sets the SearchInput
context.
Name | Required | Description |
---|---|---|
context | Yes | SearchInput context |
Syntax:
Copied to your clipboardmse.context.setSearchInput(searchInputCtx);
mse.context.setSearchResults
Sets the SearchResults
context.
Name | Required | Description |
---|---|---|
context | Yes | SearchResults context |
Syntax:
Copied to your clipboardmse.context.setSearchResults(searchResultsCtx);
mse.context.setShopper
Sets the Shopper
context.
Name | Required | Description |
---|---|---|
context | Yes | Shopper context |
Syntax:
Copied to your clipboardmse.context.setShopper(shopperCtx);
mse.context.setShoppingCart
Sets the ShoppingCart
context.
Name | Required | Description |
---|---|---|
context | Yes | ShoppingCart context |
Syntax:
Copied to your clipboardmse.context.setShoppingCart(shoppingCartCtx);
mse.context.setStorefrontInstance
Sets the StorefrontInstance
context.
Name | Required | Description |
---|---|---|
context | Yes | StorefrontInstance context |
Syntax:
Copied to your clipboardmse.context.setStorefrontInstance(storefrontCtx);
mse.context.setContext
Sets a custom Context
.
Name | Required | Description |
---|---|---|
name | Yes | Context name |
context | Yes | Custom context |
Syntax:
Copied to your clipboardmse.context.setContext(ctx);