Dynamics AX Retail Online Store
Dynamics AX Retail Online Store
Dynamics AX Retail Online Store
Chapter 1
Install an online store (e-commerce)
Install multiple online stores
Set up and configure an online store
Bulk edit attributes in Microsoft Excel
Getting started with customizing the Retail online sample store
Architecture of the online store
Online store publishing architecture
Plan for an online store
Quick Guide: How to customize an online store
Set up and configure refiners
Customize master pages
Customize page layouts
Customize the appearance and behavior of site pages
Cascading style sheet (CSS) files for Retail online store
Customize the functionality of an online store
Customize display templates for an online store
Debug X++ Code for Retail
Debug code in a Retail online sample store
Update the Publishing Job Configuration
Create a URL for search engine optimization (SEO) in a Retail online store
Components of the Retail online sample store
Authenticating users in Retail online sample stores
Walkthrough: Extending the database schema
Walkthrough: Extending the Retail online sample store
Walkthrough: Adding Properties to a Sales Order
Retail online sample store reference
Details
Verify that the SharePoint server(s) that will host the Retail online store meet the following requirements: 16 GB of RAM recommended; 10 GB of
RAM and 4 processors, minimum.
Verify that the SQL server is not running SQL Express. The retail online store is not supported with SQL Express.
For more information about system requirements, see Hardware and software requirements.
Verify that you installed the URL Rewrite Module 2.0 (64-bit) on each SharePoint server.
Retail headquarters
Commerce Data Exchange components
Retail SDK
Retail channel database
For more information, see Install retail components
Verify that all SharePoint application pools are running in IIS Manager.
Important
If the SharePoint Web Services Root application pool is stopped, you must start it.
In SharePoint Central Administration, click Application Management > Service Applications > Manage Services on Server and verify that, at a
minimum, the following services are running:
Central Administration
Managed Metadata Web Service
Microsoft SharePoint Foundation Workflow Timer Service
Microsoft SharePoint Foundation Web Application
Search Host Controller Service
Search Query and Site Settings Service
SharePoint Server Search
Verify or create the following domain accounts. You will specify these accounts when you deploy the Retail online store later in this topic.
Product Catalog Web App Pool User: This account must be a member of the SharePoint Farm Administrators group so that it can edit
properties in the root web site. This account will be specified later in this topic.
StoreFront Web App Pool User: This account must be a member of the SharePoint Farm Administrators group so that it can edit properties in
the root web site. This account will be specified later in this topic.
STS Web App Pool User: This account must be a member of the SharePoint Farm Administrators group so that it can edit properties in the root
web site. This account was specified when you installed SharePoint. It is the account under which the Security Token Service application pool runs
in IIS Manager.
Retail Job User: This account was specified when you installed SharePoint. It is the account under which the SharePoint Timer Service runs.
Encryption settings: The Retail store publishing portal uses SSL encryption. For production environments, you must register your domain and obtain a
valid, registered SSL certificate from a provider. For developer and evaluation environments, you can use a self-signed certificate. For information about
how to work with certificates see Certificate Overview.
The SQLCMD utility is required to install the Retail online store. This utility is typically installed with Microsoft SQL Server. If a version of SQL Server is not
installed on the computer where you install the online store, you can download and install Microsoft Command Line Utilities 11 for SQL Server to meet
this requirement.
You cannot configure a Microsoft Dynamics AX Retail store (online store or brick-and-mortar store) to use a warehouse that is managed by the
Warehouse Management module. The module was introduced in AX 2012 R3. You can configure a Retail online store to use a warehouse that is
managed by the Inventory Management module.
1. In SharePoint Central Administration, under Application Management, click Manage service applications.
2. Highlight the Managed Metadata Service Connection row and then click Properties.
1. Save the file in the Retail SDK folder and give it a name Name.snk.
2. Edit the UpdateAssemblyIdentities.ps1 file in the Retail SDK folder. You must update the version number and the thumbprint of the key file (lines 97, 98).
3. Update the source code to use the strong name certificate by executing the UpdateAssemblyIdentities.ps1 script. This script can take several minutes to complete.
Additional steps and recommendations for developers are described in the Next steps for developers section in this topic.
1. Start Microsoft Dynamics AX Setup. Under Install, select Microsoft Dynamics AX components.
2. Advance through the first wizard pages.
3. If the Setup Support files have not yet been installed on this computer, the Select a file location page is displayed. The Setup Support files are required for installation. Provide a file location
or accept the default location, and then click Next. On the Ready to install page, click Install.
4. On the Select installation type page, click Custom installation, and then click Next.
5. On the Select components page, select Retail online channel, and then click Next.
6. On the Prerequisite validation results page, resolve any errors. For more information about how to resolve prerequisite errors, see Check prerequisites. When no errors remain, click Next.
7. On the Configure a Microsoft Dynamics AX Retail online store page, enter the following information about the web site where the online store will run.
On the Configure the Retail online channel page, select the check box to configure online store by using Setup. If you clear this option, the application files are installed, but the
online store is not deployed or configured.
If youre configuring the online store, enter the following information:
Storefront to deploy: Select a Retail starter store to deploy. The Contoso starter store is modeled after an online electronics retailer. The Fabrikam starter store is modeled after an
online clothing retailer.
Database server: The name of the server that will host the Retail online store databases
Channel database name: The name of the Retail channel database. If this database does not exist, you must cancel Setup and install a Retail channel database.
User name and Password: The credentials for a domain account that has permission to create web applications and execute PowerShell scripts in SharePoint.
Pfx file path: The path to the Pfx file for the SSL certificate.
Password: The password for the Pfx file.
Channel operating unit number: A channel operating unit number is specified when you create an online channel in the Microsoft Dynamics AX client. You must create the channel
before you deploy the Retail online store. To locate this operating unit number, click Retail > Retail channels > Online Stores.
8. On the Prerequisite validation results page, resolve any errors. For more information about how to resolve prerequisite errors, see Check prerequisites. When no errors remain, click Next.
9. On the Ready to install page, click Install.
10. After the installation is completed, click Finish to close the wizard.
If the deployment succeeded, proceed to the Verify deployment section in this document. If the deployment failed check the Microsoft Dynamics AX log file and the Windows event logs for
information. For additional troubleshooting support, see the Troubleshooting deployment issues section in Troubleshoot installation issues for a Retail online store.
1. Start Microsoft Dynamics AX Setup. Under Install, select Microsoft Dynamics AX components.
2. Advance through the first wizard pages.
3. If the Setup Support files have not yet been installed on this computer, the Select a file location page is displayed. The Setup Support files are required for installation. Provide a file
location or accept the default location, and then click Next. On the Ready to install page, click Install.
4. On the Select installation type page, click Custom installation, and then click Next.
5. On the Select components page, select Retail online channel, and then click Next.
6. On the Prerequisite validation results page, resolve any errors. For more information about how to resolve prerequisite errors, see Check prerequisites. When no errors remain, click
Next.
7. On the Configure a Microsoft Dynamics AX Retail online store page, clear the Configure Retail online store option. Click Next.
8. On the Prerequisite validation results page, resolve any errors. For more information about how to resolve prerequisite errors, see Check prerequisites. When no errors remain, click
Next.
9. On the Ready to install page, click Install.
10. After the installation is completed, click Finish to close the wizard. Setup extracts files and creates the following folder on the local server:
C:\Program Files (x86)\Microsoft Dynamics AX\60\Retail Online Channel
1. Open the manifest.xml file in the following directory on the SharePoint server:
C:\...\Retail Online Channel\StoreFront\SP
2. Delete the following line of code from the manifest.xml file:
<Assembly Location="Microsoft.Web.Administration.dll" DeploymentTarget="GlobalAssemblyCache" />
3. Save and close the file.
The Microsoft.Web.Administration.dll in the global assembly cache will not be overwritten when you execute PowerShell commands later in this topic.
What to enter
Default
StoreFront_Name
Contoso
StoreFront_Design
Default
StoreFront_CountryCode
USA
StoreFront_CountryName
United States
StoreFront_CurrencyTemplate
${0}
SharepointPackageInstanceIdentifier
StoreFront_ItemAvailabilityThreshold
10
StoreFront_ShoppingCartExpiryTerm
None
StoreFront_LanguageId
1033
StoreFront_DeviceChannelsListName
Device Channels
LoggingServiceName
LoggingCategoryName
MonitoringEventLogSourceName
40002
40004
40003
40001
ResetSearchIndex
False
StoreFrontSiteCollectionRootUrl_FormsAuth
http://%COMPUTERNAME%:[StoreFrontUrlPort_Public]
StoreFrontUrlPort_Internal
ProductCatalogUrlPort_Internal
http://%COMPUTERNAME%:[StoreFrontUrlPort_Internal]
StoreFrontSiteCollectionRootUrl_FormsAuth_Public
http://www.[StoreFront_Name].com:[StoreFrontUrlPort_Public]
StoreFrontSiteCollectionRootUrl_SSL_FormsAuth
https://%COMPUTERNAME%:[StoreFrontUrlPort_SSL_Public]
StoreFrontSiteCollectionRootUrl_SSL_FormsAuth_Public
https://www.[StoreFront_Name].com:[StoreFrontUrlPort_SSL_Public]
PublishingPortalRelativePath
/sites/RetailPublishingPortal
StoreFrontPublicSSLCertThumbprint
None
-------------------SSL
--------------------
StoreFrontPublicSSLCertDirectory
None
StoreFrontPublicSSLCertLocalDirectory
None
Important
This path cannot contain any special
characters. If the path contains a
special character deployment fails.
StoreFrontPublicSSLCertPfxFileName
None
None
StoreFrontWebAppPoolUser
None
ProductCatalogSiteCollectionRootUrl_WindowsAuth
http://%COMPUTERNAME%:[ProductCatalogUrlPort_Internal]
ProductCatalogWebAppPoolUser
None
ProductCatalogName
STSWebAppPoolUser
None
RetailJobUser
None
ChannelOperatingUnitNumber
None
DestinationId
None
PublishingConnectorServiceInstanceServers
None
FarmAdministratorAlias
None
FarmAdministratorEmail
None
SharePointRelyPartyUrl
https://www.[StoreFront_Name].com:[StoreFrontUrlPort_SSL_Public]/_trust/
-------------------DATABASE DETAILS
-------------------ChannelDatabaseServerName
None
ChannelDatabaseServerNamedInstanceName
None
ChannelDatabaseName
None
IdentityProviderDatabaseServerName
None
IdentityProviderDatabaseServerNamedInstanceName
None
CustomClaimsProviderDatabaseServerName
None
CustomClaimsProviderDatabaseServerNamedInstanceName
None
None
ShowDebugErrorMessages
None
Important
To keep a record of the settings and parameters you specified, we recommend that you make a copy of the oob-settings.xml file after you finished entering parameters.
Create a Facebook application: Use the following procedure to create a Facebook application that enables Facebook logon to your site.
Certificates: Use the following procedure to create certificates for Facebook authentication. For production environments, you must register your domain and obtain a valid, registered SSL
certificate from a provider. For developer and evaluation environments, you can use a self-signed certificate. For information about how to work with certificates see Certificate Overview.
1. Search in the oobsettings.xml file for the parameters listed in the following table. Enter a value for each parameter. For each value, retain quotation marks but remove percent
signs (%).
Parameter
What to enter
FacebookApplicationId
FacebookApplicationSecret
FacebookCertificateDirectory
The source directory where Microsoft Dynamics AX retrieves the .pfx file for the SSL certificate. This value can be a network share.
FacebookCertificateLocalCopyDirectory
The destination folder where Microsoft Dynamics AX stores a local copy of the certificate. This location cannot be the same as the
StoreFrontPublicSSLCertDirectory value.
FacebookSigningCertificateCerFileName
Enter a value with the name of the certificate .cer file in the form value=" CertificateName .cer".
FacebookSigningCertificatePfxFileName
Enter a value with the name of the certificate .pfx file in the form value=" CertificateName .pfx".
FacebookSigningCertificatePfxPassword
This is a password for a test certificate. For production environments, do not enter a password here. It will be prompted during
deployment. This password cannot contain any restricted XML characters such as the following: exclamation point (!), greater than
sign <, less than sign >, ampersand &, apostrophe , or a quotation mark .
FacebookSigningCertificateThumbprint
The thumbprint for your Secure Sockets Layer (SSL) encryption certificate. You must obtain a valid, registered certificate from a
provider.
Because this component uses Secure Sockets Layer (SSL) encryption, you must install a server certificate that was issued by a
trusted certification authority. (For test environments, you can create a self-signed certificate in IIS.) You will need to paste the
thumbprint for the certificate into the settings file. To view the thumbprint in IIS Manager, double-click the certificate and click the
Details tab. We recommend that you paste the thumbprint into a text file and remove all spaces before you paste it into the
settings file.
Caution
A thumbprint can contain hidden characters at the beginning of the thumbprint value. You must delete these extra characters
before you paste the thumbprint into the settings file.
FacebookSignInUrl
The page that will contact Facebook to authenticate users. For example:
http://www.[StoreFront_Name].com:[StoreFrontUrlPort_Public][PublishingPortalRelativePath]/pages/Login.aspx
FacebookSslCertificateAuthorityCerFileName
FacebookSslCertificateAuthorityThumbprint
Note
You can enable Facebook integration in developer environments that are not using a fully registered domain name (for example, www.DomainName.com). To do this, you must create host
file entries on each computer that will browse the online store. The URL for host file entries must be in the form: http://www.DomainName.com/sites/RetailPublishingPortal.
1. Open the oob-topology.xml file in Microsoft Visual Studio or a text editor, such as Notepad.
2. Search in the oobtopology.xml file for the parameter listed in the following table. Enter a value for each parameter. For each value, retain quotation marks but remove percent
signs (%).
Search for
Enter
Run Windows PowerShell scripts to create and configure the online store
After you configure the parameters in the oob-settings.xml file, you can run the Windows PowerShell scripts that deploy and configure the online store.
In this section, you will execute the following scripts to create and configure the online store.
InstallPrereqs-SPFarm
Generate-WSP
Deploy-FarmSolutions
InstallPrereqs-SPFarm.ps1
This script performs the following actions on the server.
Area
Actions
topology.xml file to preserve databases, web applications, features, and settings, as described earlier in this topic.
SharePoint Server actions performed by this script
Creates trusted identity token issuer for Facebook integration
(on every web front-end server, when executed in a server
farm)
Creates SharePoint web applications
Creates SSL binding (on every web front-end server, when
executed in a server farm)
Creates SharePoint sites
Configures sites and web application properties
Disables versioning of the Retail Online Store Publishing Portal
web application
Configures site URLS (for different zones)
Enables trusted authentication providers for Facebook (if
option was configured)
If you re-run this script, the system performs the following actions
before creating or configuring SharePoint. You can, however, toggle
options to preserve settings, as described earlier in this document.
Verifies that the folders and files referenced in the oobtopology.xml and oob-settings.xml files exist
Verifies that the configured database server can be pinged.
Verifies that the SharePoint server names configured for the
publishing job are correct and that they are joined to the
current SharePoint farm.
Verifies that the SharePoint installation is of the correct
version. SharePoint 2013 is required.
Verifies that every SharePoint server that acts as an application
server has the URL Rewrite module installed.
Verifies that any ports are not already used by web
applications with different names.
If any of these checks fail, the script will not perform the installation.
1. On the server where you want to run the script, open the tools folder where the PowerShell scripts are installed.
2. If youre using Windows Server 2012 or a later operating system, use Windows Explorer to open the folder where the scripts are installed. Then click File > Open Windows PowerShell >
Open Windows PowerShell as administrator.
If youre using Windows Server 2008 R2 or an earlier operating system, start pw_wps as the administrator. Then, change the directory by using the following command: CD<Pathto
directory>.
3. Run the following command to verify and install prerequisites for the online store:
When the system finishes the operation, you can run the next script.
Generate-WSP.ps1
This script creates a SharePoint solution package (.WSP file) for your computing environment. The solution package includes properties such as connection strings, URLS, and ports from the
oob-topology.xml and oob-settings.xml files. The solution package also includes binaries and static web files that were deployed by Microsoft Dynamics AX Setup to the Retail Online Channel
directory.
Run Generate-WSP.ps1:
In the Windows PowerShell console, run the following command to generate the WSP file for the online store:
Important
Due to a known issue, the following script can fail with a file access error. If the script fails, re-run it. It should finish successfully the second time.
When the system finishes the operation, you can execute the next script.
Deploy-FarmSolutions.ps1
This script performs the following actions on the server.
If you re-run this script, the system performs the following actions before deploying the solution package or activating features. You can toggle options to preserve settings, as described earlier
in this document.
1. Deactivates features
2. Uninstalls solution packages
3. Runs post-deployment custom scripts (retract mode)
Run Deploy-FarmSolutions.ps1:
In the Windows PowerShell console, run the following command to deploy the solution to SharePoint.
When the system finishes the operation, you can verify the deployment.
Verify deployment
If all deployment scripts completed without errors, use this section to help verify the online store deployment. If the deployment scripts returned errors, see Troubleshoot installation issues for a
Retail online store.
Verify that the Connector Service is running: After a successful deployment, the Retail Publishing Connector Service 1 is running in SharePoint Central Administration. At this point, the service
displays an error No channel configuration could be found in the database, which means that the channel has not been configured in Microsoft Dynamics AX yet. For information about
configuring a channel, see the section titled Set up the online store in Microsoft Dynamics AX in the Online Store
Use the following procedure to verify that the Dynamics AX Publishing Connector service is running.
1. In SharePoint Central Administration under System Settings, click Manage services on server.
2. Verify that the Retail Publishing Connector Service 1 is running.
3. In SharePoint Central Administration, click Monitoring, and then click Check job status.
4. Verify that you see jobs listed for the C1 Application for Retail Store Front Internal and the Out of box Store front Public.
Verify that site collections exist and can be browsed: After a successful deployment, you can view the Retail online store web applications and site collections in SharePoint Central
Administration. If you specified different URLs for your web applications, you must adjust the URLS below accordingly.
Note
If you installed the Fabrikam starter store, change port values below from the 40,000 range to the 50,000 range. For example: The Contoso starter store product catalog site is
http://ServerName:40001/sites/RetailProductCatalog. The Fabrikam starter store product catalog site is http://ServerName:50001/sites/RetailProductCatalog.
1. In SharePoint Central Administration, click Application Management, and then click View all site collections.
2. On the C1 Application for Retail Store Front Internal web application, copy the http://ServerName:40001/sites/RetailProductCatalog URL and paste it into a browser. Verify that the
Welcome to your product catalog site displays.
3. In SharePoint Central Administration, click the Web application drop-down list and then click Change web application.
4. Click the Out of box Store front Public web application.
5. In the URL section, verify that you see the following URLs:
http://ServerName:40002/sites/RetailPublishingPortal
http://ServerName:40002
6. Copy and paste each URL into a browser. Verify that you see the Contoso electronic superstore site and the Contoso electronic superstore sign-in site. If the sign-in site displays a
certificate warning, click Continue to this web site. This warning appears if you used a self-signed certificate.
Verify that you can create and sign-in with a new forms-based user account: You should be able to register a new user account and logon from the public URL. By completing the sign-up
process you verify SQL Server connectivity, SSL port settings, and SSL certificate bindings.
1. Paste the public URL into a browser and press Enter. For example: http://ServerName:40002/sites/RetailPublishingPortal
2. Click Register a new account.
3. Enter an email address and a strong password in the required fields and then click Create account. Note that if you see more than one email and password field on the page, it means that
you executed the Deploy-FarmSolutions.ps1 script multiple times on this server. This is a known issue. To create the forms-based user account, you must enter the email address and strong
password in each field. Also note that you receive an error after you register the account because the online channel has not been configured in Microsoft Dynamics AX.
4. Browse the public portal site again (http:// ServerName:40002/sites/RetailPublishingPortal).
5. Click the Sign In link and enter the information for the account that you just created. The system logs you onto the Contoso electronics site as a registered user.
Verify that you can browse the public URL: If you registered a domain, you should be able to browse the web address for your site. For example, you should be able to browse
http://www.<your_domain>.com/sites/RetailPublishingPortal. If you have not yet registered the domain then you must create a hosts file entry and disable proxy settings in your browser (if
applicable) before you attempt to browse the web address.
Detail
See Quick Guide: How to customize a Microsoft Dynamics AX for Retail online store.
After you deploy the Microsoft Dynamics AX Retail online store, you must setup the online channel in Microsoft Dynamics AX. See the Online store setup
checklist. The checklist is available in the Microsoft Dynamics AX client: Retail > Setup > Online store setup checklist.
Note
If the online channel has already been set up in Microsoft Dynamics AX then you only need to publish the channel and publish a catalog. For information, see
Publish an online store in Set up an online store and Publish a catalog in Key tasks: Create retail product catalogs.
Deploy to production
See Deploy your solution to a production environment in Quick Guide: How to customize a Microsoft Dynamics AX for Retail online store.
C:\Program Files (x86)\Microsoft Dynamics AX\60\Retail Online Channel\Tools\UnDeployRetailOnlineChannel.ps1 -TopologyXmlFilePath oob-topology-updated.xml -SettingsXmlFilePat
To remove a non-default instance, change the name of the xml file in the parameters to the appropriate file.
-TopologyXmlFilePath oob-topology-updatedFabrikam.xml
-Setting
Note
If you have multiple online channels, you must use run the script with the appropriate settings and topology file for each online channel.
Uninstall if you installed with Windows PowerShell, and no longer have the original settings and topologies file
Use the following procedure if you installed with a settings file, but no longer have the file.
1. In SharePoint Central Administration, under System Settings, click Manage Farm Features.
2. Clear Claims Provider, Logging Service, and Publishing Job. If these features are not present, skip this step.
Note
Site level features will be automatically uninstalled when we uninstall the parent solutions.
3. In Central Administration, under System Settings, click Manage Farm Solutions. For each of the following solutions, choose to retract immediately, and then click OK.
Publisher Job
StoreFront
Common Global Modules
Note
This package is shared across all instances of storefront.
Note
While you are completing these steps, an IIS reset will occur, and Central Administration might become unavailable. If so, wait and try again.
4. After all the solutions have been retracted, remove the solution for each entry.
a. In Central Administration, under Manage Web Applications, delete all of the Web Applications by clicking Delete, and then clicking Delete Web Application.
b. Click Yes when you are prompted to delete content databases and to delete IIS web sites. This step can take some time to complete.
See also
Online Store
Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).
2014 Microsoft
Details
A second online store shares global components with the primary online store. You must install a primary online store before you
install a second store. For more information, see Install a Microsoft Dynamics AX Retail online store (e-commerce).
Locate the oob-settings.xml and oob-topology.xml files for the primary online store in the following folder:
C:\Program Files (x86)\Microsoft Dynamics AX\60\Retail Online Channel\tools
Make a copy of these files so that you have a record of the settings used for the primary online store.
Oob-settings.xml
Specify unique values for the following parameters in the oob-settings.xml file.
SharepointPackageInstanceIdentifier
StoreFrontUrlPort_Public
StoreFrontUrlPort_SSL_Public
StoreFrontUrlPort_Internal
ProductCatalogUrlPort_Internal
DestinationId
ChannelOperatingUnitNumber
The following values must be identical for multiple online stores in a SharePoint web farm.
IdentityProviderDatabaseServerName
CustomClaimsProviderDatabaseServerName
The following values can be identical or different for multiple online stores in a SharePoint web farm.
ChannelDatabaseServerName
ChannelDatabaseServerNamedInstanceNam
Oob-topology.xml
Update the following parameters in the oob-topology.xml file.
1. Disable deployment for the CommonGlobalModules. These globally shared components were installed with the primary online store deployment. Set the
following parameters to false, as shown here:
<WSPPackage generate="false" deploy="false" retract="false"> <RootFolder>..\CommonGlobalModules</RootFolder>
2. Disable the custom claims provider feature. These globally shared components were installed and activated with the primary online store deployment. Set the
3. Disable the TrustedIdentityTokenProvider. You will reuse the identity providers that were installed with the primary online store deployment. Set the following
parameters to false, as shown here:
<TrustedIdentityTokenIssuer id="Facebook" install="false" deleteifexists="false">
5. Run the Windows PowerShell commands to install the second online store. For more information, see Install a Microsoft Dynamics AX Retail online store (ecommerce).
See also
Online Store
Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).
2014 Microsoft
See also
Install a Microsoft Dynamics AX Retail online store (e-commerce)
Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).
2014 Microsoft
1. On the client computer that will be used to bulk edit attributes, open Excel.
2. Click File, and then click Options.
3. In the Excel Options form, click Trust Center, and then click the Trust Center Settings button.
4. In the Trust Center form, click Macro Settings.
5. Click Disable all macros except digitally signed macros, and then click OK.
1. On the client computer that will be used to bulk edit attributes, open Excel.
2. Click File, and then click Options.
3. In the Excel Options form, click Trust Center, and then click the Trust Center Settings button.
4. In the Trust Center form, click Trusted Publishers. Verify that Microsoft Corporation and Microsoft Code Signing PCA are listed in the form. There could be
several Microsoft certificates listed on the form. Verify that at least one Microsoft certificate has not expired. If a valid certificate exists, click OK. Microsoft
Dynamics AX users on the local computer can now use the bulk edit macro in Excel. If no Microsoft certificate is listed, import a valid excel-cert.cer certificate into
the local computer certificate store.
5. From the Windows desktop, click Start and then click Run.
6. Type MMC and press Enter.
7. Click Certificates and then click the Add button (>).
8. Click Computer account and then click Local computer.
9. In MMC, expand Certificates and right-click Trusted Publishers.
10. Click All Tasks and then click Import.
11. Use the Certificate Import wizard to import a valid excel-cert.cer file and then click OK.
12. Accept the default values.
13. In the Excel Trust Center form, click Trusted Publishers. Verify that Microsoft Corporation and Microsoft Code Signing PCA are listed in the form. There could be
several Microsoft certificates listed on the form. Verify that at least one Microsoft certificate has not expired. If a valid certificate exists, click OK.
See also
Online Store
Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).
Getting started with customizing the Retail online sample store [AX
2012]
Updated: April 30, 2014
Applies To: Microsoft Dynamics AX 2012 R3
Retail in Microsoft Dynamics AX 2012 R3 includes starter stores that you can customize: the Contoso store that sells electronics and the Fabrikam store that sells clothing.
These stores are built on the Microsoft SharePoint Server 2013 cross-site publishing platform. Source code and sample customizations for the starter stores are included
in the Retail SDK.
Before you begin working with the Retail online sample stores, you should understand the technologies that support the online stores.
To understand the capabilities in Microsoft SharePoint Server 2013, see Build sites for SharePoint 2013.
In AX 2012, you set up Retail catalogs as part of configuring an online store. For more information, see Set up an online store and Configure online store products
in Microsoft Dynamics AX.
For a step-by-step guide to creating an online shopping site by using SharePoint, see How to set up a product-centric website in SharePoint Server 2013.
The following articles can help you to understand the capabilities and design of the Retail online sample stores.
The following table lists some of the common tasks in customizing a starter store.
How do I
Topics
Online Store
View the functionality and appearance of the online sample stores on a demonstration virtual machine
Learn how the Retail online sample stores authenticate users and administrators, and learn how to add
a logon provider such as Facebook
Customize the appearance and behavior of the user interface for the Retail online sample store
Use tools to help you configure publishing jobs, update the channel against which the online store
operates, and clean up your SharePoint site.
Note
*To access this site, you must be enrolled in a service plan.
Use standard SharePoint Content Search Web Parts to display the products. To view the web parts for the Retail online sample stores, open the SharePoint
Central Administration page and then click the Site Settings button and then click Web parts under Web Designer Galleries. For example, the Product Gallery
page uses the Product Gallery web part. For more information, see Content Search Web Part in SharePoint 2013.
Modify the sample display templates that are provided by changing code in the HTML files on the mapped drive. Each HTML file has a corresponding .js file
that SharePoint updates automatically after any changes that you make. For more information about mapping a network drive, see Map a network drive to the
SharePoint 2013 files for online stores.
Customize the CSWPs in the sample stores. For more information, see Edit existing Web Parts in SharePoint 2013.
Customize the pages that are available on the mapped network drive. For more information, see Map a network drive to the SharePoint 2013 files for online
stores and Customize the appearance and behavior of site pages.
Customize the pages in the source code provided in the Retail SDK in the Online Channel\Storefront folder. Open the Storefront.sln solution to view the code.
After you rebuild the solution, you can deploy your changes to create your customized site.
For more information about each component and the data elements that are included in the Retail online sample stores, see Components of the Retail online sample
store.
See also
Retail SDK
Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).
2014 Microsoft
Real-time Service
The Commerce Data Exchange: Real-time Service is a Windows Communication Foundation (WCF) service that uses .NET Business Connector to facilitate
communication between Microsoft Dynamics AX Retail headquarters and the Microsoft Dynamics AX commerce runtime (CRT). In previous releases, this service was
called the Retail Transaction Service. This service is installed by using Microsoft Dynamics AX Setup. For more information about this service, see Install Commerce
Data Exchange: Real-time Service (Retail Transaction Service).
Commerce runtime
The Microsoft Dynamics AX commerce runtime is a set of .dlls that perform business logic and data processing for an online store. The CRT has four layers (data
access, services, workflow, API) and a database. For more information about the CRT, see Commerce Runtime.
Search
The Microsoft SharePoint Server 2013 cross-site publishing platform uses Microsoft FAST Search and search-driven pages to dynamically display content for
customers. For more information about FAST Search in cross-site publishing, see Plan search for cross-site publishing sites in SharePoint Server 2013
Term sets
You use term sets to tag catalog content such as pages or list items on the authoring site. By doing this, terms help categorize the content into a hierarchy. These
same terms are later used on the publishing site to issue queries, show information about category and catalog item pages, create friendly URLs, and for managed
navigation. For more information, see Plan terms and term sets in SharePoint Server 2013.
Channel database(s): The online store uses this database as a data store before pushing data into SharePoint. By default, the database is named AxRetailSP.
Settings for this database are stored in the oob-topology.xml file under Settings/Channel.
Identity Provider database: This database stores user credentials for forms-based authentication. By default, the database is named SPFBA. Settings for this
database are stored in the oob-topology.xml file under Settings/IdentityProvider.
Custom Claims Provider database: This database stores the mapping between a users identify and their Microsoft Dynamics AX customer number when the
user has created an account. By default, the database is named SPAuthZ. Settings for this database are stored in the oob-topology.xml file under
Settings/CustomClaimsProvider.
Figure 2 provides a detailed view of the Microsoft Dynamics AX Retail online store and SharePoint features and components.
store is modeled after a fictitious online clothing store. When you install the Retail online store by using Setup.exe or PowerShell, you specify which starter store to
deploy in your environment. You can then customize and rebrand the starter store to meet your needs. The starter stores consist of the following site collections and
controls.
Site collections
The product catalog and publishing portal site collections are located in separate web applications. The product catalog content web application uses AD DS to
authenticate content authors. The publishing portal web application uses AD DS authentication for designers and forms-based authentication for web users. This web
application is configured to allow anonymous access for web users. The product catalog site collection contains a list of product data, including the Microsoft
Dynamics AX navigational hierarchy which is stored in the SharePoint Term Store. Those lists created by the online store publishing process are shared.
Internal users such as designers and other content authors have Contribute permission level to add, update, and delete items in the asset library. The asset library is
added to the Suggested Content Browser Locations list for the authoring and product catalog site collections so that content authors can use those assets in their
content.The search system indexes content from the authoring site and the product catalog site collection. When a user views a page on one of the publishing sites,
queries from Search Web Parts on that page are sent to the search index. Results are returned from the search index, and shown in the Search Web Parts on the
page.
Figure 3 provides a detailed view of the web applications and site collections that are created on the SharePoint server when you deploy the Retail online store. Figure
3 also lists the associated classes for the applications and site collections.
Figure 3 Detailed view of the Retail online store web applications and site collections
The Microsoft Dynamics AX Connector (also named the Channel Connector) is a SharePoint service publishing job that runs in the context of the OWSTimer.exe
service, which is standard SharePoint Timer Windows service. The publishing job retrieves updated product, product schema, category hierarchy information from the
channel database and pushes it into the product catalog database. The information is then crawled by Search.
The Secure Token Service is a SharePoint service that is used for validating forms-based authentication users.
Controls
The starter online store includes the following customizable controls.
Control type
Page layouts
Address edit
Associate customer
Change password
Checkout confirm
Facebook logon
Issue gift card
Logon
Loyalty
My account
Order review
Order confirm
Order history
Product details
Product gallery
Product quick view
Display templates
Contoso_Default_Item_ProductDetails
Contoso_Default_Item_ProductGallery
Contoso_Default_Item_ProductQuickView
Control_KitRetailListWithPaging
Control_ProductVariants
Control_RetailListWithCarouselPaging
Control_RetailListWithPaging
Control_RetailListWithPagingNoCrt
Fabrikam_Default_Item_ProductDetails
Fabrikam_Default_Item_ProductGallery
Fabrikam_Default_Item_ProductQuickView
Filter_RetailMultiValue
Filter_RetailMultiValue_Body
GiftCard_Item_ProductDetails
GiftCard_ProductVariants
Item_KitComponentDetails_Contoso_Default
Item_Recommended
Item_SelectComponentSubstitutesQuickView_Contoso_Default
Controls/Web parts
Shopping Cart
Mini shopping cart
Order history
Address display, edit
Customer display, edit
Wish List
Category landing
Welcome bar
Store product availability
See also
Online Store
Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).
2014 Microsoft
1. Add the online store to the organization hierarchy. For more information, see Create or modify an organization hierarchy.
2. Create the online store and configure properties in Microsoft Dynamics AX. For more information, see Set up an online store.
3. Configure category hierarchy of you site. For more information, see Set up a retail hierarchy
4. Create the online store in SharePoint. Install a Microsoft Dynamics AX Retail online store (e-commerce).
After you completed these steps, you are ready to publish the product schema to SharePoint. Figure 2 shows the publishing process for a Retail online store channel.
1. You create the online store in Microsoft Dynamics AX and publish it from the Online stores form. The publish status changes from Draft to In progress.
2. Microsoft Dynamics AX takes a snapshot of the category hierarchies (called the Retail hierarchy) and properties.
3. The Commerce Data Exchange: Async server reads information about the online store, hierarchies, and properties in the Retail store database and sends it to the
Commerce runtime (CRT).
4. The Async server synchronizes the tables in the channel database.
5. The Retail publishing job, which runs as a SharePoint timer job, receives information about synchronized tables from the CRT API and creates hierarchies for the
site that you created in SharePoint.
6. The Retail publishing job creates term sets in SharePoint.
7. The Commerce Data Exchange: Real Time Service receives the status of the Retail publishing job actions from the CRT API and publishes that status in Microsoft
Dynamics AX. The status shows either Published or Error.
For the specific procedures to publish a channel, see Set up an online store. After you published the channel, you can publish a catalog.
1. Set up retail products and configure hierarchies, assortments, and variants. For more information, see Setting up retail products
2. Set up retail product catalogs and configure attribute groups and workflow. For more information, see Setting up retail product catalogs.
Figure 3 shows the publishing process for a Retail online store catalog.
Note
To learn more about custom site columns and list items, see Introduction to Columns and the section titled "Share a library or list as a catalog" in Configure cross-site
publishing in SharePoint Server 2013.
Figure 4 shows the various features of an Microsoft Dynamics AX Retail catalog. When these features are published, they are mapped to the SharePoint cross-site
publishing platform.
Figure 4 Mapping of Microsoft Dynamics AX catalog features after they are published to SharePoint
See also
Update the Publishing Job Configuration
Microsoft Dynamics AX for Retail online channel tools
Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).
2014 Microsoft
See also
Online Store
Architecture of the Microsoft Dynamics AX Retail online store
Install a Microsoft Dynamics AX Retail online store (e-commerce)
Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).
2014 Microsoft
1. Save the file in the Retail SDK folder and give it a name Name.snk.
2. Edit the UpdateAssemblyIdentities.ps1 file in the Retail SDK folder. You must update the version number and the thumbprint of the key file (lines 97, 98).
3. Update the source code to use the strong name certificate by executing the UpdateAssemblyIdentities.ps1 script. This script can take several minutes to
complete.
Use Visual Studio 2012 to customize the Retail Online Store source code projects
Customization of the Retail online sample stores requires Microsoft Office Developer Tools for Visual Studio. Use the following steps to install the tools.
To download the Microsoft Web Platform Installer, see Microsoft Web Platform Installer.
The Retail SDK includes the following Visual Studio solution files:
Services.sln: Use this file to customize source code for the Commerce Run-time. The file is located in the Retail SDK\Commerce Run-Time\Services directory.
StoreFront.sln: Use this file to customize source code for the Retail online store. The file is located in the Retail SDK\Online Channel\StoreFront directory.
1. The developer opens the Services.sln project in Visual Studio, clicks Clean All, customizes the solution, and then clicks Build All.
Visual Studio creates the output assembly files in the Retail SDK\Commerce Run-time\References directory.
2. The developer opens StoreFront.sln, project in Visual Studio, clicks Clean All, customizes the solution, and then clicks Build All.
Visual Studio creates the output assembly files in the Retail SDK\Online Channel\References directory.
3. In Visual Studio, the developer right-clicks the StoreFront project node in the StoreFront solution, and then clicks Publish. By default, Visual Studio publishes
the updated solution to the C:\Program Files (x86)\Microsoft Dynamics AX\60\Retail Online Channel\StoreFront\ORIGINAL_WSP directory. If this directory does
not exist in your development environment, then you must create it.
The publish process creates a new deployment package which you can deploy in a test environment to verify your changes.
1. Open the C:\Program Files (x86)\Microsoft Dynamics AX\60\Retail Online Channel\tools\oob-topology.xml file in Microsoft Visual Studio or a text editor, such
as Notepad.
2. Search in the oob-topology.xml file for the parameters listed in the following table. Enter the specified value for each parameter.
Search for
3. From a command prompt, open the directory where the oob-topology file is stored. By default, it is stored here:
C:\Program Files (x86)\Microsoft Dynamics AX\60\Retail Online Channel\tools
4. Execute the following command:
powershell .\Generate-WSP.ps1 oob-topology.xml oob-settings.xml
5. After the PowerShell command is finished, update the oob-topology.xml file so that the RetailJobs and DemoData XML nodes specify generate=false and the
StoreFront XML node specifies generate=true.
6. Execute the following command:
powershell .\Prepare-FromWSP.ps1 oob-topology.xml oob-settings.xml
7. After the PowerShell command is finished, execute the following command:
powershell .\InstallPrereqs-SPFarm.ps1 oob-topology.xml oob-settings.xml
8. After the PowerShell command is finished, execute the following command:
powershell .\Deploy-FarmSolutions.ps1 oob-topology.xml oob-settings.xml
9. Save your changes in the oob-topology.xml file.
10. Verify all of your changes. For more information, see Verify deployment in Install a Microsoft Dynamics AX Retail online store (e-commerce).
Process
Details
Setup procedures are listed in the Online Store under the heading Setup and configure an online store. The topics in the roadmap
supplement the online store setup checklist. The checklist is available in the Microsoft Dynamics AX client: Retail > Setup > Online
store setup checklist. Use the procedures listed in the documentation roadmap and the checklist to finish setting up and configuring
the Retail online channel.
After you have verified your customized Retail online store, you can copy the C:\Program Files (x86)\Microsoft Dynamics AX\60\Retail
Online Channel directory to the Web server farm.
Open the oob-topology.xml file in the production environment. Verify that all WSPPackage XML nodes are configured with
generate=true. If any node is configure with generate=false, then you must change the value to generate=true.
Caution
You must review and configure cookie behavior in SharePoint configuration files. If you do not configure these settings, your Retail
online store might display sensitive user information to different users. For example, the default behavior for SharePoint is to use
persistent session cookies. This enables a user to close the browser, re-open the browser, and re-visit a SharePoint web application
without signing in again. For more information, see Federated Identity for SharePoint Applications.
Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).
2014 Microsoft
Set up and configure refiners for a Retail online store [AX 2012]
Updated: April 22, 2014
Applies To: Microsoft Dynamics AX 2012 R3
This topic describes how to set up and configure refiners for a Microsoft Dynamics AX Retail online store. Refiners are a component of search-driven navigation on a web
page.
You can add refiners to a page to help users quickly browse to specific content. Refiners are based on managed properties from the search index. For example, in a Retail
online store, a refiner could be a color, a brand, or a material for a product in your catalog. If you specify a color refiner, The Refinement Panel Web Part will show the
available colors for a product. When users click a specific color, only the selected colors are listed.
Refiners are used with terms in a term set in SharePoint Server 2013 faceted navigation. Faceted navigation helps users browse for content more easily by filtering on
refiners that are tied to terms in a term set. By using faceted navigation, you can configure different refiners for different terms in a term set without having to create
additional pages. For example, in an Internet business scenario in which a catalog of electronic products is shown, a term set might be used to categorize different
products, such as computers or cameras. The same category page is used for both terms. After you enable the managed properties Screen size and Megapixels as
refiners, you can configure faceted navigation so that Screen size is shown as a refiner for computers, and Megapixels is shown as a refiner for cameras. This means that
you do not have to create additional pages to guide users to content that is relevant for a specific category. For more information, see "Plan refiners and faceted
navigation" in Plan search for cross-site publishing sites in SharePoint Server 2013.
This topic includes the following sections.
Configure refiners
Use the following procedure to set up and configure refiners for a Retail online store. This procedure describes, as an example, how to configure a Retail price refiner.
Note
The following procedure requires that you select a display template. You can select one of the default SharePoint templates or you can copy an existing template and
customize it. For more information, about default display templates, see the SharePoint Server 2013 Display template reference.
1. Use Windows Explorer to open the following folder on the RetailPublishingPortal network drive:
%Portal_Drive%:\_catalogs\masterpage\Display Templates\Filters
2. Copy the following files:
Filter_MultiValue_Body.html
Filter_RetailMultiValue.html
3. Paste the files into the following folder on the RetailProductCatalog network drive:
%Catalog_Drive%:\_catalogs\masterpage\Display Templates\Filters
4. Press F5 on the keyboard to refresh the folder view on the RetailProductCatalog network drive. Verify that you see the following four (4) new files in the folder:
Filter_MultiValue_Body.html
Filter_MultiValue_Body.js
Filter_RetailMultiValue.html
Filter_RetailMultiValue.js
5. In a web browser, open the product catalog site. By default, the URL is http://ServerName:40001/sites/RetailProductCatalog
6. Click Manage item hierarchy in Term Store.
7. On the Site Settings Term Store Management Tool page, in the left pane, expand the Site Collection ServerName SitesRetailProductCatalog node.
Important
By default, child categories recursively inherit all refiners specified on a parent category. If you want to specify a different set of refiners for a child category (a
common scenario) then you must break inheritance and add specific refiners, as needed. To break inheritance, select a child category and then click Stop
inheriting. The Customize refiners button is now active. Click this button to set up additional refiners on the child category.
15. Validate you changes in the publishing portal. Open the portal in a Web browser. By default, the URL is http://ServerName:40003/sites/RetailPublishingPortal. Click
a category and verify that you see the refiners you created.
1. Create a list of each managed property that you want to configure to display a different refiner label. You can create this list in a simple text editor like Notepad.
2. Add the following prefix string to each managed property in the text editor: rf_RefinementTitle_
3. For each property, add a colon (:) followed by the new refiner label in parentheses. For example:
"rf_RefinementTitle_RetColor": "Color"
4. In Windows Explorer, open the following folder in the RetailPublishingPortal network drive that you mapped earlier in this topic:
%Portal_Drive%:\_catalogs\masterpage\Display Templates\Language Files\en-us\
Note
This procedure updates a file in the en-us folder, which means this procedure configures English language labels. To configure refiner labels in a different
language, modify the following file in a different language folder.
See also
Quick Guide: How to customize a Microsoft Dynamics AX for Retail online store
Online Store
Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).
2014 Microsoft
2. Open a web browser on a computer where you are logged in using the administrative account for SharePoint.
3. Navigate to the Site Settings page of the store. Use port 40003 and sign in with administrative credentials. The link to the Site Settings page is typically found at a
URL that resembles the following:
http://<computer-name>:40003/sites/RetailPublishingPortal/_layouts/15/settings.aspx
Tip
Add this page to your Favorites to make it easy to return to it in the future.
4. Click Master pages and page layouts in Web Designer Galleries to view a list of files in the Master Page Gallery page.
5. Right-click a file that you want to edit, such as Storefront.master, and then click Check Out.
6. Right-click the file and then click Download a Copy.
7. Edit the file by using Visual Studio or another editor. For example, in the following code from Storefront.master, you can change the logo file that is displayed on
each page. The file is named logo_Contoso_main.png. You can edit that file or replace the file name with the name of a file that contains a graphic of similar size to
display your company logo. The following code shows the path and file name of the logo in the Storefront.master file:
<div class="msax-Main">
<div class="s4-notdlg msax-LogoBar">
<div class="msax-Logo">
<a id="A1" href="<% $SPUrl:~sitecollection/ %>" runat="server">
<img src="/_layouts/15/Images/Storefront/logo_Contoso_main.png" />
</a>
</div>
8. To upload the file and add your changes to the site, click Upload Document on the Files ribbon.
Tip
This procedure illustrates one way of changing master pages and page layouts for the online starter store. For more information about how to use Microsoft
SharePoint Server 2013 to modify the visual site design, see Develop the site design in SharePoint 2013.
9. Refresh the Welcome page in your initial browser session to see your changes.
Note
You can edit the master page files directly by mapping a network drive. For more information, see Map a network drive to the SharePoint 2013 files for online stores.
See also
How to: Apply a master page to a site in SharePoint Server 2013
Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).
2014 Microsoft
2. Open another web browser on a computer where you are logged in using the administrative account for SharePoint.
3. Navigate to the Site Settings page of the store. Use port 40003 and sign in with administrative credentials. The link to the Site Settings page is typically found at a
URL that resembles the following:
http://<computer-name>:40003/sites/RetailPublishingPortal/_layouts/15/settings.aspx
Tip
Add this page to your Favorites to make it easy to return to it in the future.
4. Click Master pages and page layouts in Web Designer Galleries to view a list of files in the Master Page Gallery page.
5. Right-click a file that you want to edit, such as WelcomeLayout.aspx, and then click Check Out.
6. Right-click the file and then click Download a Copy.
7. Edit the file by using Visual Studio or another editor. For example, the following code from WelcomeLayout.aspx specifies the names of the tabs on the Welcome
page.
<div class="msax-tabs">
<ul>
<li><a onclick="return
<li><a onclick="return
<li><a onclick="return
<li><a onclick="return
false;"
false;"
false;"
false;"
href="#tabs-1">Customer favorites</a></li>
href="#tabs-2">Staff recommendations</a></li>
href="#tabs-3">Shop by brand</a></li>
href="#tabs-4">Clearance items</a></li>
8. Change the names of the tabs by editing the text. You can use the following code to change the names of the tabs:
<div class="msax-tabs">
<ul>
<li><a onclick="return
<li><a onclick="return
<li><a onclick="return
<li><a onclick="return
false;"
false;"
false;"
false;"
href="#tabs-1">Your favorites</a></li>
href="#tabs-2">Our recommendations</a></li>
href="#tabs-3">Shop by brand</a></li>
href="#tabs-4">Special offers</a></li>
9. To upload the file and add your changes to the site, click Upload Document on the Files ribbon.
Tip
This procedure illustrates one way of changing master pages and page layouts for the online starter store. For more information about how to use Microsoft
SharePoint Server 2013 to modify the visual site design, see Develop the site design in SharePoint 2013.
10. Refresh the Welcome page in your initial browser session to see your changes.
Note
You can edit the page layout files directly by mapping a network drive. For more information, see Map a network drive to the SharePoint 2013 files for online stores.
See also
How to: Create a page layout in SharePoint Server 2013
Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).
2014 Microsoft
To update the CSS file for the Welcome Page to change the color of the slide counter
1. Open a web browser and open the Welcome page for the starter store. Typically, the URL for the Welcome page resembles the following:
http://<your-server-name>:40002/sites/RetailPublishingPortal
Note
Observe the behavior of the page. A slide show cycles through three pictures representing product categories. In the lower-right-hand corner of the slides, a counter
displays the current slide number. The following illustration shows the counter displaying the slide number in the original colors of gray and white.
2. Navigate to the folders on the computer where the online starter store is deployed. Typically, the path for the folder location for CSS files resembles the following:
\ProgramFiles\CommonFiles\MicrosoftShared\WebServerExtensions\15\TEMPLATE\LAYOUTS\1033\STYLES\Storefront
3. Open the Welcome.css file. You can use Visual Studio or any editor that you prefer. For example, consider the slide show on the Welcome page. That is the first page that
you see when you access the store on port 40002. The indicator displays the number of the current slide. In the starter store, these are numbered 1, 2, and 3, and the
numbers are white on a black background.
The following code from Welcome.css shows initial values for color and border:
.msax-reel_paging a {
padding: 5px;
text-decoration: none;
color: #fff;
}
.msax-reel_paging a.active {
font-weight: bold;
background: #1c2023;
border: 1px solid #101315;
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
}
The following table lists the original colors that are used.
Parameter
Element
Color Code
Color
color:
Text
#fff
White
border:
#101315
Dark grey
4. Modify the values for color and border as shown in the following code to create a display that has text in red (#f00) and highlights the current slide number in green
(#3c8a3c):
.msax-reel_paging a {
padding: 5px;
text-decoration: none;
color: #f00;
}
.msax-reel_paging a.active {
font-weight: bold;
background: #1c2023;
border: 1px solid #3c8a3c;
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
}
The following table lists the new colors you have entered.
Parameter
Element
Color Code
Color
color:
Text
#f00
Red
border:
#3c8a3c
Green
See also
Cascading style sheet (CSS) files for Retail online store
Overview of the SharePoint 2013 page model
JavaScript API reference for SharePoint 2013
Execute basic tasks using the JavaScript object model
Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).
2014 Microsoft
Cascading style sheet (CSS) files for Retail online store [AX 2012]
Updated: April 28, 2014
Applies To: Microsoft Dynamics AX 2012 R3
Cascading style sheet (CSS) provide the page layouts with styling and formatting in a Microsoft Dynamics AX 2012 R2 online store. For a typical installation, the path for the
folder location of the CSS files resembles the following:
\ProgramFiles\CommonFiles\MicrosoftShared\WebServerExtensions\15\TEMPLATE\LAYOUTS\1033\STYLES\Storefront
The following table lists the cascading style sheets used in the online starter store.
Cascading Style Sheet
Description
AddressEdit.css
Defines the formatting for the components that appear on the AddressEdit page.
AssociateCustomer.css
Defines the formatting for the components that appear on AssociateCustomer page.
CheckoutConfirm.css
Defines the formatting for the components that appear on CheckoutConfirm page.
Control_ProductVariant.css
Defines the formatting that applies to the control selected for the Item Details display template.
Core.css
Defines global formatting that applies to all pages and user interface components of the starter store.
CustomerEdit.css
Defines the formatting for the components that appear on Login page.
Item_ProductDetails.css
Defines the formatting for the components that appear on ProductDetails page.
Item_ProductGallery.css
Defines the formatting for the components that appear on ProductGallery page.
Item_Recommended
Defines the formatting that applies to the Item_Recommended display template that is used by the following web parts: Related Products,
Customer Favorites, Shop By Brand, Clearance items.
Login.css
Defines the formatting for the components that appear on Login page.
MyAccount.css
Defines the formatting for the components that appear on MyAccount page.
OrderCheckout.css
Defines the formatting for the components that appear on Checkout page.
OrderDetails.css
Defines the formatting for the components that appear on OrderDetails page.
OrderHistory.css
Defines the formatting for the components that appear on OrderHistory page.
ProgressBar.css
Defines the formatting for the checkout progress bar on the OrderCheckout page that is displayed for Shipping information, Billing
Information, and Review.
Register.css
Defines the formatting for the components that appear on the page that enables a user to register a new account.
Reset.css
Resets some of the default HTML formatting defined in Core.css on the master page in order to make the pages as browser-independent
as possible.
ShoppingCart.css
Defines the formatting for the components that appear on ShoppingCart page.
Tab.css
Defines the formatting for the tab control that appears on Quickview and ProductDetails pages.
Welcome.css
Defines the formatting for the components that appear on Welcome page.
See also
Customize the appearance and behavior of site pages
How to: Create a page layout in SharePoint 2013
Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).
2014 Microsoft
To change the message displayed when an item is added to the shopping cart
1. Open a web browser and move to the Welcome page for the starter store. Typically, the URL for the Welcome page resembles the following:
http://<your-server-name>:40002/sites/RetailPublishingPortal
Add some items to the shopping cart.
Note
Observe the behavior of the page. When you click Add to cart under one of the items, a popup is displayed with the message Updating shopping cart.
2. Navigate to the folders on the computer where the online starter store is deployed. Typically, files that contain JavaScript for the starter store pages are found in a
path that resembles the following:
\ProgramFiles\CommonFiles\MicrosoftShared\WebServerExtensions\15\TEMPLATE\LAYOUTS\Storefront\js
3. Open the file Storefront.js. You can use Visual Studio or any editor that you prefer.
4. Find the line that contains msaxServices.OnAddToCart. The following example shows how to modify the code after line 170.
msaxServices.OnAddToCart(function () {
// msaxPopupOverlay.show('Updating shopping cart...');
alert('Adding to cart...');
});
5. Refresh the store pages and add an item to the cart. You see the message Adding to cart in the message window. Click Ok to continue.
Description
OnAddToCart, OffAddToCart
None
OnAddToCartSuccess, OffAddToCartSuccess
ShoppingCart
OnAddToCartFailure, OffAddToCartFailure
None
The following table lists methods for the Microsoft.Dynamics.Retail.SharePoint.Web.UI.ViewModel.CheckoutViewModel. The code for this view model is found in
the file Checkout.js.
Method Name
Description
OnCheckout, OffCheckout
None
OnNoItemCheckout, OffNoItemCheckout
None
The following table lists methods for the Microsoft.Dynamics.Retail.SharePoint.Web.UI.ViewModel.ShoppingCartViewModel. The code for this view model is
found in the file ShoppingCart.js.
Method Name
Description
OnBeforeRender, OffBeforeRender
ShoppingCart
OnAfterRender, OffAfterRender
ShoppingCart
Raised after execution of the Render method of the shopping cart view.
OnRemoveFromCart, OffRemoveFromCart
ShoppingCart
OnUpdateQuantity, OffUpdateQuantity
ShoppingCart
The following table lists methods for the Microsoft.Dynamics.Retail.SharePoint.Web.UI.ViewModel.MiniShoppingCartViewModel. The code for this view model is
found in the file MiniShoppingCart.js.
Method Names
Description
OnBeforeRender, OffBeforeRender
ShoppingCart
OnAfterRender, OffAfterRender
ShoppingCart
OnShow, OffShow
None
OnHide, OffHide
None
See also
How to use F12 Developer Tools to Debug your Webpages
Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).
2014 Microsoft
Description
Contoso_Default_Item_ProductDetails.html
Contoso_Default_Item_ProductQuickView.html
Contoso_Default_Item_ProductGallery
See also
Architecture of the Microsoft Dynamics AX Retail online store
Display template reference in SharePoint Server 2013
How to: Create a display template in SharePoint Server 2013
Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).
2014 Microsoft
Then you can set breakpoints in your X++ code and begin debugging.
Caution
To debug code that runs on the server, you must also configure debugging on the AOS server. For more information, see How to: Debug X++ Code Running in .NET
Business Connector.
4. Right-click the new value, and then click Rename. Enter debug_across_os_session.
5. Double-click debug_across_os_session.
6. In Value data, enter 1. Click OK.
7. In Windows Command Processor, enter IISReset, and then press Enter.
See also
Microsoft Dynamics AX Debugger
How to: Debug X++ Code Running in .NET Business Connector
Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).
2014 Microsoft
If you update the configuration file after Microsoft Dynamics AX is installed, you must read the configuration file from the configuration database, update it, and then save
it.
Note
The maximum number of listings that the publishing job can retrieve in one page while querying the database (one trip to the database) is 2,100. If you modify your
settings to retrieve more listings than the maximum, the job will fail.
<jobConfiguration CategoriesPageSize="200"
ProductAttributesPageSize="200"
CRTListingPageSize="2000"
ChannelListingPageSize="500"
ListingMapPageSize="10000"
ForceTimingInfoLogging ="false"
DefaultUncategorizedListName ="UncategorizedList"
MaxListLengthForInitialPublishing ="20000"
MaxListLengthForIncrementalPublishing ="0"
MaxListFieldCount ="200"
ListingTitleAttributeKey="Productname"
MaxCatalogSizePerPublishingIteration="0"
MaxActiveCrawlerWaitTime="0">
<TypeMappings>
<add Name="Specification" Value="Note"/>
<add Name="Features" Value="Note" />
</TypeMappings>
<PartitioningSchema>
</PartitioningSchema>
</jobConfiguration>
This code returns an instance of the RetailPublishingJobSettings class, which is defined in the Microsoft.Dynamics.Retail.SP.PublishingConnector.dll assembly
and has two public fields:
AppConfigString
CommerceRuntimeConfigString
The AppConfigString field is the Commerce Runtime (CRT) configuration that you might want to update if you are customizing the CRT. The
CommerceRuntimeConfigString field contains the XML configuration file that is described above.
The configuration file that contains the jobSettings section also contains a section called connectionStrings. The connectionStrings section contains a connection
string called CommerceRuntimeConnectionString that points to the CRT database. You can use the same procedure of reading, modifying, and saving the configuration
to update the connection string.
Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).
2014 Microsoft
To improve search engine optimization (SEO) in a Retail online store, you can add product names to the URLs on your site pages. Search engines use keywords in URLs to
return search results. When customers type product names into a search engine, they will see your store pages returned if you have included those product titles in your
catalog URLs.
To create these user-friendly URLs you set values on the Catalog Source Settings page in the Site Settings area in SharePoint.
Create a user-friendly URL that contains the product name of an item from the catalog in the Contoso
online sample store
The following procedure describes how to include a product name in a URL.
7. Close and re-open the browser to view your changes in the URLs for the products.
Note
Be sure to specify the site by using portal number 40002, in order to view what an end-user customer sees. For example, you might see a URL that resembles
the following example to locate the item that has the title Contoso Multi-line phone 20m30: Http:// <your-SharePoint-server-name>:40002/
sites/RetailPublishingPortal/phones/home-and-office-phones/Contoso%20Multi-line%20phones%20M30/22565424432/22565424433.
If you want to add other fields to the Available Fields list, you can create additional attributes for the catalog. After you add the attributes to the channel, you republish
the channel and the catalog. For more information about how to set up attributes, see Set up an online store.
See also
Search Engine Optimization (SEO) in SharePoint Server 2013
White Paper: Optimizing SharePoint Server 2013 websites for Internet search engines
Link to documentation
Extend the online store to expose additional data from the AX 2012 R3
database.
Reference documentation for elements of the Retail online sample store site pages
Source code for the online sample stores is found in the Retail Software Development Kit (SDK). For more information, see Retail SDK.
This section contains reference documentation for the elements that make up the online store pages.
Wish list
Shopping Cart
See also
Getting started with customizing the Retail online sample store
Architecture of the Microsoft Dynamics AX Retail online store
Retail online store publishing architecture
Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).
2014 Microsoft
For more information about Windows and forms-based authentication with SharePoint Server 2013, see Authentication overview for SharePoint 2013 and Authentication,
authorization, and security in SharePoint 2013.
For SharePoint, the web application is called Out of box Store front Public 1.
For IIS, the web application is called RetailC2WebApplication-1.
The deployment scripts also create site collections on the SharePoint web application. The default settings for the site collections configure port 40003 for site
administrators and port 40002 for customers. For example, the Contoso online sample store can authenticate users who access the site URLs as shown in the following
table.
URL
Authentication method
http://
computername:40003/sites/RetailPublishingPortal
Windows authentication. When you sign in your current Windows user ID is used for authentication.
http://
computername:40002/sites/RetailPublishingPortal
Forms-based authentication that includes external logon providers such as Facebook. Users may remain
anonymous if they decide not to log on.
Authentication process
The following diagram illustrates the components and databases involved in authenticating a user who signs in to the Contoso site on port 40002.
1. The user clicks Sign In on the store home page or accesses a page that requires authentication.
2. The user is redirected to the Login.aspx page.
3. The user enters an e-mail address and password. Data is sent to the SharePoint Secure Token Service (STS). The STS calls the forms-based identity provider,
which is based on the ASP.NET forms-base authentication provider and the AX 2012 Retail custom claims provider.
4. The identity provider uses the forms-based membership database SpFBA to validate the user name and password.
5. The STS may invoke other identity providers, such as Facebook.
6. After authentication, the Dynamics custom claims provider queries the customer mapping database SpSQLAuthZ, returns the AX 2012 customer ID for the user,
and adds it to the claim set.
7. The STS returns the claim set back to the page.
8. The page is sent to the users browser.
See also
Plan for user authentication methods in SharePoint 2013
Incoming claims: Signing into SharePoint 2013
Forms authentication in ASP.NET
Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).
2014 Microsoft
Prerequisites
Online Store
Prerequisites
These walkthroughs illustrate adding a field to a retail channel that enables customers to opt in to receive special offers by email. In this scenario, the retailer wants to
indicate whether customers wish to receive email about special offers, either in an online store or in a modern POS client. The walkthroughs should be completed in the
following order:
In the first walkthrough, you create a table to store the customer preferences. The following links provide background information about creating a new table.
Value
Name
EmailOptIn
Label
Email Opt In
EnumType
NoYes
Value
Name
CustTable
Table
CustTable
Validate
Yes
EntityRelationshipRole
blank
RelatedTableCardinality
ExactlyOne
Cardinality
ZeroOne
RelationshipType
Composition
UseDefaultRoleNames
Yes
RelatedTableRole
blank
Role
blank
EDTRelation
No
5. Right-click the new relation, select New, click ForeignKey, and then click PrimaryKey based.
Notice the CustTable field is added for the RetailCustPreferences table in the Fields node, and the relation is added in the Relations node under CustTable.
6. Right-click the new relation under CustTable and then click Properties.
7. Set the SourceEDT property to CustAccount.
8. Under the Fields node, right-click CustTable and then click Properties.
9. Set the properties as shown in the following table.
Property
Value
Name
AccountNum
ExtendedDataType
CustAccount
Value
Name
RetailCustPreferences
Table
RetailCustPreferences
Index
blank
CounterField
blank
AllowCheck
Yes
AllowEdit
Yes
AllowCreate
Yes
AllowDelete
Yes
StartPosition
First
AutoSearch
Yes
AutoNotify
Yes
AutoQuery
Yes
CrossCompanyAutoQuery
No
OnlyFetchActive
No
JoinSource
CustTable
LinkType
OuterJoin
DelayActive
Yes
InsertAtEnd
Yes
InsertIfEmpty
Yes
Value
Name
RetailCustomerPreferences _EmailOptIn
DataSource
RetailCustPreferences
DataField
EmailOptIn
Label
Email Opt In
12. Right-click CustTable in the Forms node, click Save, and then click Compile. You can disregard the Best practices messages.
13. Right-click CustTable and then click Open to view the form. Click Edit on the Action pane.
14. Click Retail to open the Retail FastTab.
15. Now, we must write code to populate the Customer account.
a. In the AOT, open the Forms node and navigate to the CustTable form.
b. Right-click CustTable, click View Code.
c. Click CustTable:validateWrite. Add the following line of code to the block before the ret = super(); statement: retailCustPreferences.AccountNum
Prerequisites
Online Store
Make the new fields available in the data model and the view model
Make changes to the controller
Make the new fields visible on the site pages
Add code to ControlResources.Designer.cs
Add text to ControlResources.resx
Prerequisites
These walkthroughs illustrate adding a field to a retail channel that enables customers to opt in to receive special offers by email. In this scenario, the retailer wants to
indicate whether customers wish to receive email about special offers, either in an online store or in a modern POS client. The walkthroughs should be completed in the
following order:
Make the new fields available in the data model and the view model
In the SharePoint.Web.Services project of the Storefront.sln solution, you modify ViewModel\Customer.cs and ObjectModel\Customermapper.cs. You modify the
Javascript files Customer.js and CustomerDisplay.js inStorefront\Scripts\Scripts\ViewModel.
[DataMember]
public Enum EmailOptIn { get; set; }
{
int intEmailOptIn = (int)emailOptInExtensionProperty.Value.GetPropertyValue(); // NEW Code
emailOptIn = intEmailOptIn == 0 ? false : true;
}
The following example shows the ConvertToViewModel method after adding the code.
5. Add the following example code to ConvertToDataModel immediately before the return statement:
dmCustomer["Age"] = customer.Age;
dmCustomer["SpecialOffers"] = customer.SpecialOffers;
To modify Customer.js
1. Open Customer.js in the Scripts\Scripts folder of Storefront.sln.
2. Add the following code to the function updateCustomer.
The following example shows the function after the code is added.
// Update a customer
this.UpdateCustomer = function () {
if (!Microsoft.Trigger($view, "UpdateCustomer")) {
return;
}
validator.Validate($view);
// NEW Code
if ($view.find('.msax-EmailOptInCheckBox').is(':checked')) {
customer.EmailOptIn = true;
}
else {
customer.EmailOptIn = false;
} //NEW code
if (validator.IsValid) {
services.UpdateCustomer(customer);
}
}
To modify CustomerDisplay.js
1. Open CustomerDisplay.js in the Scripts\Scripts folder of Storefront.sln.
2. Add the following code to the Initialize function.
// NEW Code
if (customer.EmailOptIn) {
$view.find('.msax-EmailOptInCheckBox').prop('checked', true);
}
else {
$view.find('.msax-EmailOptInCheckBox').prop('checked', false);
}
$view.find('.msax-EmailOptInCheckBox').attr("disabled", true);//NEW code
The following example shows the Initialize function after adding the code.
// CustomerViewModel constructor.
function Initialize() {
// Attach the Render event to the AfterRefresh
// event so when the data is loaded it will be
// displayed immediately.
services.OnGetCustomerSuccess(onGetCustomerSuccess);
services.OnGetCustomerFailure(onGetCustomerFailure);
binder = new Microsoft.Dynamics.Retail.SharePoint.Web.UI.TemplateBinder(
$view.find('.msax-CustomerDisplayTemplate'),
$view.find('.msax-CustomerDisplayContainer'));
// Set the customer control to refresh upon page load,
me.GetCustomer();
}
The following example shows the after adding the code to the RetailWebControl class.
HtmlInputText street;
HtmlInputText city;
HtmlInputText state;
HtmlInputText zipCode;
HtmlInputText country;
HtmlInputCheckBox emailOptIn; // NEW code
///NEW code
this.emailOptIn = ControlFactory.CreateCheckBox("msax-EmailOptInCheckBox");
this.emailOptIn.AddAttribute(AXDataBindAttributes.Value, "EmailOptIn");
HtmlLabel emailOptInLabel = ControlFactory.CreateLabel(ControlResources.CustomerEmailOptIn, null, this.emailOptIn);
HtmlFieldPanel emailOptInContainer = ControlFactory.CreateFieldPanel(emailOptInLabel, this.emailOptIn, "msax-CustomerEmailOptI
contactInfo.Controls.Add(emailOptInContainer);
4. The following example shows the GetCustomerTemplate method with the new code added.
To modify SharePointWebControls/Customer/CustomerDisplay.cs
1. Open CustomerDisplay.cs
2. Add the following code line to the header.
5. The following example shows the new code added to the GetCustomerTemplate method.
ControlResources.Designer.cs
ControlResources.resx
///
Looks up a localized string similar to Email for special offers:.
/// </summary>
internal static string CustomerEmailOptIn
{
get
{
return ResourceManager.GetString("CustomerEmailOptIn", resourceCulture);
}
}
/// NEW code
The following example shows where the new code is added in ControlResourcesDisigner.cs.
/// <summary>
///
Looks up a localized string similar to Share my information with Contoso partners..
/// </summary>
internal static string CustomerShareInformation {
get {
return ResourceManager.GetString("CustomerShareInformation", resourceCulture);
}
}
/// <summary> NEW code
///
Looks up a localized string similar to Email for special offers:.
/// </summary>
internal static string CustomerEmailOptIn
{
get
{
return ResourceManager.GetString("CustomerEmailOptIn", resourceCulture);
}
}
/// NEW code
/// <summary>
///
Looks up a localized string similar to State:.
/// </summary>
internal static string CustomerState {
get {
return ResourceManager.GetString("CustomerState", resourceCulture);
}
}
Value
Comment
CustomerEmailOptIn
Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).
2014 Microsoft
1. Create an attribute.
2. Add the attribute to an attribute group.
3. Assign the attribute group to your online store.
4. Set the attribute on a sales order.
Creating an Attribute
To create an attribute, you must define an attribute type and then assign the attribute type to your new attribute. In this example, you use an attribute type that is
included in Microsoft Dynamics AX. For more information about attributes, see Set up attributes and attribute types.
To create an attribute
1. In Microsoft Dynamics AX, click Product information management > Setup > Attributes > Attributes.
2. Click New. Enter the following values:
Property
Value
Name
GiftWrap
Friendly name
Gift wrap
Attribute type
StringDomain
Value
Name
SPSalesOrderGroup
Friendly name
Description
1. Click Retail > Common > Retail channels > Online stores. In the Online stores list, double-click your store.
2. Click the Set up tab and then click Sales order attributes.
3. In Channel attribute groups, click New.
4. In Name, select SPSalesOrderGroup.
Next Steps
After you create a sales order on the commerce runtime, you can view the new attribute in Microsoft Dynamics AX.
Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).
2014 Microsoft
Tip
To apply advanced criteria to your search for Help about Microsoft Dynamics AX, use the WebSearchAx tool.
See also
Content roadmap for a Microsoft Dynamics AX Retail online store
Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).
2014 Microsoft