mobile commerce reference store overview - …...5 and css3 features, as well as many...
TRANSCRIPT
![Page 1: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/1.jpg)
Commerce Reference Store
Version 11.0
Mobile Overview
Oracle ATG
One Main Street
Cambridge, MA 02142
USA
![Page 2: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/2.jpg)
Mobile Commerce Reference Store Overview
Product version: 11.0
Release date: 01-10-14
Document identifier: CRSMOverview1402071827
Copyright © 1997, 2014 Oracle and/or its affiliates. All rights reserved.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are
protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy,
reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any
means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.
The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please
report them to us in writing.
If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government,
the following notice is applicable:
U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the
hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable
Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and
adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or
documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S.
Government.
This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended
for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or
hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures
to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in
dangerous applications.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are
trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or
registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.
This software or hardware and documentation may provide access to or information on content, products, and services from third parties.
Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party
content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to
your access to or use of third-party content, products, or services.
For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/
topic/lookup?ctx=acc&id=docacc.
Access to Oracle Support: Oracle customers have access to electronic support through My Oracle Support. For information, visit http://
www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing
impaired.
![Page 3: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/3.jpg)
Mobile Commerce Reference Store Overview iii
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Oracle ATG Web Commerce and Endeca Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
About this Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2. What is CRS-M? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3. Version Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
4. Installing CRS-M . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Configuration Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Oracle Recommendations On Demand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Three Commerce Reference Store Sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
CIM Setup and Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
ATG Endeca Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Commerce Store Addons Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Mobile Reference Store Web Services Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5. High Level Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
General Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Access Control Servlet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Mobile Interceptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Directory Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Interceptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Mobile Form Handler Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
International Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Recommendations Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
CRS-M JSP File Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
CRS-M External Media Location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
6. Low Level Architecture – How Pages Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Home page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Personalized Content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
One unified Homepage cartridge design for all channels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Home page Design Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Implementing Home Page Hero images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Controlling Slider lists with productsHorizontalList.jsp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Structuring the Carousels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Populating the Sliders with Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Extending the Sliders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Oracle Endeca Commerce driven Search and Browse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Mobile Cartridge Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Auto suggest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Auto correct and “Did you mean?“ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Did you mean? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Brand Landing Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Category Landing Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Shopping Cart (not Endeca-driven) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Cart Containing Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Product Details Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Common Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
User Experience (UX) Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Principles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
![Page 4: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/4.jpg)
iv Mobile Commerce Reference Store Overview
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
7. Internationalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
8. Performance Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Use Appropriate Client-Side Storage Technologies for Local Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Enable Automatic Sign-in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Minimize Application and Data Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Minimize Perceived Latency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Use Meta Viewport Element To Identify Desired Screen Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Prefer Server-Side Detection Where Possible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
9. Customizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
10. Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
11. Feature Comparison with Commerce Reference Store . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
![Page 5: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/5.jpg)
1 Introduction 1
1 Introduction
ATG Mobile Commerce Reference Store (CRS-M) is an extension of the existing Commerce Reference Store (CRS).
It provides a new UI comprising JSPs optimized for WebKit-enabled mobile browsers, specifically Mobile Safari.
This new UI takes advantage of existing FormHandlers and ATG servlet beans but combines these with HTML
5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the
existing reference application, Commerce Reference Store.
Oracle ATG Web Commerce and Endeca Integration
A key feature of CRS-M is the integration of Endeca features into Commerce Reference Store, specifically:
• Endeca Guided Search replaces the use of ATG Search in both the desktop and mobile web applications.
• Business users can use Oracle Endeca Commerce Experience Manager to drive the page content management
and layout of the search results, brand landing, and category pages.
• Business users can include additional Endeca storefront elements such as categories, dimensions and
breadcrumbs.
• Business users can preview their mobile pages from within Endeca Experience Manager and Business Control
Center.
• Commerce Reference Store demonstrates the usage of core Endeca cartridges.
• Commerce Reference Store delivers multiple ATG-specific cartridges that can be leveraged as-is or extended
by customers in their own implementations. These cartridges provide product-supported integration points
between the ATG and Endeca platforms and help accelerate development at customer sites.
About this Document
This document discusses the features of CRS-M and the tools used to implement them. Each chapter builds on
the information in previous chapters, so it is recommended that you read the chapters in order. The document
includes the following chapters and appendix:
What is CRS-M? (page 3)
Version Compatibility (page 5)
![Page 6: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/6.jpg)
2 1 Introduction
Installing CRS-M (page 7)
High Level Architecture (page 11)
Low Level Architecture – How Pages Work (page 15)
Internationalization (page 61)
Performance Considerations (page 63)
Customizations (page 65)
Debugging (page 67)
Feature Comparison with Commerce Reference Store (page 69)
Audience
This document was written for technical users, and it discusses the roles of page developers and programmers in
building a personalized Web site.
• Page developers create the content pages, integrating the scenario elements created by business users
and the code elements created by programmers. Page developers are also responsible for overall Web site
appearance.
• Programmers create the code elements that allow the system to provide dynamic, personalized site content.
They also configure repositories and perform database administration duties.
![Page 7: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/7.jpg)
2 What is CRS-M? 3
2 What is CRS-M?
CRS-M is an extension to Commerce Reference Store that provides a set of JSPs that comprise a mobile-
optimized UI. CRS-M is a mobile web application—it is not a native iPhone or Android application—such as
would be downloaded from the Apple AppStore or Google Play.
CRS-M is based almost entirely on the existing Commerce Reference Store application’s backend (Nucleus
components and configuration) with a handful of extensions to facilitate the new UI layout and Site setup. All of
CRS-M’s JSPs are new, and there are new sub-modules that encapsulate the CRS-M code. These will be discussed
in more detail in later sections.
If you are not already familiar with Commerce Reference Store, please see the Commerce Reference Store
Overview.
![Page 8: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/8.jpg)
4 2 What is CRS-M?
![Page 9: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/9.jpg)
3 Version Compatibility 5
3 Version Compatibility
For information on supported operating systems, application server versions, JDK versions, and Oracle Endeca
Commerce versions, see the Oracle ATG Web Commerce Supported Environments document in the My Oracle
Support knowledge base (https://support.oracle.com/).
![Page 10: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/10.jpg)
6 3 Version Compatibility
![Page 11: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/11.jpg)
4 Installing CRS-M 7
4 Installing CRS-M
CRS-M is dependent on Commerce Reference Store, which is now dependent on Oracle Endeca Commerce. Later
in this section we will refer to the existing Commerce Reference Store Installation and Configuration Guide.
Configuration Options
Several configuration options are available during the installation process.
Oracle Recommendations On Demand
While CRS-M can run without installing Oracle Recommendations On Demand, you will need to install it to see
personalized recommendations on the CRS-M home page. Once installed, CRS-M tracks each click that the user
makes, and then uses this information to provide those personalized recommendations. If you choose not to
install Oracle Recommendations On Demand, you will still see personalized content on the home page provided
by content targeters. For more information on the Oracle Recommendations On Demand integration with
Commerce Reference Store, see the Commerce Reference Store Overview.
Three Commerce Reference Store Sites
Commerce Reference Store provides three sites in its out-of-the-box configuration: CRS Store US, CRS Store
Germany, and CRS Home with a different skin for each. CRS-M provides a site switcher for switching between
CRS Mobile Store and CRS Mobile Home. These sites are also available in Spanish. The German version is not yet
supported by CRS-M.
CIM Setup and Configuration
CRS-M is dependent on Commerce Reference Store; therefore, the setup and configuration process for CRS-
M is very similar to that for Commerce Reference Store. We will identify only the installation and configuration
steps that differ from the Commerce Reference Store steps that are detailed in the Commerce Reference Store
Installation and Configuration Guide. Follow all steps in that section for your chosen environment and add-on
options. There are some additional required in steps the Configuring ATG Products section where CIM is used for
setup. These steps are:
• Adding ATG Endeca Integration
• Choosing the Mobile Reference Store Add-On
![Page 12: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/12.jpg)
8 4 Installing CRS-M
• Configuring Mobile Reference Store Web Services
ATG Endeca Integration
During CIM setup the product selection menu options may look like the following. In the following example,
selecting options [3] ATG-Endeca Integration and [7] Oracle ATG Commerce Reference Store
allows you to select Mobile Commerce as an add-on later in the setup process.
Select product you wish to configure by entering the corresponding item number.
(Searching for products... done.)
Choose one of the following options: (* = Currently selected )
[1] ATG Platform : Includes, optionally, data warehouse components [2] ATG Site Administration : Includes ATG Platform and Content Administration [3] ATG-Endeca Integration : Includes ATG Platform. Select this option when Endeca is used. [4] Oracle ATG Web Commerce : Includes the ATG Platform and ATG Content Administration. Optional: data warehouse components, Preview, and Oracle ATG Web Commerce Merchandising [5] ATG Content Administration : Includes ATG Platform. Optional: Preview [6] ATG REST : RESTful Web Services [7] Oracle ATG Commerce Reference Store : Includes the ATG platform, ATG-Endeca Integration, ATG Content Administration, Site Administration, Oracle ATG Web Commerce, and Oracle ATG Web Commerce Merchandising. Optional: data warehouse components and Preview [D] Done
Select one or more > 7-------PRODUCT SELECTION--------------------------------------------------------enter [h]elp, [m]ain menu, [q]uit to exit
During the CIM setup process, after you have selected the “ATG-Endeca Integration” option, the following
displays:
-------ENDECA SEARCH------------------------------------------------------------
enter [h]elp, [m]ain menu, [q]uit to exit
The selected product requires the Endeca Search add on, which has beenautomatically included.
Since you had selected ATG-Endeca integration, the Endeca Search addon has been installed. Later in the
installation the following displays:
![Page 13: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/13.jpg)
4 Installing CRS-M 9
-------ENDECA PREVIEW OPTIONS SELECTION FOR PRODUCTION--------------------------
enter [h]elp, [m]ain menu, [q]uit to exit
Endeca Preview Options Selection For Production
[1] Configure Endeca Preview to run on the Production Server. Use thisoption in development or evaluation environments only. Do not use it for anactual production system. [D] Done
Select zero or more >
Commerce Store Addons Menu
In the CHOOSE ATG COMMERCE STORE ADDONS menu, when CRS-M is available, an additional menu option for
the Mobile Reference Store displays, depending on your installed products:
-------CHOOSE ATG COMMERCE REFERENCE STORE ADDONS :-----------------------------
enter [h]elp, [m]ain menu, [q]uit to exit
Choose ATG Commerce Reference Store AddOns :
[1] Storefront Demo Application [2] International : Enables multi-country and multi-language functionality [3] Fulfillment [4] Oracle Recommendations On Demand Integration [5] RightNow KnowledgeBase [6] ClickToCall Integration [7] Mobile Reference Store [D] Done
Select the Mobile Reference Store option in addition to the other add-ons that you require.
Mobile Reference Store Web Services Menu
Further along in the CIM setup process, the MOBILE REFERENCE STORE WEB SERVICES displays:
-------MOBILE REFERENCE STORE WEB SERVICES--------------------------------------
enter [h]elp, [m]ain menu, [q]uit to exit
Mobile Reference Store Web Services
[1] REST Web Services for Native Applications [D] Done
Select zero or one >
![Page 14: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/14.jpg)
10 4 Installing CRS-M
Select Option 1 to install the REST Web Services provided by the Mobile Reference Store if you are planning
native application development, otherwise, select D for done to skip this step.
![Page 15: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/15.jpg)
5 High Level Architecture 11
5 High Level Architecture
If you are not already familiar with the Commerce Reference Store architecture, see the Commerce Reference
Store documentation, particularly the Commerce Reference Store Overview, Commerce Reference Store Installation
and Configuration Guide, and the ATG-Endeca Integration Guide.
Since CRS-M is based almost entirely on the existing Commerce Reference Store application, we will not provide
details here, but rather explain how CRS-M sits logically on top of Commerce Reference Store, as an extension to
it, and the details of those extensions that CRS-M applies to the existing Commerce Reference Store application.
CRS-M makes extensive use of configuration layering to extend existing Commerce Reference Store classes, a
practice that is extremely common in ATG applications. It then provides a set of new Mobile-optimized JSPs on
top of the extended Commerce Reference Store backend.
The CRS-M Store.Mobile module provides an example of how to set up a dedicated mobile site so that you
can separately manage your mobile site through Site Administration. If you are unfamiliar with multisite, see the
Multisite Administration Guide. CRS-M creates pairs of sites, for example, a desktop ATG Home site, and its mobile
ATG Home counterpart.
General Configuration
The following are important general configuration areas which can be configured to meet your needs.
Access Control Servlet
The standard Oracle ATG Web Commerce access control servlet specifies the pages that, when requested, should
cause the user to be redirected to log in. The CRS-M configuration can be found at:
/atg/dynamo/servlet/dafpipeline/AccessControlServlet.properties
Additionally, a mechanism to disable CRS-M even after it has been included by your CIM setup is provided by /
atg/userprofiling/DisableMobileAccess.properties.
Mobile Interceptor
CRS-M aims to achieve the best possible coverage with mobile-specific pages for incoming requests (that is, the
provision of mobile-specific JSPs for requests from mobile browsers). There are two elements to this approach:
1. The structure of the directory which holds the mobile JSPs
![Page 16: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/16.jpg)
12 5 High Level Architecture
2. The interceptor which determines whether an incoming request came from a mobile browser or not
Directory Structure
The directory structure of CRS-M’s JSPs mirrors that of Commerce Reference Store as closely as possible, but
mobile-specific JSPs are nested under a “mobile” directory. The name of this directory is configured as the
mobile path prefix in atg/store/StoreConfiguration.properties.
For example, the product details JSP for Commerce Reference Store is located at /browse/
productDetail.jsp in the Storefront module, while the product details JSP for CRS-M are located at /
mobile/browse/productDetail.jsp, also in the Storefront module. Since the designated mobile path prefix
for CRS-M is configured to be the string “mobile” by StoreConfiguration.properties, there is a clear mapping
from a Commerce Reference Store JSP to an equivalent CRS-M JSP, that is, the Commerce Reference Store path
should be prepended with the designated mobile prefix (“mobile”) to determine the CRS-M path for a given
page request. You should configure your designated mobile prefix to match your directory structure should you
choose to take this approach for your implementation.
Redirects
The mobileSitesMapping and nonMobileSitesMapping properties are set using
MobileSitePairsShareableType instead of StoreConfiguration.properties. For a redirect,
MobileDetectionInterceptor now uses SiteGroupManager.getOtherSharingSiteIds(String).
Interceptor
A configuration layer was added in CRS-M to forward requests for non-mobile Commerce Reference Store URLs
made by mobile user-agents (browsers), for processing by CRS-M. This ensures that mobile user-agents are
provided with a mobile-specific presentation of each requested page.
The user-agent detection and request forwarding is done on the server side by a new tail pipeline interceptor:
atg.projects.store.mobile.link.MobileDetectionInterceptor.java
which is configured into the Oracle ATG Web Commerce tail pipeline. Its corresponding configuration is located
at:
/atg/dynamo/servlet/dafpipeline/MobileDetectionInterceptor.properties
This new interceptor’s position in the tail pipeline is determined by /atg/dynamo/servlet/dafpipeline/
TailPipelineServlet.properties and this position is important to ensure that multisite features
function correctly, that is, it should always be listed before the VirtualContextRootInterceptor and the
WebAppLayeringInterceptor.
The interceptor performs simple Java regular expression pattern matching on the incoming URL using the
configured mobile path prefix (from atg/store/StoreConfiguration.properties) to determine whether:
• The URL is already a mobile URL and hence can pass through untouched, or
• The URL is a non-mobile URL and hence the type of user-agent that it came from should be checked.
If that user-agent matches our definition of a mobile user-agent, forward the request to an equivalent but
mobile-specific page.
![Page 17: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/17.jpg)
5 High Level Architecture 13
If that user-agent does not match our definition of a mobile user-agent, let it pass through.
It is important to note that the interceptor does not take any action on requests whose URLs already contain the
designated mobile prefix (for example, if the URL is already a mobile URL), or that match the file types listed by
the excludedFileTypes property of the interceptor. Both the mobile prefix and the excluded file types can be
easily configured to meet your needs.
Map type properties are used in MobileDetectionInterceptor.properties: nonMobileToMobilePaths,
mobileToNonMobilePaths to direct mobile and non-mobile mappings for some URIs.
To determine if the user-agent of the incoming request is a mobile user-agent that you want to forward, use the
mobileBrowserTypes property and DAS BrowserTyper bean:
DynamoHttpServletRequest.isBrowserType(String pUserAgent)
Mobile Form Handler Extensions
CRS-M extends two existing Commerce Reference Store form handlers to provide the functionality required
specifically for the mobile UI design. These two form handlers are:
1. atg.projects.store.mobile.userprofiling.MobileStoreProfileFormHandler extends
atg.projects.store.profile.StoreProfileFormHandler and is configured by /atg/
userprofiling/ProfileFormHandler
2. atg.projects.store.mobile.order.MobileBillingInfoFormHandler extends
atg.projects.store.order.purchase.BillingInfoFormHandler and is configured by /atg/store/
mobile/order/purchase/BillingFormHandler
The main purpose of these new form handlers is to handle the creation and editing of credit cards in CRS-
M. Traditionally in the Commerce Reference Store application, a credit card and billing address have been
created on the same page or screen of the UI, requiring just one form submission. New form handler logic was
created, since the CRS-M design called for the credit card and billing address creation to happen on separate
screens. The credit card and billing address creation are split across two screens by storing the (encrypted)
credit card information into a temporary session bean until the billing address screen has been completed. Once
successfully validated, the credit card and billing address are associated with one another and committed to the
repository.
The following form handlers are also extended:
1. atg.projects.store.mobile.order.purchaseMobileCouponFormHandler extends
atg.projects.store.order.purchase.StoreCouponFormHandler and is configured by /atg/store/
order/purchase/CouponFormHandler
2. atg.projects.store.mobile.order.purchase.MobileStoreCartFormHandler extends
atg.projects.store.order.purchase.StoreCartFormHandler and is configured by /atg/
commerce/order/purchase/CartModifierFormHandler
International Configuration
All internationalization configuration support is provided by Commerce Reference Store. For more information
about internationalization features demonstrated by Commerce Reference Store, see the Commerce Reference
Store Overview.
![Page 18: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/18.jpg)
14 5 High Level Architecture
Recommendations Configuration
The recommendations configuration file within the Mobile.Recommendations module simply registers
the search results pages of CRS-M with the recommendations auto-tagging logic. All other auto-tagging for
recommendations support is provided by Commerce Reference Store. For more information about the Oracle
Recommendations On Demand functionality demonstrated by Commerce Reference Store, see the Commerce
Reference Store Overview.
CRS-M JSP File Structure
The CRS-M JSP files exist in the Store.Storefront sub-module in store.war/mobile.
The directory structure under store.war/mobile intentionally mirrors that of Commerce Reference Store.
An example of the use case that this setup caters for might be described as follows: A retail customer receives
an email from a friend containing a link to a product details page. The retail customer (recipient of the email)
then clicks that link, for example: http://localhost:8180/crs/storeus/browse/.... from their mobile
device. When this happens, the retailer typically wants to take that customer from the desktop version of that
product details page to the mobile-optimized version of that page in order to provide the best possible user
experience. This mirroring of directory structure combined with simple mobile browser detection facilitates this
forwarding action. This is discussed in more detail in the section entitled Mobile Interceptor within the General
Configuration (page 11) section.
CRS-M External Media Location
External media items (images) specifically for CRS-M are located at:
Store.Storefront/j2ee/storedocroot.war/content/mobile/images
![Page 19: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/19.jpg)
6 Low Level Architecture – How Pages Work 15
6 Low Level Architecture – How Pages
Work
This chapter examines in more detail how pages are composed, focusing on areas of interest including the home
page, product details page and search pages.
Home page
The homepage of CRS-M (Storefront/j2ee/store.war/) takes advantage of touch gestures as well as
Oracle ATG Web Commerce personalization features to demonstrate one approach to providing users with an
interactive and personalized homepage experience.
Overview
The home page is divided into two distinct sections, lying between the standard header and footer. Each of
these sections slides or scrolls horizontally. The following illustration shows the top 2/3 of the page containing a
promotional content item carousel or “slider,” and the remaining 1/3 of the page containing a product carousel
or “slider.”
The promotional content items and products have a unique relationship: each promotional content item in
the top section of the page has a set of associated products that appear in the carousel below it in the lower
section of the page. CRS-M provides several promotional content and product set pairs that are defined by
content targeters and use the sample user segments provided by Commerce Reference Store. Specifically, there
is a promotional content targeter and a products content group which looks at the profile in the same way.
HomeTheme.properties defines the rules for the promotional content. FeaturedProducts.properties
defines the rules for the product content.
If you are not already familiar with content targeters, please see the Personalization Programming Guide. As with
all content targeters, those provided by CRS-M can be customized through the Business Control Center.
![Page 20: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/20.jpg)
16 6 Low Level Architecture – How Pages Work
Homepage components
Architecture
This section discusses CRS-M architecture.
Personalized Content
The personalized content on the homepage is retrieved by executing server-side targeters through the Endeca
assembler.
One unified Homepage cartridge design for all channels
The same basic design for a homepage, configured in Experience Manager with the OneColumnPage template
is used for Desktop, Mobile Web and native IUA apps, using the ATG slot HomeTheme. The HomeTheme targeter
returns three promotional content items based on site and segment context.
Two cartridges
Scrollable content is displayed using a cartridge called ScrollablePromotionalContent-ATGSlot, which is
based upon the existing PromotionalContent-ATGTargeter. The shopper is able to click on a visual cue to
scroll the images on the desktop and swipe through the images on mobile web and IUA.
![Page 21: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/21.jpg)
6 Low Level Architecture – How Pages Work 17
Note: The use of a touch slider for Mobile Web has known accessibility limitations. The shopper cannot move to
the next image, or the next set of spotlighted products, when VoiceOver is enabled.
HorizontalRecordSpotlight cartridge is used to show featured items both horizontally and vertically in a
slider. For more information on this and all cartridges, see the Commerce Reference Store Overview.
Home page Design Details
The home page in CRS-M is managed using Experience Manager cartridges, which use ATG targeters to fetch
data and JSP pages to render the data. These cartridges are shared with Commerce Reference Store, CRS-M, and
IUA. The base configuration for all is in Commerce Reference Store.
There are two cartridges, one for managing the promotional content, such as hero images, and another for
managing detail of featured products.
To execute the targeters, cartridges are configured to make MVC Framework calls and the results are then
contained in an Endeca content item and passed along to the JSP renderers. The JSP renderers format the
promotional data into a specialized horizontal slider and the featured products below it in another specialized
slider.
Targeters
For the promotional content, the HomeTheme targeter component defines the rules for fetching the data. The
component path is
/atg/registry/RepositoryTargeters/ProductCatalog/HomeTheme
The base HomeTheme in Commerce Reference Store defines the default ruleset and the site ruleset for the
homeSite in the Store.Storefront.NoPublishing module. Store.Mobile overrides the HomeTheme
component configuration and replaces it with the same rulesets plus site rulesets for mobileHomeSite,
mobileStoreSiteUS and mobileStoreSiteDE. Since the configuration are properties of the HomeTheme
component and are defined as a XML string, the mobile HomeTheme configuration completely overrides the base
HomeTheme configuration since it cannot add to it via layering.
For the product content, the FeaturedProducts targeter component defines the rules for fetching the data.
The component path is
/atg/registry/RepositoryTargeters/ProductCatalog/FeaturedProducts
The base FeaturedProducts configuration in Commerce Reference Store desktop defines the rulesets for all
sites and is not overrides by Mobile.
Renderers
The promotional content is processed by this JSP page:
/mobile/cartridges/ScrollablePromotionalContent-ATGSlot/ScrollablePromotionalContent-ATGSlot.jsp
This page iterates over the promotionalContent items contained in the Endeca Content Item returned
from the cartridge. Each promotionalContent item is in turn rendered by the /mobile/promo/gadgets/
homePagePromotionalCell.jsp.
![Page 22: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/22.jpg)
18 6 Low Level Architecture – How Pages Work
On document ready, the ScrollablePromotionalContent-ATGSlot.jsp calls the initPromoSlider()
function in promo.js which creates the special slider for the images using the functions in slider.js and
adding support for the circles at the bottom the images indicating the index of the current image and number
of images in the slider.
The featured products, shown below the promotional content, are processed by:
/mobile/cartridges/ScrollablePromotionalContent-ATGSlot/ScrollableProductSpotlight-ATGSlot.jsp
The product collection from the Endeca Content Item returned from the cartridge and passes the collection to
the /mobile/global/gadgets/productsHorizontalList.jsp JSP page The productsHorizontalList
page renders the images and links for each product and if applicable, the site the product belongs to (if different
that the current site) and the price of the item. On document ready, the productsHorizontalList.jsp calls the
initHorizontalListSliders() function in horizontal-list.js which creates the special slider for the
product images.
Implementing Home Page Hero images
Device-specific images are uniquely implemented in mobile for the hero images displayed on the top two-thirds
of the homepage.
Tables and properties
Mobile provides two tables for images to the catalog schema:
crs_mobile_img
crs_mobile_desc
Each table stores a key/value pair where the key is a mobile site ID and the value is a URL to a specific image. The
promotionalContent repository item in the catalog repository is extended with these properties:
Property Description
mobileImages Map of mobile site ID to image URL using the crs_mobile_img table (the actual
data).
mobileDescriptionsMap of mobile site ID to image URL using the crs_mobile_desc table (the actual
data).
deviceImage Derived property that references the current site context and uses the site ID as the
key to lookup up an image URL from the mobileImages property.
deviceDescriptionDerived property that looks at the current site context and uses the site ID as the key
to lookup up an image URL from the mobileDescriptions property.
derivedDeviceImageDerived property that takes the value retrieved from the deviceImage property and
performs substitutions in the path URL using the current site and language.
derivedDeviceImageProperty used to fetch the promotional text overlay image.
deviceDescription Property used to fetch the promotional background image.
![Page 23: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/23.jpg)
6 Low Level Architecture – How Pages Work 19
These properties are used by the homePagePromotionalCell.jsp page to render the promotional content
which is called from the ScrollablePromotionalContent-ATGSlot.jsp cartridge renderer.
In the following example, data that populates the properties needed for a hero image is described as key/value
pairs.
<set-property name="mobileDescriptions"> <![CDATA[iOSMobile=/crsdocroot/content/mobile/images/homepage/web/moreheadLTD_art.jpg,iPhone=/crsdocroot/content/mobile/images/homepage/iPhone/moreheadLTD_art.jpg,iPhoneRetina=/crsdocroot/content/mobile/images/homepage/iPhone/[email protected],iPad=/crsdocroot/content/mobile/images/homepage/iPad/moreheadLTD_art.jpg,iPadRetina=/crsdocroot/content/mobile/images/homepage/iPad/[email protected]]]></set-property>
The mobileImages have placeholders for site and language since they are intended to be the overlay text, for
example “15% off!”:
<set-property name="mobileImages"> <![CDATA[iOSMobile=/crsdocroot/content/mobile/images/homepage/web/{site}/moreheadLTD_text_{language}.png,iPhone=/crsdocroot/content/mobile/images/homepage/iPhone/{site}/moreheadLTD_text_{language}.png,iPhoneRetina=/crsdocroot/content/mobile/images/homepage/iPhone/{site}/moreheadLTD_text_{language}@2x.png,iPad=/crsdocroot/content/mobile/images/homepage/iPad/{site}/moreheadLTD_text_{language}.png,iPadRetina=/crsdocroot/content/mobile/images/home page/iPad/{site}/moreheadLTD_text_{language}@2x.png]]>
</set-property>
The valid key device type values are defined on /atg/dynamo/servlet/dafpipeline/
MobileDetectionInterceptor and by default are:
iPad
iPadRetina
iPhone
iPhoneRetina
iOSMobile (CRS-M)
When the mobileImages values are retrieved via the derivedDeviceImage property, the current siteId
(mobileStoreSiteUS for example) is substituted for site and the current two character language code is
substituted for language. For example:
/crsdocroot/content/mobile/images/homepage/web/{site}/moreheadLTD_text_{language}.png
Could be coded as:
/crsdocroot/content/mobile/images/homepage/web/mobileStoreSiteUS/moreheadLTD_text_en.png
![Page 24: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/24.jpg)
20 6 Low Level Architecture – How Pages Work
Controlling Slider lists with productsHorizontalList.jsp
There are multiple places in the mobile application where lists of products are displayed in a slider.
Page Slider(s) Notes
Home Page Promotions slider (top
slider)
Object Type: atg.adapter.gsa.GSAItem
Rendered in: homePagePromotionalCell.jsp
Created in: promo.js
Promotion’s products
slider (bottom slider)
Rendered in: horizontal-list.js
Created in: horizontal-list.js
Product Details
Page
Related Items slider Object Type: atg.adapter.gsa.GSAItem
Rendered in: relatedProducts.jsp
Created in: products.js - initRelatedItemsSlider()
Recently Viewed Items
slider
Object Type: atg.adapter.gsa.GSAItem
Rendered in: recentlyViewed.jsp
Created in: cart.js -
initRecentlyViewedItemsSliderPanel()
Empty Cart Page Featured Items slider Object Type: java.util.HashMap$Entry
Rendered in: emptyCart.jsp
Created in: cart.js -
initFeaturedItemsSliderPanel()
Recently Viewed Items
slider
Object Type: atg.adapter.gsa.GSAItem
Rendered in: recentlyViewed.jsp
Created in: cart.js -
initRecentlyViewedItemsSliderPanel()
Category Landing
Page
Featured Items slider Object Type:
com.endeca.infront.cartridge.model.Record
Rendered in: HorizontalRecordSpotlight.jsp
Created in: global.js - initHorizontalListSlider()
Brand Landing
Page
Featured Items slider Object Type:
com.endeca.infront.cartridge.model.Record
Rendered in: HorizontalResultsList.jsp
Created in: global.js - initHorizontalListSlider()
![Page 25: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/25.jpg)
6 Low Level Architecture – How Pages Work 21
productsHorizontalList.jsp
The productsHorizontalList.jsp extracts product information and adds it to the slider in the correct
format, by itinerating over the list of products provided to it based on the object type.
This JSP also helps centralize and encapsulate the logic behind displaying products in a slider, which helps
remove unneeded code, simplifies the jsps, and makes them more readable.
parameters
productsHorizontalList.jsp expects the following input parameters:
Parameters Description Required
products This parameter contains a list of any of the product objects. The
page will then process the objects and display them based on
their type, either GSAItem or Endeca record.
Yes
index Specifies the index of the slider on the page. This is needed only
when there is more than one slider on the page. In that case
where there is only one slider on the page, the including page
can leave out this parameter and it will be defaulted to one.
No
Any page that needed to show a slider would include productsHorizontalList.jsp and specify these
parameters. For example:
<dsp:include page="${mobileStorePrefix}/global/gadgets/productsHorizontalList.jsp"> <dsp:param name="products" value="${contentItem.records}" /></dsp:include>
To adapt to this centralized approach, the following pages include productsHorizontalList.jsp:
• productDetails.jsp
• productDetailsContainer.jsp
• emptyCart.jsp
• recentelyViewed.jsp
• HorizontalResultList.jsp
Note: relatedProducts.jsp has been removed as it is no longer used.
Supporting JavaScript code
A single JS function:
(initHorizontalListSlider())
is used for creating the sliders in the app, except for the home page sliders.
![Page 26: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/26.jpg)
22 6 Low Level Architecture – How Pages Work
Structuring the Carousels
Mobile carousels are driven with Endeca cartridges and configured in Experience Manager. See the Commerce
Reference Store Overview for more information.
In its basic form (without styling or content), the homepage when rendered would appear as follows, where
there can be any number of <div> elements of class cell:
<div id="homeTopSlot"> <div id="homeTopSlotContent"> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> </div> <div id="circlesContainer"></div></div><div class="itemsContainer details"> <div id="horizontalContainer1"> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> ... </div> ...</div>
Populating the Sliders with Data
On document ready, the homepage uses jQuery to request the JSON targeter results from the JSP pages. You
can follow the execution flow starting with horizontal-list.js and the initHorizontalListSliders()
JavaScript function call in ProductsHorizontialList.jsp. Promotional content starts with promo.js and
the initPromoSlider() JavaScript function call.
The index.jsp calls the Invoke Assembler with /content/mobile/home.
The advantage of using a template is that it can be sent in the initial request and reduces the size of the payload
that the targeting JSP files need to send. This also makes it easier to switch between mechanisms for fetching
data, for example, from JSP files that produce JSON to components invoked through REST that produce JSON.
The client is expecting JSON in either case; so the format should remain the same.
Each cartridge has a JSP renderer
The promotional area is rendered with ScrollablePromotionalContent-ATGSlot.jsp
The products area is rendered with ScrollableProductSpotlight-ATGSlot.jsp
Performance Considerations
These PromotionalContent items have been specifically created for presentation on mobile devices. There
is no text embedded in the promotional content item images. PNG images with translucent backgrounds of
the same dimensions overlay the images rather than embedding text. This was done in order to attain a higher
level of compression without blurring the text. While this may not appear to be a best practice (for example,
images of text rather than actual strings) it allows for higher quality, crisper text and makes it possible to align
![Page 27: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/27.jpg)
6 Low Level Architecture – How Pages Work 23
the text over the images in exactly the required format for the cleanest appearance and hopefully the best first
impression to users of the homepage.
The products and promotionalcontent items are stored in the browser’s HTML 5 session storage cache. The
cache is currently used to store only the products that are not currently in view and to redraw the sliders during
orientation changes. The redraw is needed in order update properties on the JavaScript slider instance that
change due to the change in screen width, which is in turn due to the orientation change.
This caching is of course a performance optimization and in the current implementation the page empties the
cache on every load. However, this functionality could be extended to allow more aggressive caching between
browser sessions for better homepage performance, should a particular case be deemed suitable for such
behavior.
While jQuery was used in the creation of the homepage, none of the common/most popular third party touch-
specific frameworks were used in the creation of the homepage carousels. Not choosing a particular touch
framework frees implementers to use whichever mechanism is most suitable to their specific needs, while
providing an example of what can be done independently of such frameworks.
Extending the Sliders
Some configuration options have already been mentioned in the preceding sections with regard to caching
using HTML 5 session storage, modifying the personalized content through the appropriate targeters and
adding additional sliders. Here we will explore the details of the sliders’ implementation that are most pertinent
to customization of the sliders.
The JavaScript slider object contains all methods needed for a simple sliding carousel. Provided that the slider’s
HTML is structured correctly, very little code is required to create new carousels. Just one function needs to be
implemented in a new JavaScript literal notation object: “createSlidePanel” in sliders.js.
The slider object code takes advantage of a new feature in ECMAScript 5 called Object.create(). This
method allows the creation of an instance of both the base JavaScript slider object and a customized object
without code duplication. If one type of carousel already exists, just one call to Object.create() is required for
each instance on the page. Carousels can be of different sizes and can contain different numbers of objects.
CRS-M demonstrates two extensions to the base slider functionality – the promotional content item carousel
(the top 2/3 of the page) and the product carousel (the bottom 1/3 of the page).
For the promotional content item carousel, a <div> element was added to indicate the current page of
the carousel and the total number of pages in the carousel. This <div> element has an id attribute of
mobile_store_circlesContainer and is updated when the promotional content items carousel comes to a
stop, for example, on the touch end event.
For the product item carousel, a <div> element was added to display the product information
of the product located in the center of the carousel. This <div> element has an id attribute of
mobile_store_homeBottomSlotContent and is effectively injected with the information for the product that
is located in the center of the carousel when it comes to a stop.
For both carousels, the CSS attribute display is set to none for items that are not on the screen so that a screen
reader will not read off-screen content. To facilitate customizations such as this, the slider allows a JavaScript
callback function to be passed to it, which is invoked after the touch move or touch end event occurs (see the
postTouchEnd function in sliders.js). If you do not need a customization like this, you will not need to pass
a callback function to the slider.
A final note about the homepage is that it currently does not have a mechanism to handle the case where HTML
session storage is not available. Such behavior would be encouraged for mobile websites targeting a wider
range of devices and browsers than those targeted by CRS-M.
![Page 28: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/28.jpg)
24 6 Low Level Architecture – How Pages Work
Slider coding specifics
The hero images or promos slider is coded in promo.js which calls out to sliders.js and adds the circles
support. It writes its HTML to the #homeTopSlotContent <div> element.
The featured products slider code is in horizontal-list.js which calls out to sliders.js. . It writes its
HTML to the #horizontalcontainer{n} <div> element where {n} is the index of the slider.
Oracle Endeca Commerce driven Search and Browse
Category pages and search results pages are driven by Oracle Endeca Commerce and are configured in
Experience Manager. With this implementation, search and the browse functions are now tightly integrated. For
more information about the implementation of search, see the Commerce Reference Store Overview.
Mobile Cartridge Organization
The Default Browse Page uses the MobilePage template with no user segments specified and it applies at all
locations, as shown in the following figure:
![Page 29: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/29.jpg)
6 Low Level Architecture – How Pages Work 25
MobilePage template and result.
SecondaryContent
These are the cartridges used in SecondaryContent.
Cartridge Cartridge Type Shared
Cartridge
Description
Breadcrumbs Breadcrumbs - Breadcrumbs No The breadcrumbs appropriate
for the current navigation
state.
GuidedNavigation ContentSlot-Secondary -
Guided Navigation
Yes The guided navigation
container
MainContent
These are the cartridges used in MainContent.
Cartridge Cartridge Type Shared
Cartridge
Description
Results List Slot ContentSlot-Main - Results List Yes The results of the specified
query.
Search Adjustments SearchAdjustments - Search
Adjustments
No Displays search adjustments
messages such as “Did you
mean” or auto-corrections.
Category Page: This page uses the MobilePage template with a user segment of CategoryOnly for the
category/location feature, which serves to show only the category page when viewing a category. This
organization and the result is shown in the following figure:
![Page 30: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/30.jpg)
26 6 Low Level Architecture – How Pages Work
![Page 31: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/31.jpg)
6 Low Level Architecture – How Pages Work 27
MobilePage template organization for Category Page and result
SecondaryContent
This is the same as for the Default Browse Page.
MainContent
These are the cartridges used in MainContent.
Cartridge Cartridge Type Shared
Cartridge
Description
Category Products
Grid
ProductList-
ATGCategoryChildren -
Category Products Grid
No The child products of the current
category
Featured Items ContentSlot-Main -
Featured Items
Yes The items to be displayed as featured
items
Side-by-side Comparison
Both CRS-M and the Commerce Reference Store desktop version create default browse and category pages.
They use separate, shared instances of the same cartridges to construct the page definitions, as shown in the
following figures.
CRS-M and Commerce Reference Store compared
![Page 32: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/32.jpg)
28 6 Low Level Architecture – How Pages Work
Category Page organization for CRS Desktop
Category Page organization for CRS-M
Default Browse Page Configuration
Within the Default Browse Page definition there is a MainContent section that includes a single ContentSlot-
Main cartridge instance, called Results List, which renders the products that are appropriate for the shopper’s
current navigation state. This Endeca content slot gets its content from the /content/Shared/Results List content
collection. The Results List content collection has an item called Default Results List, which is returned for all
locations. The Default Results List item gets its contents from a ResultsList cartridge that has been configured
with Experience Manager to return a default 12 records per page.
Using Shared Cartridges
The advantage of sharing cartridges across Commerce Reference Store and CRS-M is that the same content is
reused. For example, cartridges can be shared for reuse across different channels where the merchandiser wants
![Page 33: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/33.jpg)
6 Low Level Architecture – How Pages Work 29
the same content on both channels for a more consistent cross channel user experience. In the example in the
following figure, the Featured Items cartridge in the Shared folder is used both in Commerce Reference Store
and CRS-M.
Using a shared cartridge
Dimensions
CRS-M uses dimensions to provide search refinement functionality. Dimensions are used to filter search results
based on the properties of items in the result set, for example, price, feature, or color. The following illustration
shows the search results screen with the “Filter” choices selected.
![Page 34: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/34.jpg)
30 6 Low Level Architecture – How Pages Work
Results Screen with “Filter” Option
Category Page
The Category Page displays like simple browse page. However, the browse page data comes from the Endeca
MDEX engine, and the category page receives data through an ATG CategoryLookup droplet. You configure
this page in Experience Manager by selecting Mobile, Web Browse Pages, Category page, and choosing the
“CatalogOnly” user segment.
When the shopper selects the Category Browse button and arrives at the main filter page the system displays
the standard text “Filter by:” above all dimension groupings.
See the Commerce Reference Store Overview for more information on the Category Page feature.
Differences between Commerce Reference Store and CRS-M with regard to Search and
Dimensions
CRS-M uses the same ResultsList (for search results) and GuidedNavigation cartridges as Commerce Reference
Store, and does not modify their behavior, instead providing mobile-specific renderers.
Endeca Guided Navigation - Issues that are unique to mobile
In Commerce Reference Store the guided navigation controls display in the left column of the page and the
search results in the right column of the page, while in CRS-M, they are “one behind the other,” meaning that
![Page 35: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/35.jpg)
6 Low Level Architecture – How Pages Work 31
CRS-M is either showing guided navigation or search results, and they toggle back and forth when the user
selects “filter” or “done”. In this way, the shopper sees one screen at a time instead of both side by side, but
with the data always present. Technically, CRS-M is either displaying guided navigation (SecondaryContent
cartridges) or search results (MainContent cartridges).
CRS-M Categories
![Page 36: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/36.jpg)
32 6 Low Level Architecture – How Pages Work
Empty Result Set Screen
Mobile JSP renderers for cartridges
The JSP renderers for the cartridges that are used in Commerce Reference Store are located in the store.war
directory. The path to each JSP renderer follows this convention:
store.war/mobile/cartridges/cartridge-type/cartridge-type.jsp
For example, the path to the Breadcrumbs cartridge renderer is:
store.war/mobile/cartridges/Breadcrumbs/Breadcrumbs.jsp
Each renderer has its own directory, so that associated content (sub-pages, images, and so on) can be grouped
together, making it possible for renderers to be packaged as stand-alone units. When you give each renderer a
unique name it makes it easier to distinguish one file from another during various development tasks.
Cartridges unique to mobile
Cartridges that are unique for mobile are:
![Page 37: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/37.jpg)
6 Low Level Architecture – How Pages Work 33
• Mobile Page
• HorizontalResultsList
• Media Banner
• Search Adjustments
MobilePage
MobilePage.jsp is the main page template for mobile, the category page, and all of the mobile Endeca-driven
pages. This is the page that displays the search result or the guided navigation filter. Other cartridges can be
added to this template in Experience Manager.
store.war\mobile\cartridges\MobilePage\MobilePage.jsp
HorizontalResultsList
HorizontalResultsList.jsp renders a results list horizontally inside a touch slider. The slider contains
the number of records per page that is specified in the cartridge and provides a left and right arrow, where
appropriate, for the user to navigate through pages. This cartridge is currently used in the Style by Zhanna brand
landing page to showcase all products for this brand sorted by price descending.
store.war\mobile\cartridges\HorizontalResultsList\HorizontalResultsList.jsp
MediaBanner
MediaBanner.jsp displays the media image that was specified in the cartridge. It also makes the image a
hyperlink, if a URL was specified in the cartridge. This cartridge is currently used in the Style By Zhanna brand
landing page to display an ad for the brand along with its logo.
store.war\mobile\cartridges\MediaBanner\MediaBanner.jsp
SearchAdjustments
SearchAdjustments.jsp renders corrections and suggestions made to the search term to enhance search
results.
store.war\mobile\cartridges\SearchAdjustments\SearchAdjustments.jsp
This cartridge supports two important features:
• Auto-correct: Instead of letting the MDEX silently correct terms that returns zero results, the Search
Adjustment cartridge displays a message to the user letting them know that their search term has been auto-
corrected.
• Did you mean?: If a search term returned very few results while other similar terms return more results, this
renderer displays these alternative search terms to the user and allows them to modify their original search by
simply clicking on one of those terms.
Auto suggest
The auto suggest function offers the shopper a type ahead set of suggestions based on their current entry. For
example, after typing “sty”, several likely options display:
![Page 38: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/38.jpg)
34 6 Low Level Architecture – How Pages Work
Auto suggest
Auto suggest implementation
Auto suggest is configured using three cartridge xml files:
/Storefront/deploy/cartridge_templates/MainContent-SearchAdjustments.xml
/Storefront/deploy/cartridge_templates/AutoSuggestPanel-AutoSuggestPanel.xml
/Storefront/deploy/cartridge_templates/AutoSuggest-DimensionSearchAutoSuggestItem.xml
In Experience Manager, there is a shared Auto Suggest Panels content collection. In the content collection’s
summary panel, you will see that by default, location is set to “apply at all locations”. Click on the Default Auto
Suggest Panel on the left navigation panel to see more configuration options. A small number of dimensions
that are specified by default display in the auto suggest panel. There is this related renderer:
/Storefront/j2ee-apps/Storefront/store.war/mobile/cartridges/SearchBox/SearchBox.jsp
SearchBox.jsp renders a search box which allows the user to query for search results and also displays the
search adjustments in a drop-down list.
![Page 39: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/39.jpg)
6 Low Level Architecture – How Pages Work 35
AutoSuggest and categories
In CRS-M only brand and product features are enabled for auto-suggest because of situations where the
shopper could be displayed suggestions in a language they were not expecting.
Auto correct and “Did you mean?“
The auto correct function is enabled at the MDEX level, and it is “on” by default. If a search is auto-corrected, the
shopper sees a message, for example:
Auto Correct
Using this example, when we search for “sheo,” it is auto corrected to “shoe”. In the response JSON, we can see:
"MainContent": [ { "enabled": true, "originalTerms": ["sheo"], "@type": "SearchAdjustments", "name": "Search Adjustments", "adjustedSearches": {"sheo": [{ "adjustedTerms": "shoe",
![Page 40: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/40.jpg)
36 6 Low Level Architecture – How Pages Work
"autoPhrased": false, "class": "com.endeca.infront.cartridge.model.AdjustedSearch", "spellCorrected": true }]} },
If we examine:
/Storefront/j2ee/store.war/mobile/cartridges/SearchAdjustments/SearchAdjustments.jsp
We can see that Commerce Reference Store checks contentItem’s adjustedSearches property,
contentItem.adjustedSearches, and if it is not empty, it displays a message in the format of: “Your search
for X was adjusted to Y”:
<c:if test="${not empty contentItem.adjustedSearches || not empty contentItem.suggestedSearches}"> <div class="SearchAdjustments"> <%-- Search adjustments --%> <c:forEach var="originalTerm" items="${contentItem.originalTerms}" varStatus="status"> <c:if test="${not empty contentItem.adjustedSearches[originalTerm]}"> <fmt:message key="mobile.search.adjust.description"><fmt:param><span>${originalTerm}</span></fmt:param></fmt:message> <c:forEach var="adjustment" items="${contentItem.adjustedSearches[originalTerm]}" varStatus="status"> <span class="autoCorrect">${adjustment.adjustedTerms}</span> <c:if test="${!status.last}">, </c:if> </c:forEach> </c:if>
In the second half of SearchAdjustments.jsp, we can see how the “Did you mean?” feature is implemented:
<%-- "Did You Mean?" --%> <c:if test="${not empty contentItem.suggestedSearches[originalTerm]}"> <div class="DYM"> <fmt:message key="mobile.search.adjust.didYouMean"> <fmt:param> <c:forEach var="suggestion" items="${contentItem.suggestedSearches[originalTerm]}" varStatus="status"> <a href="${siteBaseURL}${suggestion.contentPath}${suggestion.navigationState}">${suggestion.label}</a> <c:if test="${!status.last}">, </c:if> </c:forEach> </fmt:param> </fmt:message> </div> </c:if> </c:forEach> </div> </c:if>
Did you mean?
In another typing error scenario, if the shopper searches for “srop,” the app displays a “Did you mean” message:
![Page 41: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/41.jpg)
6 Low Level Architecture – How Pages Work 37
Did you mean?
When we look at the response JSON, we see three suggested searches for “srop”:
"MainContent": [ { "enabled": true, "originalTerms": [ "truck" ], "@type": "SearchAdjustments", "name": "Search Adjustments", "suggestedSearches": { "truck": [ { "contentPath": "/browse", "count": null, "@class": "com.endeca.infront.cartridge.model.SuggestedSearch", "label": "brick", "navigationState": "?Dy=1&Nf=product.startDate%7CLTEQ+1.3794624E12%7C%7Cproduct.endDate%7CGTEQ+1.3794624E12&Nr=AND%28product.priceListPair%3AsalePrices_listPrices%2Cproduct.language%3AEnglish%2COR%28product.siteId%3AstoreSiteUS%29%29&Ntp=0&Ntt=brick&Nty=1&_D%3AsiteScope=+&format=JSON&siteScope=ok",
![Page 42: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/42.jpg)
38 6 Low Level Architecture – How Pages Work
"autoPhrased": false, "siteRootPath": "/pages", "spellCorrected": true }, { "contentPath": "/browse", "count": null, "@class": "com.endeca.infront.cartridge.model.SuggestedSearch", "label": "try", "navigationState": "?Dy=1&Nf=product.startDate%7CLTEQ+1.3794624E12%7C%7Cproduct.endDate%7CGTEQ+1.3794624E12&Nr=AND%28product.priceListPair%3AsalePrices_listPrices%2Cproduct.language%3AEnglish%2COR%28product.siteId%3AstoreSiteUS%29%29&Ntp=0&Ntt=try&Nty=1&_D%3AsiteScope=+&format=JSON&siteScope=ok", "autoPhrased": false, "siteRootPath": "/pages", "spellCorrected": true } ] } },
If you examine the JSP you can see that the code executes when there are “Did you mean?” and suggested items
or search adjustments:
<dsp:page> <dsp:importbean bean="/OriginatingRequest" var="originatingRequest"/> <dsp:getvalueof var="contentItem" vartype="com.endeca.infront.assembler.ContentItem" value="${originatingRequest.contentItem}"/>
<c:if test="${not empty contentItem.adjustedSearches || not empty contentItem.suggestedSearches}"> <div class="SearchAdjustments"> <%-- Search adjustments --%> <c:forEach var="originalTerm" items="${contentItem.originalTerms}" varStatus="status"> <c:if test="${not empty contentItem.adjustedSearches[originalTerm]}"> <fmt:message key="mobile.search.adjust.description"><fmt:param><span>${originalTerm}</span></fmt:param></fmt:message> <c:forEach var="adjustment" items="${contentItem.adjustedSearches[originalTerm]}" varStatus="status"> <span class="autoCorrect">${adjustment.adjustedTerms}</span> <c:if test="${!status.last}">, </c:if> </c:forEach> </c:if>
<%-- "Did You Mean?" --%> <c:if test="${not empty contentItem.suggestedSearches[originalTerm]}"> <div class="DYM"> <fmt:message key="mobile.search.adjust.didYouMean"> <fmt:param> <c:forEach var="suggestion" items="${contentItem.suggestedSearches[originalTerm]}" varStatus="status"> <a href="${siteBaseURL}${suggestion.contentPath}${suggestion.navigationState}">${suggestion.label}</a> <c:if test="${!status.last}">, </c:if> </c:forEach> </fmt:param>
![Page 43: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/43.jpg)
6 Low Level Architecture – How Pages Work 39
</fmt:message> </div> </c:if> </c:forEach> </div> </c:if></dsp:page>
We can see what the JSP is looking for:
contentItem.suggestedSearches[originalTerm]
which corresponds to:
suggestedSearches[srop]
and returns the three items for strap, step and trip which we saw in the JSON response.
The “Did you mean?” function is part of the search adjustments cartridge and is enabled by default once you
begin using the search adjustments cartridge.
Dimensions included in auto suggest
Not every dimension is included in auto suggestion. The table below shows which are and which are not. For
example, a shopper entering a color would not see suggestions displayed.
Dimension Included in Auto Suggest
color No
size No
wood finish No
Type No
Brand Yes
catalog id No
Category No
Disallowasrecommendation No
Sku.siteid No
product.feature.Displayname Yes
Language No
Nonreturnable No
Pricelistpair No
Product.siteid No
![Page 44: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/44.jpg)
40 6 Low Level Architecture – How Pages Work
Brand Landing Page
Brand landing pages have become a very popular way for retailers to:
• Showcase products from a certain brand on one dedicated page of the web or mobile site
• Help the shopper find disparate products from that brand from a dedicated landing page without the
shopper having to individually refine or search for items from that brand
• Meet marketing, sales, or other special arrangements retailers may have made with certain brands
For example, the CRS-M “Style by Zhanna” brand landing page:
Brand Landing Page
![Page 45: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/45.jpg)
6 Low Level Architecture – How Pages Work 41
The CRS-M BLP Filter view
For more information about implementation of the Brand Landing page, see the Commerce Reference Store
Overview.
Category Landing Page
In this design implementation, any path the shopper takes that is purely category-driven navigates them to the
Category page. For example, if the shopper clicks on a top-level category in the main menu on CRS Mobile Store
they are taken to that category’s page.
![Page 46: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/46.jpg)
42 6 Low Level Architecture – How Pages Work
Category landing Page
For more information about implementation of the Category Landing page, see the Commerce Reference Store
Overview.
Shopping Cart (not Endeca-driven)
The CRS-M shopping cart page contains the information and features common to most cart pages. As
discussed in the “User Experience Design” section, this page was designed to allow individual rows in the cart
(representing products) to be expanded downwards when the user touches them. When a row is touched and it
expands downwards, the user is presented with these options:
• Email the product to a friend
• Remove the item from the cart
• Change the item in the cart
![Page 47: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/47.jpg)
6 Low Level Architecture – How Pages Work 43
In addition to displaying the items in the cart as these expanding rows, the order summary information is
displayed, as well as a text box for entering a coupon code.
Structure
The top-level cart JSP can be found at /Storefront/j2ee/store.war/mobile/cart/cart.jsp. This JSP
supports:
• An empty cart (emptyCart.jsp)
• A cart containing one or more items (cartContent.jsp).
The cart.jsp file also contains the code that creates the “modal” effect when the user chooses to either email
an item or remove an item from the cart. The associated CSS and JavaScript can be found in /Storefront/
j2ee/store.war/mobile/css/base.css and /Storefront/j2ee/store.war/mobile/js/atg/cart.js
respectively.
Empty Cart
To make an empty cart page more engaging to users, a horizontal slider similar to that on the homepage is
displayed towards the bottom of the cart page. It contains “featured products,” which are products that are
returned by the existing Commerce Reference Store featured product targeters. They are displayed in a “slider”
which is a new instance of the “slider” used on the homepage. The following illustration shows an empty cart
with the featured products slider.
![Page 48: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/48.jpg)
44 6 Low Level Architecture – How Pages Work
Empty Cart Page with Featured Items Slider
While inspecting cart.js and other JavaScript files in CRS-M, it is worth noting that the CRS-M build script (not
distributed as part of CRS-M) combines individual JavaScript files into one mobile.js file. This is discussed later
in the Performance Considerations (page 63) section, but the rationale is simply to minimize the number of
server calls for data such as JavaScript and CSS files, hence improving the performance of the application. A
consequence of this is that code in cart.js has access to variables declared in other JavaScript files that are
combined into mobile.js as part of the CRS-M build. The sliders variable used in the creation of the featured
products slider is one such example.
Cart Containing Items
In the case where the cart contains one or more items, cartContent.jsp uses /Storefront/j2ee/
store.war/mobile/cart/gadgets/cartItems.jsp to display the items in that cart. This in turn uses
/Storefront/j2ee/store.war/mobile/cart/gadgets/cartItem.jsp to display individual items
in the cart. Since CSS and JavaScript are externalized as much as possible here, as in all areas of CRS-M, the
details of how the data is displayed once it has been retrieved using traditional page code can be found in
Mobile.css and cart.js. The cartItem CSS class is responsible for styling an item in the cart, while the
showCartItemEditBox JavaScript function makes an item in the cart (a “row” of the cart) “touchable.”
Actions on a Cart Item
When the user touches an item in the cart, the row containing that item expands downwards to become slightly
larger, and the image of the item is enlarged and moved to the background. Additional options for emailing this
item to a friend, removing this item from the cart, or changing this item are also presented when the cart item is
touched.
If the user chooses to either email the item or remove the item from the cart, the chosen option becomes modal
in the foreground while the background is darkened. As mentioned above, the code for this behavior is located
in the top-level cart.jsp.
If the user chooses to change the item, he/she is returned to the product details page and that particular item is
displayed. Once a change has been made, the button text changes to “Back to Cart,” and touching this button
will take the user to the cart page once again where the most recent changes will be reflected. The following
illustration shows a cart containing two items, one of which has been selected for editing.
![Page 49: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/49.jpg)
6 Low Level Architecture – How Pages Work 45
Ready to edit an item in the cart
The following illustration shows the modal “Delete” popup that is displayed when the user touches the Delete
button.
![Page 50: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/50.jpg)
46 6 Low Level Architecture – How Pages Work
The modal “Delete” popup
Order Summary Information
Displayed below the cart items on the cart page is the order summary information, such as the cart/order total,
discounts applied, shipping cost, taxes etc. In our example, the coupon “TENSHIP” has been applied to the order.
The logic for displaying this summary information is encapsulated within:
/Storefront/j2ee/store.war/mobile/global/gadgets/orderSummary.jsp
which in turn includes:
/Storefront/j2ee/store.war/mobile/global/gadgets/promotionCode.jsp
that contains the logic for applying a coupon code to the order.
Order History and Returns
Historical orders and return history are supported in CRS-M in a similar fashion as in Commerce Reference Store,
using a JSP:
![Page 51: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/51.jpg)
6 Low Level Architecture – How Pages Work 47
<home>\ATG11.0\CommerceReferenceStore\Store\Storefront\j2ee-apps\Storefront\store.war\mobile\myaccount\myOrders.jsp
<home>\ATG11.0\CommerceReferenceStore\Store\Storefront\j2ee-apps\Storefront\store.war\mobile\myaccount\orderDetail.jsp
<home>\ATG11.0\CommerceReferenceStore\Store\Storefront\j2ee-apps\Storefront\store.war\mobile\myaccount\myReturns.jsp
<home>\ATG11.0\CommerceReferenceStore\Store\Storefront\j2ee-apps\Storefront\store.war\mobile\myaccount\returnDetail.jsp
Not Yet Supported
As mentioned in “Feature Comparison with Commerce Reference Store”, gift wrap is not supported by CRS-M in
this release. This means that the option to add gift wrap is not presented to the user during the checkout flow.
Should a user start adding items, including giftwrap, to his/her cart via Commerce Reference Store, and then
switch over to CRS-M to view the cart before completing the checkout process, gift wrap items will not display
on the CRS-M cart.
Product Details Page
The product details page of CRS-M displays a large product image that can be further enlarged by touch, drop-
down menus for SKU selection, a product description and two horizontal sliders containing related products and
recently viewed products, where available. The following illustration shows the product details page displaying a
clothing SKU.
![Page 52: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/52.jpg)
48 6 Low Level Architecture – How Pages Work
Product Details page displaying Clothing SKU
The product details page should be flexible enough to display many different types of product and SKU. Since it
is an essential component in the flow of a commerce application, additional goals set out for the page were for
it to be intuitive and performant. The task of achieving these goals presented an interesting design choice: while
the general product data needed to be available upon page load (performant), SKU configuration information
(price, availability) was only relevant once that SKU had been selected (intuitive). In keeping with Commerce
Reference Store’s design, the initial design iteration called for loading such information via AJAX only after a SKU
had been selected by the user.
However, this became a performance issue in the mobile environment where round trips to the server are often
the most expensive operation. While waiting for data from the server on SKU selection, the UI of the product
details page would be in an indeterminate state until the AJAX request was complete. For this reason it was
decided to use a design similar to the homepage whereby all SKU data for the given product was fetched on
the initial page load. This would increase initial load time slightly but eliminate awkward UI pauses during SKU
selection, caused by multiple server round trips.
Architecture
The architecture is described in the following section.
![Page 53: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/53.jpg)
6 Low Level Architecture – How Pages Work 49
Client-Server Interaction
The product details page was designed to minimize the number of round trips to the server. All information
pertaining to a given product such as prices and features of the product’s child SKUs, is loaded immediately with
the rest of the page. Subsequent round trips to the server require the user’s input and as such cannot be further
optimized, for example, adding an item to the shopping cart.
Product Configuration Data
All data associated with a product’s child SKUs is rendered by /mobile/browse/json/getSkuJSON.jsp. This
data is then processed during the jQuery ‘ready’ event, and transformed into event handlers that close over the
SKU data and DOM elements that will be modified as the user makes their selections. The resulting functions
are highly optimized, as any calculations that do not depend on the execution context have been abstracted to
the ‘ready’ event and bound in local scope. The following illustration shows the same product while the user is
selecting a size.
Selecting a Size
Page Hierarchy
The user arrives at the product details page by clicking a link to a product. When such a link is generated, it
points to one of four template pages:
![Page 54: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/54.jpg)
50 6 Low Level Architecture – How Pages Work
1. productDetailColorSizePicker.jsp: for products with color and size properties
2. productDetailSingleSku.jsp: for products with only a single SKU
3. productDetailMultiSku.jsp: for products with multiple unique SKUs
4. productDetailWoodFinishPicker.jsp: for products with the “wood finish” property
Each of these template pages is responsible for deriving an appropriate set of parameters that are passed to
productDetail.jsp and used to render the page:
• product: the product being viewed (required)
• picker: the appropriate picker for the product (required – see section “Pickers – JSP”)
• selectedSku: the currently selected SKU
• selectedQty: the currently selected quantity
• selectedColor: the currently selected color
• selectedSize: the currently selected size
• availableSizes: all available sizes for the product
• availableColors: all available colors for the product
• oneSize: true if the product has exactly one size
• oneColor: true if the product has exactly one color
• ciId: the commerce item being edited
The only required parameters are product and picker; the rest may be derived depending on what is appropriate
for the given product. For example, productDetailColorSizePicker.jsp derives all of the parameters listed
above, whereas productDetailMultiSku.jsp only derives product, picker, selectedSku, selectedQty,
and ciId, as those are the only parameters that pertain to multi-SKU products. Additional template pages and
their required parameters could be easily added here to customize or modify CRS-M’s product details page to
your specifications.
Once the correct parameters have been passed to productDetail.jsp, it utilizes the mobilePageContainer
tag (see “Common Elements”) to include the SKU data (/mobile/browse/json/getSkuJSON.jsp),
page content (/mobile/browse/productDetailsContainer.jsp), out-of-stock notification form (/
mobile/browse/gadgets/emailMeForm.jsp), related items slider (/mobile/global/gadgets/
productsHorizontalList.jsp), and—depending on the context—either the add-to-cart form (/
mobile/browse/gadgets/addToCartForm.jsp) or update cart form (/mobile/browse/gadgets/
updateCartForm.jsp).
The following illustration shows the product details page displaying a single SKU item:
![Page 55: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/55.jpg)
6 Low Level Architecture – How Pages Work 51
A Single SKU Product
Pickers - JSP
The term “pickers” is used within CRS-M to refer to the SKU selectors, that is the pickers that are seen on the
product details page. In terms of page code, the term “pickers” refers to a JSP that can display those SKU
selectors.
The picker parameter passed to productDetail.jsp (see above) is a string representing the relative
path of the JSP that should be used to render the pickers for the given product. Although this path can
point to any JSP on the site, there are two picker JSPs included with CRS-M: colorSizePickers.jsp and
multiSkuPicker.jsp. It is worth noting that there is not a one-to-one correspondence from product details
template JSP to picker JSP as two of the template pages—wood finish and color/size—can use the same picker,
and single-SKU products do not require any pickers.
Similarly to the product details template JSPs, each picker JSP is also a template. They each derive the
appropriate parameters to then pass to the generalized pickerList.jsp, which renders a generic picker.
Currently, pickerList.jsp accepts the following parameters:
• collection: the collection of picker items to render
• valueProperty: the name of the item property that should be used as the picker ‘value’
![Page 56: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/56.jpg)
52 6 Low Level Architecture – How Pages Work
• type: a string used to identify this picker, which must correspond to exactly one of the values passed to
‘pickerSelectFunction in product.
• callback: the JavaScript function to call when the picker value has changed
• id: the DOM id of the picker
• selectedValue: the currently selected value
• disabled: disables the picker
• defaultLabel: the default label to display when no value has been selected
• labelProperty: the name of the item property that should be use as the picker ‘label’. If not specified, the
valueProperty is used.
Again, you can extend this to add additional picker JSPs and render modified or additional pickers for your
purposes.
Pickers – HTML and CSS
The generated markup for the pickers is intentionally simple. An individual picker is of the following form:
<label for="${id}" …> <select id="${id}" …> <!-- Default option --> <option value="" label="${defaultLabel}" disabled/> <option value="…" label="…"/> … </select></label>
It is worth noting that the select control is nested inside its own label. This was included primarily for
accessibility considerations, as every form control must have an associated label.
CSS styles are applied to the select control to customize its appearance while utilizing the browser’s native
<select> element functionality. This greatly reduced the amount of work that would have been necessary to
create a completely custom select control without sacrificing the desired functionality.
Pickers – JavaScript
As noted above, all functions necessary for picker functionality are created and bound when the page loads.
These functions are members of the skuFunctions object, which follows the JavaScript “module” pattern. The
signature of the skuFunctions “module” is as follows:
• cartLinkClick: Called when the “Add To Cart” button is clicked. This function either updates the cart or
adds a new item to the cart, depending on the current context.
• emailMe: Called when a SKU is out of stock. This function displays a modal dialog that offers to notify the user
when the item is back in stock.
• emailMeSubmit: Called when the form in the aforementioned modal dialog is submitted. This function
executes an AJAX request that submits the form and depending on the content that the user has entered,
either flags invalid fields or shows a confirmation dialog.
![Page 57: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/57.jpg)
6 Low Level Architecture – How Pages Work 53
• outOfStock: Called when an out-of-stock SKU is selected. This function updates the displayed price, the text
on the “Add To Cart” button, and the hidden SKU id field in the aforementioned email notification form.
• colorSizePickerSelect, multiSkuPickerSelect, woodFinishPickerSelect: These functions
are called when a picker value has been updated. They all use the same module-local function,
pickerSelectFunction, which updates the displayed price, checks the availability of the selected SKU, changes
the text displayed on the “Add To Cart” button (if necessary), and sets the hidden SKU id field in the add-to-
cart form. The only difference between these functions is a string that fixes which type of SKU to look for –
color/size, multi-sku, or wood finish.
• quantitySelect: This function is called when the value of the quantity picker has been updated. It updates
the quantity field of the add-to-cart form and, if necessary, changes the text on the “Add To Cart” button.
• available, preorder, backorder: These functions are used to generate appropriate function closures,
which are then associated with a given SKU during the data-loading step described in the section “Product
Configuration Data.”
Again, these functions can be modified or additional functions added in order to meet your requirements.
Paired Sites
This feature supports two-way connections between sites. For example, if a shopper entered the CRS Store’s
desktop URL on their mobile device, they would be correctly re-directed to the mobile CRS Store site. If the
shopper shared an item with a friend using the Email A Friend feature while on their mobile device, then the
URL that is sent in the email should be pointing to the product on the CRS Store Desktop site rather than the
mobile site. The paired sites mapping helps the shopper view the correct version for their device by allowing the
application to know which URL to display in which situation.
The paired sites concept is used in CRS mobile for the MobileDetectionInterceptor component as a way to
find a corresponding mobile site by a known non-mobile Commerce Reference Store site and vice versa.
A site is identified as “full CRS” when the “channel” property is “desktop”. All other values are considered not to
be “full CRS” identifiers. For example, a “channel” value of “mobile” is used to identify a mobile site.
The “channel” property is defined in the sites.xml file.
The MobileDetectionInterceptor uses the “paired sites” information and the site “channel” property value
for redirection between mobile and non-mobile sites when a mobile user agent performs a request with non-
mobile site URL or non-mobile (desktop) user agent requests a resource from a mobile site.
Site pairs are defined in the sites.xml files for each “CRS mobile” submodule using special site groups with the
crs.MobileSitePairs shareable type. Each site group with the crs.MobileSitePairs shareable type joins
together a “full CRS” and corresponding mobile site, thus “pairing” the mobile and non-mobile sites.
For example, the CRS mobile sites.xml file defines the following sites group:
<add-item item-descriptor="siteGroup" id="sitesUS"> <set-property name="displayName"><![CDATA[Sites (US)]]></set-property> <set-property name="sites"><![CDATA[storeSiteUS,mobileStoreSiteUS]]></set-property> <set-property name="shareableTypes"><![CDATA[crs.MobileSitePairs]]></set-property> </add-item>
In this example, the MobileDetectionInterceptor component redirects a mobile user agent that requests
the storeSiteUS site to the mobileStoreSiteUS site.
![Page 58: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/58.jpg)
54 6 Low Level Architecture – How Pages Work
Common Elements
There are several UI elements that are reused throughout the CRS-M. Here we will examine the most important
of these.
Navigation and the Custom MobilePageContainer.tag
As in Commerce Reference Store, all pages in CRS-M are enclosed within a “page container”. This custom tag
automatically includes the content common to every page, including JavaScript and CSS imports, as well as
common page elements such as the header and footer.
The tag accepts:
• A string parameter—titleString—that represents the title of the current page
• A page fragment parameter—modalContent—that renders content that may be displayed in a custom
modal dialog
• A Boolean-valued parameter—displayModal—that flags the modal content to be visible immediately upon
page load
Modal Content
The structure of each page that is imposed by the page container tag requires that modal content be specified
separately from other page content to ensure full compatibility with the rest of the site. Specifically, CSS
constraints require that in order for modal content to display correctly in front of the page content, it must
be separated from that content. The following example shows what is meant by “modal content”, that is, the
Contact Us menu is modal in this case.
<body><div id="pageContainer"><div id="header"><div class="storeContainer"><div id="homeTopSlot"><div id="homeBottomSlot" style="overflow: hidden;"><script type="text/javascript"></div><div id="footer"><div id="modalOverlay" onclick="CRSMA.global.toggleModal(false);" style="display: none;"></div></body>
Additionally, the JavaScript function toggleModal is provided to automate the process of displaying and
hiding modal content. By default, when toggleModal is used to show the modal content, it only affects the
visibility of the mobile_store_modalOverlay <div>. Any modal content that needs to be displayed
must have its visibility set separately in order to be displayed when toggleModal is called. Conversely, when
toggleModal is called to hide modal content it will also modify the visibility of all the immediate children of the
mobile_store_modalOverlay <div>, setting the CSS display property to “none”, in order to reset the state
of the modal display. The following illustration shows an example of what is meant by “modal content”, that is,
the Contact Us menu is modal in this case.
Header
The header consists of four components. From left to right, they are: the store logo, the search bar, the browse
button, and the cart button. With the exception of the search bar, touching any of these components takes the
![Page 59: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/59.jpg)
6 Low Level Architecture – How Pages Work 55
user to the appropriate page (the homepage for the store logo, the user’s shopping cart for the Cart button, and
the Refinement menus for browse button).
Touching the Search bar causes it to expand, at which point the user may enter a search query. Once the search
query is submitted, the user is taken to the Search Results page.
Additionally, when there are items in the Cart, a small badge will appear on the Cart button denoting the
number of items in the cart.
Footer
The footer contains the site copyright as well as useful links for the user. Touching the “Contact Us” area displays
phone and email options, both of which will handoff to the device’s native functionality for making calls or
composing email, as shown in the following illustration.
Contact Us Popup
Touching the “Stores” area takes the user to the Stores page, which lists retail locations for the current site, as
shown in the following figure.
![Page 60: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/60.jpg)
56 6 Low Level Architecture – How Pages Work
Stores Page
Touching the “More” area takes the user to a page containing other useful options, including the My Account
area, viewing the store’s privacy policy, and selecting a language, as shown in the following figure. CRS-M does
not provide map integration out of the box, but implementers can choose and incorporate their chosen map
service here.
![Page 61: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/61.jpg)
6 Low Level Architecture – How Pages Work 57
“More” Area
User Experience (UX) Design
Principles
As with all other aspects of CRS-M, its UX design is intended as an example of how to approach the UX design of
a mobile site. It can be customized or adapted to meet specific business needs.
Much thought and effort has been invested in the UX design of CRS-M. Some of the most important goals
included:
• Providing a distinct mobile-specific UI
• Optimizing that UI for mobile browsers
• Ensuring that the UI’s navigation is intuitive to users of touchscreen devices
![Page 62: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/62.jpg)
58 6 Low Level Architecture – How Pages Work
• Enabling speedy checkout
In order to achieve these goals, many aspects of the shopping experience were revisited and many design
principles were adapted to apply specifically to the mobile environment. During the UX design process, the
following traits emerged as desirable for mobile UIs:
• Simple
• Utilitarian
• User-centric
• Different from desktop
Simple
It was found that the task of simplifying a desktop UI for use on a mobile device was relatively easy up to a
point, but realizing this goal to the point that user expectations were met required significant additional effort.
In the mobile environment where space is limited, every task has to be sufficiently clear so that task-specific
instructions are not necessary.
Several aspects of the CRS-M UI and underlying architecture are designed with speed in mind. These are
discussed in each section as applicable and specifically in the section entitled Performance Considerations (page
63).
Utilitarian
CRS-M’s design is currently search-driven rather than browse-driven. Furthermore, the search process aims to
reduce the number of server roundtrips in order to speed up this process.
The “refine” process allows the user to refine their search results, while the facets that are used to perform this
refinement provide users with the opportunity to see how the catalog is organized. The search and refinement
process is discussed in detail in the section Oracle Endeca Commerce driven Search and Browse (page 24).
Also a utilitarian trait, CRS-M aims to keep the number of form fields to a minimum in order to reduce the
amount of manual input required by users. Required fields are not explicitly flagged, as all fields displayed are in
fact required. This eliminates the need for the user to distinguish between required and optional fields.
It is worth noting that making a UI more utilitarian does not necessarily mean adding more powerful features,
but rather may mean removing anything that is not directly useful to the user in order to complete the task at
hand.
User-Centric
In the case of CRS-M, user centricity was interpreted as the need to make the process of purchasing an item
using CRS-M as simple as possible. This is particularly evident in the checkout flow of the application, where
checkout is significantly expedited for logged-in users. User centricity also drove the provision of clear decision
points, more pre-populated fields and fewer input fields where possible.
Different from Desktop
Desktop and mobile UIs differ not only in their dimensions but also in the physical environments in which users
interact with them. Desktop UIs are typically interacted with from a laptop or desktop computer, which by
nature implies a stationary physical location. Mobile UIs by their nature can be interacted with in a variety of
physical locations (as discussed in the “Simple” section).
Desktop UI paradigms do not always apply directly to touchscreen devices. Since CRS-M’s UI is targeted at
touchscreen devices, its UI takes advantage of this more discovery-centric environment, that is, gestures are
![Page 63: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/63.jpg)
6 Low Level Architecture – How Pages Work 59
familiar to users of touchscreen devices and those users readily experiment with gestures. Therefore the CRS-
M design relies more on swiping than it does on traditional buttons with instructions as the means to explore
and interact with the UI. To this end, CRS-M’s UI uses horizontal touch sliders and touch-responsive page areas as
well as traditional vertically scrolling pages.
Examples
Homepage
The homepage was designed with 4 specific goals in mind:
1. Making a good first impression
2. Introducing the user to the primary mechanisms of the site
3. Providing the ability to showcase several products and promotions
4. Easy customization
CRS-M aims to make a good first impression by providing a visually and physically engaging homepage through
the use of promotional content displayed in horizontally scrolling panels. This content is personalized for each
user, which serves to further engage him/her.
The personalized content is provided by Oracle ATG Web Commerce content targeters, and if available, Oracle
Recommendations On Demand. This allows easy customization through the Business Control Center or the
recommendations service.
Product Details
The product details page traditionally presents the highest number of competing priorities of any page in an e-
commerce application. Minimizing this competition can be essential to the user’s ability to make a purchasing
decision about a given product. While the CRS-M approach to the product details page may not match your
specific business model, it may serve as a starting point for this page’s UX design.
The decision was made to feature the product image prominently and just large enough to help the user to
decide if they are interested in this product at first sight. The user can choose to see (and wait for) a larger image
by touching the photograph.
The product’s property pickers (for example, color, size, quantity, finish) expand only after the user touches
them. This user-initiated expansion allows the product photograph to be larger and more dominant in the
page’s default/initial state, as it does not compete with the property pickers for the user’s attention when he/she
first arrives on the page.
Shopping Cart
The shopping cart page was designed to allow individual rows in the cart (representing products) to be
expanded downwards when the user touches them. This provides more display space for your specific editing
options, in addition to (or different from) those provided by CRS-M. The goal here is to provide an example
design that can scale to different business needs so that retailers can offer their own cart editing mechanisms.
Checkout
Enabling speedy checkout was a major goal of the UX design for CRS-M. Throughout the checkout flow the
number of questions posed to the user on any one screen is reduced by separating long forms with compound
tasks into individual pages with focused tasks.
![Page 64: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/64.jpg)
60 6 Low Level Architecture – How Pages Work
This allows the checkout flow experience to feel faster and more focused to the user. In some cases this
separation of long forms into individual pages requires more page loads, but in all cases only the pages that are
relevant to the user’s current task are loaded. This modular approach to the various steps of the checkout flow
allows retailers to more easily configure the checkout process to their requirements.
![Page 65: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/65.jpg)
7 Internationalization 61
7 Internationalization
CRS-M currently supports two languages: Spanish and English. This was accomplished using the traditional
means of externalizing all UI strings to resource bundles so that translations are managed in a central location.
A language picker is provided in CRS-M’s UI, and it leverages the built-in locale and language support of Oracle
ATG Web Commerce.
Translations for the promotional content items that appear on CRS-M’s homepage are not located in resource
bundles, but rather in the Store.Storefront/data/catalog-i18n.xml file, leveraging the same
mechanism as Commerce Reference Store for this purpose. For more information, see the Internationalization
chapter in the Commerce Reference Store Overview.
![Page 66: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/66.jpg)
62 7 Internationalization
![Page 67: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/67.jpg)
8 Performance Considerations 63
8 Performance Considerations
Testing the performance of a mobile Web application can be a challenge for many reasons, one of which is
the difficulty in setting up a realistic test environment. End users of mobile e-commerce Web applications will
access those applications, most likely, over 3G or 4G networks, meaning that any test done over Wi-Fi will not be
accurate.
However, there are some commonly agreed upon techniques that can be employed to improve the
performance of a mobile Web application. At the time of writing, the W3C provides a recommendation on
Mobile Web Best Practices which is available from http://www.w3.org/TR/mwabp/.
Use Appropriate Client-Side Storage Technologies for
Local Data
As discussed in the Low Level Architecture – How Pages Work (page 15) section, CRS-M uses HTML 5 session
storage to cache the homepage data on the client. Also discussed in that section is the question of whether
a particular situation would benefit from more aggressive caching. This may be worth considering for each
particular implementation.
A separate note, also mentioned in the homepage section, is that CRS-M’s homepage currently does not have
a mechanism to handle the case where HTML 5 session storage is not available. Such a mechanism would be
preferable for mobile websites targeting a wider range of devices and browsers.
Enable Automatic Sign-in
CRS-M uses the same cookies as Commerce Reference Store, and hence the same behavior with regard to
automatic sign-in applies.
Minimize Application and Data Size
CRS-M adds a target to its build file that combines its CSS and JavaScript files into one CSS file (mobile.css) and
one JavaScript file (mobile.js) respectively, then compresses (“minifies”) these combined files. The “minified”
![Page 68: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/68.jpg)
64 8 Performance Considerations
files are imported only once in the pageStart.jsp file. This build file is not distributed with CRS-M in this
release.
Minimize Perceived Latency
When loading search refinements, a WebKit animated loading icon (“spinner”) is displayed to the user.
Use Meta Viewport Element To Identify Desired Screen
Size
CRS-M configures the viewport in pageStart.jsp as follows:
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
Prefer Server-Side Detection Where Possible
See the section entitled Mobile Interceptor (page 11) under General Configuration (page 11) for a description of
server-side user-agent detection.
![Page 69: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/69.jpg)
9 Customizations 65
9 Customizations
In the preceding sections we have touched on many areas that can be customized to your needs. You can also
customize other aspects of CRS-M. These include:
• Access control for your pages – allowing fewer or more pages to be accessed before the user is required to log
in
• Mobile user-agent interception – choosing which mobile browsers to forward to your mobile-specific pages,
and also the directory-mirroring strategy
• Mobile billing and profile form handlers – these provide an example of how you can customize a flow or part
of a flow to meet your specific needs
In the Low Level Architecture – How Pages Work (page 15) section we discussed in deeper detail some topics that
were previously introduced. The most relevant of these with respect to customization are:
• Homepage personalization – how to customize the targeted content to your needs, and how to reuse or
extend the JavaScript slider
• Product details – how to engineer a product details page that can accommodate many different types of SKU,
on a page that dynamically updates as the user makes selections
In the Performance Considerations (page 63) section we discussed some topics for improving performance that
can be customized for your implementation:
• How to configure the viewport, and different ways that this can be done – that is, allow the pinch-zoom
gesture, disable pinch-zoom, configure for different screen sizes
• Caching of data on the client – the CRS-M homepage demonstrates one approach but this could be
customized to be more or less aggressive based on your needs
An additional item of note that is useful for customization is what is referred to as site-specific CSS. Commerce
Reference Store demonstrates how to use site-specific CSS to give different sites a different look-and-feel on
its different site configurations. For information about site-specific CSS in Commerce Reference Store please
refer to the ATG Commerce Reference Store Overview, which can be found via the Oracle ATG Web Commerce
documentation page.
![Page 70: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/70.jpg)
66 9 Customizations
![Page 71: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/71.jpg)
10 Debugging 67
10 Debugging
If you append the parameter format to any URL request and specify the value as either json or xml, for example,
format=json or format=xml, the server will send the response in that format. This technique can help you
verify the data that returns from the server and help identify whether a problem is on the server or client side.
For example, you could view the JSON results returned from a browse request:
JSON output for debugging
![Page 72: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/72.jpg)
68 10 Debugging
![Page 73: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/73.jpg)
11 Feature Comparison with Commerce Reference Store 69
11 Feature Comparison with Commerce
Reference Store
CRS-M does not currently have full feature parity with Commerce Reference Store. Features that are present in
Commerce Reference Store but not present in CRS-M include:
• Support for Gift Lists
• Support for Wish Lists
• Support for Gift Wrap
• Support for shipping to multiple addresses
• Support for splitting a payment across store credit and a credit card
• Click to call integration
• Display of recommendations on pages other than the homepage (e.g. product details page, cart page)
• Sorting of products
• Choosing of the gift wrap and/or gift note options
• Product comparisons
• Viewing all promotions on a single page
• Express checkout
![Page 74: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/74.jpg)
70 11 Feature Comparison with Commerce Reference Store
![Page 75: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/75.jpg)
Index 71
Index
AAccess Control Servlet, 11
Architecture, 48
Auto correct, 35
Auto suggest, 33
Automatic Sign-in, 63
BBrand Landing Page, 40
CCarousel, 22
Cart, 42
Cartridges
Mobile JSP renderers for, 32
Using Shared, 28
Category Landing Page, 41
Client-Side Storage Technologies for Local Data, 63
Common Elements
UI, 54
CRS
Feature Comparison with,
Customizations,
DDebugging,
Did you mean?, 35
Directory Structure, 12
EEndeca-driven Search and Browse, 24
HHomepage, 15, 16, 59, 65
IInstallation,
Internationalization,
JJSP File Structure, 14
LLatency, 64
MMobile Cartridge, 24
Mobile Form Handler Extensions, 13
Mobile Interceptor, 11
OOracle Recommendations On Demand, 7
Ppage developers, 2
Page Hierarchy, 49
Performance Considerations,
Personalized Content, 16
Pickers
HTML and CSS, 52
JavaScript, 52
JSP, 51
Populating Sliders with Data, 22
programmers, 2
SServer-Side Detection, 64
Shopping Cart, 42
UUser Experience (UX) Design, 57
VVersion Compatibility,
![Page 76: Mobile Commerce Reference Store Overview - …...5 and CSS3 features, as well as many WebKit-specific features, to provide a mobile-optimized version of the existing reference application,](https://reader034.vdocument.in/reader034/viewer/2022042319/5f082bf17e708231d420b1f3/html5/thumbnails/76.jpg)
72 Index