SoftSlate Commerce
Home » Documentation » HTML Documentation

Adding an Additional Custom Layout

Example 13.1. Creating an Additional Custom Layout for Visitors Coming from an Affiliate

Let's say we want to create a special look and feel for people who visit the store from a link on a particular affiliate's site. (Perhaps we want to include the affiliate's logo in the store's header, or change the text or colors around a bit. Any customization on any or all screens is possible.)

  1. The first thing to do is give a name to your new layout. For our purposes (and for lack of a more original name) let's call our new layout the "special" layout (a one-word term is best).
  2. This name serves as both the value of the layout URL parameter for visitors coming to the site, and as the name of the directory under /WEB-INF/layouts that holds the new layout's customized templates. So, go ahead and create a subdirectory under /WEB-INF/layouts named special. While you're at it, within that directory create the same subdirectories found under the custom and default directories: core , product, order, customer, and payment .
  3. Tell your affiliate to add the layout URL parameter, with a value of "special", to any links that take visitors from their site to your store. For example, the link to your Welcome Screen would look something lie this: http://www.storesdomainname.com/softslate/Welcome.do?layout=special . When SoftSlate Commerce sees that parameter on the URL, it knows to use the "special" layout throughout the user's session.
  4. At this point you can follow the same techniques for creating a custom layout described in the Creating a Custom Layout chapter to create the new "special" layout. Copy files you want to customize from the default directory to the special directory. If the visitor is assigned to the "special" layout, the store will first look in the special directory to include each template. If it does not exist there, it will then include the corresponding template in the default directory.

[Important]Important

An important setting for controlling multiple custom layouts is the "Default Layout" setting in the Look and Feel Settings -> Advanced Display Settings screen of the administrator. This setting tells SoftSlate Commerce which layout to give users by default, if the layout is not specified on the URL. For complete details, refer to the section on the Default Layout Setting

Copyright © 2009-2017 SoftSlate, LLC. All Rights Reserved.

Powered by SoftSlate Commerce

Foraker Design