
Updating a widget to be responsive
Before you begin
- Configure your web browser to view mobile store pages.
- Configure your web browser so that you can select to view your store for different device classes.
About this task
Aurora starter store pages are responsive by design so that they can be accessed across multiple channels and platforms. RWD pages in WebSphere Commerce use fluid layouts that include percentage-based widths for the layout template slots. The responsive pages dynamically resize to show content on the different devices that shoppers can use to access a store. For example, a store can show various page sizes or layouts according to the screen size of the device the shopper is using to view the store. These responsive pages demonstrate the best practices for store development within WebSphere Commerce. You can use these responsive pages to help you implement a responsive storefront for your site that can be used for various platforms. For more information about the RWD approach in WebSphere Commerce, see Responsive Web Design (RWD).
By default, the responsive pages for WebSphere Commerce adapt to fit three device screen size ranges. The default page ranges are defined as range breakpoints by using CSS3 Media Query declarations. You can review these breakpoint declarations within the following CSS file WC_eardir/Stores.war/storedir/css/styles.css.
Device | Range breakpoint | Page range |
---|---|---|
Desktop | RWD-C | 1281 CSS pixels and above |
Tablet | RWD-B | 601 - 1280 CSS pixels |
Mobile | RWD-A | 600 CSS pixels and below |
To make your widget responsive, you must define how your widget is to display at the different page range breakpoints. For more information about updating a widget to be responsive, see Creating responsive widgets.
- The layout template, Any page, five slots, right sidebar that this tutorial uses is a responsive template. The template slots within the template include flexible heights and widths that adjust according to changes in the page range.
- Along with the updates you complete to make your widget responsive, the ShoppingCartDetailWidget widget inherits default JSP and CSS code. This default code also follows a responsive design approach to support a fluid layout system with flexible percentage-based widths.
- The other Commerce Composer widgets (Header widget, Footer widget, and Catalog Entry Recommendation widget) that you included within the layout for the Shopping Cart page are responsive widgets.