betweenGo

Personalization

Persistent Cart for Anonymous Users

by Frank Kim on May.03, 2010, under Personalization

129/365 Isn’t it iconic? on Flickr Isn’t it iconic? by Mykl Roventine

Convenience

eCommerce sites want to make their users’ experience as convenient and intuitive as possible.  One convenience found on most major eCommerce sites is remembering what the user put in his shopping cart, even if that person didn’t log in.  Therefore when the user returns to the site he will see what he left in his shopping cart.

Persistent Cart

ATG makes it relatively simple to do this by:

  1. creating a profile in the repository (database) for all users that visit the website
  2. automatically logging in users by cookie

Therefore if a user returns, she/he will be automatically logged in and if there were any items in his cart they will be added to the current cart.

Implementation

  1. Turn on persisting anonymous profiles in the ProfileRequestServlet.
    # /atg/dynamo/servlet/dafpipeline/ProfileRequestServlet
    persistAfterLogout=true
    persistentAnonymousProfiles=true
  2. Turn on auto-login by cookie and turn off auto-login by basic authentication.
    # /atg/userprofiling/CookieManager
    sendProfileCookies=true
    
    # /atg/userprofiling/ProfileRequestServlet
    verifyBasicAuthentication=false
  3. Make all profile properties not required except for login and password in userProfile.xml.  Also make autoLogin true.
    <table name="dps_user">
      <property name="login" required="true" />
      <property name="password" required="true" />
      <property name="firstName" required="false" />
      <property name="lastName" required="false" />
      <property name="email" required="false" />
      <property name="autoLogin" default="true" />
    </table>

Notes

When a profile is created for an anonymous user the login and password are set to the user’s ID (i.e. the profile’s repository ID).

If you are adding this functionality to an existing up and running site you may have to modify your user tables so that there no “not null” columns except for the id, login and password columns, you can leave those as how they were.  Also you will need to set auto_login to true for all your existing users.

update dps_user set auto_login = 1;

To determine when the anonymous user was created look at the registrationDate profile property.  To determine when was the last time the anonymous user logged in look at the lastActivity profile property.  Both of these are updated by ATG’s TrackActivity scenario which is in the DSS folder.

For further reading please see Tracking Guest Users and Tracking Registered Users in the ATG 9.1 Personalization Programming Guide.

  • Share/Bookmark
Leave a Comment :, , more...

How to Add Products to Categories using Content Groups

by Frank Kim on Jul.31, 2009, under Commerce, Personalization

Typically after you create a category in your catalog you then add products to the category.  The simple way to do that in ATG eCommerce is to use the ACC and add products to the child products property of the category.  However there is another way.

In the ATG Commerce Guide to Setting Up a Store documentation you can see in the Viewing the Product Catalog section that a category can have child products but also child product groups.

Product Catalog

Child product groups are actually content groups which are described in the Creating Content Groups chapter of the ATG Personalization Guide for Business Users.

Targeting > Profile and Content Groups window

Though the documentation shows a content group composed of features you can easily create a content group using the ProductCatalog as a content source and product as a content type.

To create a content group follow the steps in the ATG documentation for Creating New Content Groups except use an item from the ProductCatalog when specifying the Content Type.  Then create the targeting rules for this Content Group.  Now you can specify this group in the Child products (group) property of a category.

  • Share/Bookmark
Leave a Comment :, , , , more...

Slot not global warnings in ATG logs

by Frank Kim on Feb.19, 2008, under ACC, Personalization

In the ATG logs you may see warnings about a slot being session scoped not global.

[STDOUT] Invalid attempt to resolve component /atg/registry/Slots/ActivationFlowSlot in scope global. It is defined in scope session 

Most of the time you can safely ignore these warnings because these warnings are most likely coming from the ACC.

When browsing slots using the ACC the ACC tries to look up the slot as a global component and complains it’s a session scoped component.  In other words it’s an ACC bug that will probably never be fixed since ATG is moving away from the ACC.

  • Share/Bookmark
Leave a Comment : more...

Cannot Create New ATG Scenario

by Frank Kim on Nov.29, 2007, under Personalization

Though I have a distaste for scenarios on occasion there will be a time when I want to create a new scenario. On such an occasion I still start up the ACC, go to Scenarios > Scenarios and discover I can’t create a scenario because the New Scenario box is grayed out.

The issue is often because the process editor server is configured incorrectly. ATG documents how to configure the process editor server.

For example today I found I could not create a new scenario. After putting this scenarioManager.xml in localconfig/atg/scenario and then restarting ATG I was able to create new scenarios again.

<?xml version="1.0" encoding="ISO-8859-1" ?>
<process-manager-configuration>
 <process-editor-server>
  <server-name xml-combine="replace">
   CRAPBOOK-PRO:8850
  </server-name>
 </process-editor-server>
</process-manager-configuration>

Note that the server name must be the same as the one found at /atg/dynamo/service/ServerName.serverName. For more information about the atg.service.ServerName class, see Referring to Dynamo Servers in the Nucleus: Using Nucleus section of the ATG Programming Guide.

  • Share/Bookmark
Leave a Comment : more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!