Wish list

Important

This content is archived and is not being updated. For the latest documentation, see Microsoft Dynamics 365 product documentation. For the latest release plans, see Dynamics 365 and Microsoft Power Platform release plans.

Applies To: Microsoft Dynamics AX 2012 R3

Note

In the Retail online sample store included with Microsoft Dynamics AX 2012 R2, a user’s wish list was implemented as a type of shopping cart.

In Microsoft Dynamics AX 2012 R3 Retail online sample stores, an authenticated user can create one or more named wish lists that contain products that they may want to purchase in the future. Wish list data is stored in the AX 2012 R3 database in the RetailWishList and RetailWishListLines tables. The data is updated by the Commerce Data Exchange: Synch service and the Commerce Data Exchange: Real-time Service.

When an anonymous user clicks on a wish list button, they are redirected to the registration page. For more information about authenticated and anonymous users in the Retail online sample stores, see Authenticating users in Retail online sample stores.

Wish list source code and design

Source code for the wish list display is found in the Storefront.sln solution. This solution is available in the following folder after you install the Retail SDK:

\Retail SDK\Online Channel\Storefront

Services supply data elements for display. Data from the AX 2012 R3 database is represented by entities in the commerce run-time (CRT) object model. Data in the object model is mapped into a view model to be displayed in pages of the Retail online sample stores. Web controls and Cascading Style Sheets (CSS) support the page display.

Dn741452.collapse_all(en-us,AX.60).gifData elements

In the AX 2012 R3 database, the RetailWishListTable table stores the CustomerId (account number) and Name of the wish list. RetailWishListLineTable contains one record for each item in the wish list. Each record stores the following information for each item in the wish list: CustomerId, ProductId, Quantity, UnitOfMeasure, and WishListId.

Dn741452.collapse_all(en-us,AX.60).gifServices

In the Storefront.sln solution, the SharePoint.Web.Services project contains source code that supports services and CRT entities. The following table lists the services and interfaces that support the wish list.

Name

Description

Link to documentation

Wish list service

Represents the AJAX-enabled Windows Communication Foundation (WCF) service.

Microsoft.Dynamics.Retail.SharePoint.Web.Services.WishListService

\ObjectModel\ WishListController.cs

The controller supports functions that represent actions that can be performed on a wish list. Actions include create a new wish list, rename a wish list, and delete a wish list. To add or remove items from the wish list,

Microsoft.Dynamics.Retail.SharePoint.Web.Services.ObjectModel.WishListController

\ObjectModel\ WishListMapper.cs

The WishListMapper class manages the mappings between the wish list view model and CRT entity. The view model is the representation of the wish list in the online store user interface. The CRT entity is the representation of the wish list data in the channel database.

Microsoft.Dynamics.Retail.SharePoint.Web.Services.ObjectModel.WishListMapper

\ViewModel\WishList.cs

The wish list view model representation includes the wish list ID, customer ID (account number), wish list name, last modified date, and wish list lines. Each wish list line represents an item in the wish list that includes the following properties: LineId, ProductId, Name (of the product), CustomerId, Quantity, Price, TotalValue. Other properties include the product description, color, size, URL, and ImageURL.

Microsoft.Dynamics.Retail.SharePoint.Web.Services.ViewModel.WishList

Dn741452.collapse_all(en-us,AX.60).gifControls

In the Storefront.sln solution, the SharePoint.Web.Storefront project contains source code for the wish list control in the \Controls folder.

Name

Description

WishList.ascx.cs

For more information, see WishList.

WishList.ascx

The wish list display control shows the set of wish lists created by a user. It contains the name of the wish list, the last item added, and a set of actions, including delete and rename, that can be performed on the wish list. When a user clicks on the name of a wish list, the wish list line details are displayed.

Dn741452.collapse_all(en-us,AX.60).gifPage layout and style sheets

You can map a network drive to view the page layout for the wish list. For more information, see Map a network drive to the SharePoint 2013 files for online stores.

In the Storefront.sln solution, the SharePoint.Web.Storefront project contains Javascript files that support the wish list layout. In the \Layouts\Storefront\js folder, view the WishList.js and WishListDetails.js files for detailed information.

In the Storefront.sln solution, the Share.PointWeb.Storefront project contains source code that supports page display. The following table lists the Cascading Style Sheet (CSS) files in the \Styles folder that support the wish list.

File Name

Description

WishListSummary.css

Styles that support the wish list summary.

WishListDetails.css

Styles that support details lines for each wish list.

See also

Creating WCF Services for ASP.NET AJAX