Customizing Shopping

Interaction between Shopping and end users is primarily through the Shopping portal and through the notification emails that are sent to users, approvers and license managers. It is important that these points of interaction can be customized to allow branding and other customer-specific information to be displayed.

In this lab, you will look at the options for customizing the way Applications are displayed to end users in the portal, modifying emails that are generated by Shopping and applying some basic branding to the portal.

Adding custom tabs to Applications

Application tiles in the Shopping portal contain a More Info link. Clicking this will display the Application details on a larger 'banner'. It is possible to add custom tabs to this view for individual Applications to provide additional information about the application. In this exercise, you will learn how to add text and image tabs to an application using the Administrator tools in the Shopping portal.

Add a text tab to an Application

In this task, you will add a tab to the Sales Application that provides the user with some additional information about the application.


Log out of 1ETRNAP and log in as 1ETRN\Appinstaller

AppInstaller is a shopping admin.

Launch the Shopping portal in IE

Select the Administration tab in the navigation panel and click Home to view the application tiles

Locate the Sales Application tile and click More Info to open the Sales Application details. As you selected the Administration tab in the navigation panel, when you view the application details you get the additional +Add New Tab link (click the Self Service tab to see that link disappear and then reappear when you go back to the Administration tab)

Click the +Add New Tab link and enter Product Details as the Tab Title and select Text as the Content Type

In the large unlabelled field (tab body), enter any text you want to display when the user selects this tab and click Save

You can add plain text or use standard HTML tags to add formatting to the text.

Switch to the Self Service tab to see how the new tab would appear to a standard user

Switch back to the Administration tab and click +Add New Tab

Enter Version History for the title and leave the content type as text

Enter the following text in the tab body and click Save

Sales Application Version History
v2.9.13 - Current supported version – includes several minor bug fixes
v2.9.07 - Added alternate email field for contacts
v2.9.00 - Added support for Windows 8.1
v2.8.xx and lower – No longer supported

This text is available in the Text.txt file in \\1ETRNCM\c$\Temp\MiscFiles folder or can be copied and pasted from above

Switch to the Self Service tab and view the Version History tab. Note how the text is all displayed as a single line wrapped to fit the page

Switch back to the Administration tab and modify the text in the tab body as shown below, then click Save

Sales Application Version History<br>
v2.9.13 - Current supported version – includes several minor bug fixes<br>
v2.9.07 - Added alternate email field for contacts<br>
v2.9.00 - Added support for Windows 8.1<br>
v2.8.xx and lower – No longer supported

Switch back to the Self Service tab and observe the results

Adding the HTML tag <br> (line break) caused the text to be displayed as intended.

Add a Picture Gallery tab

In some cases, you may want to use one or more images to provide additional information about the application (perhaps if the Application were a piece of hardware as in the case of the Samsung monitor). In this task, you will use a Picture Gallery tab to add more information to the Sales Application.


Follow the process in the previous task to add a new tab to the Sales Application, but set the Tab Title to Pictures and select Picture Gallery as the type. This will display the Browse button to allow you to browse for images

Browse to \\1etrncm\c$\Temp\MiscFiles\SalesAppImages\SalesApp1.png. Click Save

Switch to the Self Service tab, and click on the Pictures tab. Note the picture displayed

Return to the Administration view and select the Pictures tab and repeat the process to browse for and add SalesApp2.png and SalesApp3.png

Note that Shopping will resize the images you select to fit the square placeholder, so if your images are not square they will appear stretched or squashed.

Switch to the Self Service tab to see how the new tab would appear to a standard user

Customizing the Home page

In this exercise, you will learn how to customize what the user sees on the home page in the portal.

Hide Savings so far

By default, under the heading, Savings so far in the navigation panel Shopping displays the number of requests processed since Shopping was implemented and the associated cost (money and time).

Savings so far are calculated by multiplying the number of requests by the Help Desk Cost and Help Desk Time values in the Web Applications settings (in the Settings node of the Shopping admin console. By default, these values are 40 and 30 respectively.

In this task, you will disable the Savings so far from being displayed.


Navigate to the Self Service Home page, and note the Savings so far section at the bottom of the navigation pane

Open the Shopping Admin Console and select the Settings node

Scroll down to the Web Application group of settings

Select Show Savings To Date and change the value to False and click Save (at the top of the page)

Close and reopen Internet Explorer and go to the Shopping portal Self Service home page

Note the Savings so far no longer appears

Using Featured Items

By default, the home page show all Applications listed alphabetically. It is possible for an administrator to define up to 20 specific applications to be displayed in a specific order using Featured Items. In this task, you will define specific applications in your chosen order.


In the shopping portal under the Self Service tab, observe the application tiles available on the Home page

Select the Administration tab in the navigation page and click Manage Featured Items

Note that by default Featured Items is not enabled (which means all Applications are shown on the home page). Check the Enable displaying featured item sequence on homepage box to enable Featured Items

Use the Search Applications box to search for the Sales Application. The search results appear in the Available applications list. Select Sales Application in this list and click > to add it to the Sequence list

Repeat this process to add 1ETRN Test App Set,PowerGUI and Project 2010 to the Sequence list, then click SAVE


Log in as 1ETRN\User and launch the shopping website. Note that now only PowerGUI and Project 2010 appear

The user can of course search or browse for other Applications, or simply click on the User Categories. Featured Items simply controls which applications they see on the home page

The Sales Application remains hidden from this user as they do not have permissions on the Sales Tools User Category. The App Set is not visible to users as it is only available for Shopping Admins and it will appear as a featured item when the Shopping Admins access the portal. If you launch the Shopping portal on 1ETRNAP, you will see the App Set.

Changing the 1E logo

A common request is to change the 1E logo and title that appears at the top of every page. The layout of common areas of the pages in Shopping is defined in _LayoutBase.cshtml located in C:\Program Files (x86)\1E\Shopping\WebSite\Shopping\Views\Shared. In this task, you will change the logo.


Copy C:\Temp\ShoppingIcons\ACMEpic.png to the Images folder C:\Program Files (x86)\1E\Shopping\WebSite\Shopping\Assets\Uploads\Images

On 1ETRNAP, open the following file in Notepad C:\Program Files (x86)\1E\Shopping\WebSite\Shopping\Views\Shared\_LayoutBase.cshtml

Locate the sections of the file that defines the logo by searching for logo.png

Modify the image source in _LayoutBase.html replacing logo.png with ACMEpic.png in both locations

Save the file

Refresh the browser and observe the changed logo. This will remain constant through all the Shopping pages

Alternatively, you may rename the logo.png file in C:\Program Files (x86)\1E\Shopping\WebSite\Shopping\Assets\Uploads\Images to logo.png.1e (to save the original) and then rename ACMEpic.png to logo.png.

Changing the Shopping Title


On 1ETRNAP, open Shopping Admin Console, go to the Settings node

Go to the Web Application section and note that the Application Name is currently Shopping

Click on Shopping, change it to ACME AppStore and hit Enter

Click the Save button at the top of the Settings page

Close and reopen the browser and go to http://appstore and see that the page title has changed from Shopping to ACME AppStore

Customizing email notifications

In this exercise, you will learn how to modify the email templates for the different notification emails generated by Shopping. All email templates are located in the GlobalResources folder, which is in C:\ProgramFiles (x86)\1E\Shopping\WebSite\ShoppingAPI.

This folder also includes folders for emails in alternative languages (German, Spanish, French, Italian and Portuguese are supplied with the product). You will learn more about language support shortly.

Modify the email body header and footer

All Shopping emails include a header and footer defined in Header.html and Footer.html respectively in the GlobalResources folder. In this task, you will make a simple change to the header.


Open Windows Explorer and browse to C:\ProgramFiles (x86)\1E\Shopping\WebSite\ShoppingAPI\GlobalResources

Make a backup copy of Header.html and rename the copy to Header.html.1E to identify it as the original file supplied by 1E

Always make a backup copy of the original file before making changes to any of the xslt, html or css files, just in case you need to revert to the original at a later stage.

Open Header.html in Notepad. This contains just one simple line. This defines the text (and style of that text) that appears at the top of the email, and a horizontal line (<hr/>) underneath to separate the header from the body of the email

<h2>1E Shopping Email</h2><hr/>

Replace 1E Shopping Email with ACME AppStore Notification and save the file

Open the modified Header.html in Internet Explorer to confirm the changes

Open Footer.html in Notepad. Note that the default footer is simply a hyperlink to the 1E web site. Change it to something different and save the file

Modify the 'Application Successfully Installed' email template

In this task, you will modify the body text in the Application Successfully Installed email template.


In the GlobalResources folder used in the previous task, make a copy of Mail-InstalledApp-Shopper.xslt and rename the copy to Mail-InstalledApp-Shopper.xslt.1E to identify it as the original installed file

Open Mail-InstalledApp-Shopper.xslt in Notepad

Locate the <title> section (shown below). This defines the subject line of the email

          <xsl:when test="$AppInstall=1">
               Application Successfully Installed
               Application Successfully Uninstalled

Locate the <style> section directly below the <title> section. This defines the body and h3 text styles

     body {
            font-family: Verdana; font-size: 10pt;
     h3 {
            font-size: 1.3em;

Change the font-family from Verdana to Calibri, and change the font size to 11pt

Within the h3 style definition, add color: blue; after font-size:1.3em;

The <style> section should now resemble the following

     body {
          font-family: Calibri; font-size: 11pt;
     h3 {
          font-size: 1.3em; color: blue;

Locate where the email body starts in the <body> section

Note that the first item is %%HEADERTEMPLATE%%. This is substituted with the Header.html you modified in the previous task

Below the header is a conditional block that displays either Application Successfully Installed or Application Successfully Uninstalled depending on the value of the $AppInstall. Note that this text is in the h3 style

The main body of the message then continues with the following paragraph

     The ConfigMgr Application <xsl:value-of select="/ShoppingParameters/@APPLICATION" />
          <xsl:when test="$AppInstall=1">
               was successfully installed on
               was successfully uninstalled from
     <xsl:value-of select="/ShoppingParameters/@MACHINENAME" /> for 
     <xsl:value-of select="/ShoppingParameters/@TARGETUSEREACCOUNT" />

Note the use of the @APPLICATION, @MACHINENAME and @TARGETUSEREACCOUNT parameters, which will be substituted with the order-specific values from Shopping at the time.

The opening text in this paragraph can be simplified. Replace The ConfigMgr Application with The Application

The remaining paragraphs add several other parameters from the Shopping order to the email. To simplify the email (bearing in mind this is sent to an end user), you can remove unwanted paragraphs by commenting them out (using the<!- and -> tags). The following example shows the code that displays the Install Date in UTC commented out

     <xsl:variable name="InstallDateUtc" select="/ShoppingParameters/@INSTALLDATEUTC" />
          <xsl:if test='$InstallDateUtc != ""'>
                    Install Date (UTC): <xsl:value-of select="$InstallDateUtc" />

Note at the end of the file %%FOOTERTEMPLATE%% is inserted, which is Footer.html observed in the previous task

Save the file with the changes made

Using the XsltTest tool to preview customized templates

Within the Shopping product, the only way to check a modified email template is to process an order that will generate the email associated with the modified template and review the resulting email when it is generated. Fortunately, the 1E engineering team have developed a test tool that enables the xslt files to be previewed.

This tool is provided on the training course content source for your own use but is not supported by 1E.

In this task, you will use the tool to preview the changes you made to Mail-InstalledApp-Shopper.xslt.


On 1ETRNAP, download and save the 1E Shopping - Course Content\Shopping 5.6 Course Content\ via the SkyTap Shared Drive shortcut on the desktop to C:\Program Files (x86)\1E\Shopping\WebSite\ShoppingAPI and extract the contents

Open C:\Program Files (x86)\1E\Shopping\WebSite\ShoppingAPI\XSLTTest\XsltTest.exe.config in Notepad

In the <appSettings> section of the file, locate the BasePath key and ensure the value reads as follows:

"C:\Program Files (x86)\1E\Shopping\WebSite\ShoppingAPI"

The BasePath defines the full path to the ShoppingAPI folder on the local server.

Locate the ConnectionString key and ensure the value reads as follows


If you are working in an environment with remote SQL, you will need to specify the SQL Server name in this ConnectionString.

Locate the OutputPath key and ensure the value reads as follows. This is the location where the tool will generate the resultant email in HTML format

"C:\Program Files (x86)\1E\Shopping\WebSite\ShoppingAPI\XSLTTest\Output.html"

Locate the UserAccount key and change the value to "1ETRN\user"

The UserAccount just needs to reference a valid Shopping user. The tool will use this user's language preference to generate the email.

Save and close XsltTest.exe.config

Launch the XSLT Tool by opening an admin cmd prompt and change directory to C:\Program Files (x86)\1E\Shopping\WebSite\ShoppingAPI\XLSTTest enter XSLTTest.exe and press return

From the Email Template drop-down, select Mail-InstalledApp-Shopper and click GO

Select the Email Body tab in the main area of the tool's interface to view the preview

Note that the header and font have changed, the heading is now blue, the opening text has changed and the Install Date (UTC) is no longer shown, reflecting the changes you made to the email template

You can compare it with any of the previous Application Successfully Installed emails in User's email inbox).

Using different language

Shopping uses a resource file (ShoppingWebStrings.resx) to define text strings that appear throughout the Shopping portal. The default locale version of this file is located in C:\Program Files (x86)\1E\Shopping\Website\ShoppingAPI\GlobalResources. German, Spanish, French, Italian and Portuguese versions are provided with Shopping in the deesfr, it and pt subfolders of GlobalResources.

This approach not only makes it straightforward to make the portal available in different languages, it also allows the default text to be customized. In this exercise, you will learn how to change almost any text that appears throughout the Shopping site.

Modify default text strings

In this task, you will modify the string REQUEST that appears on the button when you hover over an Application tile.


On 1ETRNAP open the C:\Program Files (x86)\1E\Shopping\Website\ShoppingAPI \GlobalResources folder and make a backup copy of ShoppingWebStrings.resx named ShoppingWebStrings.resx.1E

Open ShoppingWebStrings.resx in Notepad and search for <value>Request</value>. The complete definition of this string is as follows

<data name="Request" xml:space="preserve">

The best way to identify which string to change is to search for the string value as it appears in the Shopping page.

Replace the word Request between the <value> tags with text of your choice (Get It! perhaps)

Save and close ShoppingWebStrings.resx

From a command prompt, run iisreset

Changes to ShoppingWebStrings.resx will not take effect until IIS is restarted.

Open the Shopping portal (Self Service tab) and observe the text on the button of any given application that hasn't been shopped for yet

Note the Request text is changed to whatever you inputted in the .resx file.

Customizing end-user help

Most customers will want to customize the help pages that are presented to users when they click the Help link in the navigation panel.

Editing default help files


On 1ETRNAP, open the following folder, which contains all the help pages C:\Program Files (x86)\1E\Shopping\WebSite\ShoppingAPI\GlobalResources\Help

Open Help.html in Notepad and within the <body> section add a heading as shown below at line 7. You can modify the text in the main paragraph and add additional paragraphs and headings if you like. Save the file when you are done

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
 <!--<link rel="stylesheet" type="text/css" href="%SHOPPINGCSS%" />-->
     <h1>ACME AppStore Help</h1>
<p>In these pages you can find out how to use Shopping from a Shopper's point of view. Just click on a link below to find out more about how to perform a particular task.</p>

Open the Shopping portal and click on the Help link at the bottom of the navigation panel. Observe the changes you made to the Help home page

Adding a help page

In this task, you will add a new page (prepared for you) with an image and add a link to the Help Home page.


Copy MyHelpPage.html from \\1ETRNCM\c$\Temp\MiscFiles\MyHelpPage.html to the Help pages folder C:\Program Files (x86)\1E\Shopping\WebSite\ShoppingAPI\GlobalResources\Help, then open the copied file in Notepad

The page contains some basic HTML with a table that includes an image. Note the source for this image is HelpImages/MyHelpPage/ACMEPic.png, which you will now copy to the defined location

Open C:\Program Files (x86)\1E\Shopping\WebSite\Shopping\HelpImages and create a folder named MyHelpPage

Copy ACMEPic.png from C:\Temp\ShoppingIcons\ to the new MyHelpPage folder you just created

You will now add a link to this new help page on the Home page. Open Help.html in the Help folder (Shopping\WebSite\ShoppingAPI\GlobalResources\Help)

Identify the existing links (starting with a href"helpdefault.aspx

At the end of the links, copy the following

  <a href="helpdefault.aspx?HelpPage=MyHelpPage">See my new page</a><br/>

Save Help.html

Open the Shopping portal in the browser and go to the Help home page. The link to your new page should appear below the standard links. Click the link to open your added page. Confirm that the image is displayed correctly

Lab Summary

In this lab, you have explored the various methods available for customizing what users see of the Shopping application, both in the portal and through emails. The customizations made in this lab were basic, but you should now have an idea of the process involved with any more complex customizations.