ATG Topics


New Feature in ATG 11.2


  • Media can be pushed to commerce server using BCC
  • Price Engine modification, Added time based pricing
  • Experience manager add concept of workflow and projects
  • New item types can be created through programmatic controls, without changes to the database structure and without requiring server restarts
  • Promotion based on payment type
  • More language for MDEX engine for better search

Targeters :


  • Create "Promotional Content Targeter name" Promotional Content in BCC.
  • MainTargeter.properties :
$class=atg.targeting.DynamicContentTargeter
$description=
repository=/atg/commerce/catalog/ProductCatalog
repositoryViewName=promotionalContent
ruleStrings=Show this content\:,items whose Title is Hero Shot
rulesets=<ruleset>\n
    <accepts>\n  
        <rule op\=and tag\="Show">\n    
            <rule op\=and tag\="Content">\n      
                <rule op\=any tag\="ContentSources">\n</rule>\n      
                <rule op\=and tag\="ContentConditions">\n        
                    <rule op\=eq>\n          
                        <valueof target\="title">\n          
                        <valueof constant\="Promotional Content Targeter name">\n        
                    </rule>\n      
                </rule>\n    
             </rule>\n  
        </rule>\n
    </accepts>\n
</ruleset>
  • Create a jsp page :
<dsp:page>
    <dsp:importbean bean="/atg/targeting/TargetingForEach" />
    <dsp:importbean bean="/atg/registry/RepositoryTargeters/Test/MainTargeter" />
    <dsp:droplet name="TargetingForEach">
        <dsp:param name="targeter" bean="MainTargeter" />
        <dsp:oparam name="output">
            <dsp:getvalueof var="url" param="element.template.url" />
            <c:if test="${not empty url}">
                <dsp:include page="${url}">
                    <dsp:param name="promotionContent" param="element" />
                    <dsp:param name="imageWidth" value="730" />
                    <dsp:param name="imageHeight" value="176" />
                </dsp:include>
            </c:if>
        </dsp:oparam>
        <dsp:oparam name="empty">
        </dsp:oparam>
    </dsp:droplet>
</dsp:page>

Decorator :

  • Add sitemesh-2.3.jar to your WEB-INF/lib directory
  • Updating web.xml : 
          This will call the SiteMesh filter whenever a page on your site is accessed.

<filter>
    <filter-name>sitemesh</filter-name>
    <filter-class>
        com.opensymphony.module.sitemesh.filter.PageFilter
    </filter-class>
</filter>
<filter-mapping>
    <filter-name>sitemesh</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

  • Create /WEB-INF/decorators.xml :
<?xml version="1.0" encoding="ISO-8859-1"?>
<decorators defaultdir="/decorators">
    <excludes>
        <pattern>*login/processLogin.jsp*</pattern>
    </excludes>
    <decorator name="search" page="searchDecorator.jsp">
        <pattern>*/search/searchContainer.jsp</pattern>
    </decorator>
    <decorator name="main" page="main.jsp">
        <pattern>/*</pattern>
    </decorator>
</decorators> 

  • Create Jsps : searchDecorator.jsp & main.jsp

Configure Email :


Override the /atg/dynamo/service/SMTPEmail Component : provide emailHandlerHostName (e.g- mailserver.company.com)

Custom Url for Product/Category Pages


Item Link Servlet : -

CatalogItemLink :
# Map of UrlTemplateMapper components by item descriptor name for this droplet
itemDescriptorNameToMapperMap=\
product=/atg/repository/seo/ProductTemplateMapper,\
category=/atg/repository/seo/CategoryTemplateMapper

ProductTemplateMapper :
# List of UrlTemplate names
templates=\
/atg/repository/seo/ProductIndirectTemplate

ProductIndirectTemplate :
urlTemplateFormat=/catalog/{item.id}/{item.brand}/{item.searchName}

ProductLookupItemLink : determine the category, when there are more than one parent category for Product.



Generic Service

A GenericService is a basic implementation of the Service interfaces. Services written from scratch should extend this class to take advantage of all the facilities it provides:
  • Implementation of the Service methods, thereby allowing Nucleus to send start and stop notifications to the Service.
  • Implementation of ApplicationLogging, allowing the Service to log messages and errors to attached "LogListeners".
  • Implementation of NameContextElement, allowing this Service to know its position in the naming hierarchy.

A GenericService provides two methods that subclasses should override:

  • doStartService() This is called after a Service has been created, placed into the correct naming hierarchy, and all of its properties have been set. A Service should use this method to start any processes required for its operation.
  • doStopService() This is called whenever Nucleus determines that a Service must be shut down. This might happen because of an explicit command from the administrator, or it may happen because Nucleus is shutting down. This is also called when a Service is reconfigured. In such a case, doStopService() is called, then the appropriate properties are set with the new configuration values, and doStartService() is called.

No comments :