Oracle Commerce Ecosystem

ATG, Endeca, and more…

Managing Internal (BCC) users through ACC — December 13, 2015
Direct links to different BCC applications —

Direct links to different BCC applications

Did you know?

Does your organization have different business users working on different sections (applications) in BCC?

In addition to giving corresponding roles to such users, you can also provide them with direct links to the target applications. This bypasses the BCC home page.

http://<hostname>:<port>/ControlCenter/application/<applicationname>

where application name could be any of: personalization, merchandising, siteadmin, accessControl

What comprises allRootCategories? — December 3, 2015
ATG: Development mode vs Standalone mode EAR — December 1, 2015

ATG: Development mode vs Standalone mode EAR

Development Mode

  • The application draws its Nucleus configuration information from the Oracle Commerce Platform installation.
  • <Development_EAR>/atg_bootstrap.war/WEB-INF/ATG-INF/dynamo.env
    atg.dynamo.use-install=true
  • Writes output files (like logs) to ATG_HOME, eg: ATG_HOME/logs

Standalone Mode

  • The application stores its configuration in the EAR file itself.
  • EAR created by passing the option -standalone to runAssembler
  • <Standalone_EAR>/atg_bootstrap.war/WEB-INF/ATG-INF contains:-
    • the dependent module directories
    • A home/localconfig which = ATG_HOME/localconfig
  • Writes output files (like logs) to ATG-Data directory, eg: ATG-Data/logs
    • An ATG-Data directory will be created by the java process that starts the application.
    • Location can be controlled by:-
      • -Datg.dynamo.data-dir=/var/data/ATG-Data/
    • ATG-Data directory contains folders logs, pagebuild, data, and localconfig.
      • This localconfig subdirectory is the last entry in the configuration path. Can be used for debugging in standalone EAR mode.
git: commit a file as executable from Windows to LINUX —

git: commit a file as executable from Windows to LINUX

Problem:

Your development environment is Windows, and your target environment is LINUX. You use git for version control.

You have a script file that you need to mark as executable so that once it reaches the target LINUX box, it is ready to execute.

Had it been on LINUX, you would have simply executed the command:
chmod +x <file_name>

Solution:

git update-index --chmod=+x <file_name>

Now commit this file to git

ATG: From which JAR is a class getting loaded — October 20, 2015

ATG: From which JAR is a class getting loaded

Ever wondered from where is a particular class is getting loaded in your ATG application? Well ATG provides an easy way to find out. This is well documented in the Oracle documentation, but I felt it is not being made use of as much as it should be.

It is called the Findclass Utility.

Go to the URL:

http://server:port/dyn/dyn/findclass.jhtml

Enter your full class name (with package), and click Find Class button

Here is the link to the Oracle documentation on the same

CatalogMaintenanceService not running after BCC project deployment? — June 2, 2015

CatalogMaintenanceService not running after BCC project deployment?

Problem:

  • products, skus not getting associated to sites, catalogs after BCC deployment.
  • CatalogMaintenaceService not running after BCC project deployment.

Debugging:

  1. See if the you are able to run CatalogMaintenanceService manually. For this go to:
    dyn/admin > Commerce Administration > Catalog Maintenance > Basic Maintenance
  2. If it is running successfully when triggered manually, then it could be possible that you did not include the module DCS.PublishingAgent in any of your server instance. See if this module is running. If not, include it in your assembly.
ProductLookup Droplet unable to lookup product? —

ProductLookup Droplet unable to lookup product?

Problem:

In a multisite environment, You are using /atg/commerce/catalog/ProductLookup droplet to lookup a product using its ID, but it returns empty although you are sure that such a product exists in your repository.

Debugging:

ProductLookup droplet is an ItemLookupDroplet, which looks up repository items. In a multisite environment, it will return the product only if it belongs to the site in context, or one of the site ids passed as optional input parameters.

1) To check if this is the problem, add the ‘wrongSite’ oparam to the ProductLookup droplet.

<dsp:oparam name="wrongSite">
    Wrong site
</dsp:oparam>

Or you may enable logDebug on the ProductLookup droplet, and the same information will be there in the logs.

2) If it turned out that it is returning wrong site, then, check in BCC to see if the catalog is associated properly to the site. Look under:-

Merchandizing > Site Catalogs > Your catalog > sites

3) Now if even that is proper, then it is quite possible that the CatalogMaintenanceService (CMS) did not run properly after you deployed the changes to the catalog. The CMS is responsible for making the association between products / skus and sites. To verify this, you can go to the database to the catalog schema, and see the contents of this table – dcs_product_sites. This table is expected to have an association between the product and the site.

4) Now if you see that this association is missing, try running CatalogMaintenanceService manually. You can do this from:-

dyn/admin > Commerce Administration > Catalog Maintenance > Basic Maintenance

Once this finishes successfully, try the ProductLookup again.

5) Now, why did the CatalogMaintenanceService run in the first place?

For this to run automatically after each BCC deployment, you need to have the module DCS.PublishingAgent running in one of your commerce server instances. Include this module in your build.

Custom Droplets — May 15, 2015

Custom Droplets

Creating a custom droplet:

  • Create a Java class that extends DynamoServlet
  • It should have service(0 method
  • Register this class as a Nucleus component
  • Use it in <dsp:droplet tag

Inside the service() method:

  • Use request.getParameter() for String input parameters
  • Use request.getObjectParameter() for object parameters
  • Use request.setParameter() to set output params
  • Use request.serviceParameter(“paramName”, request, response) to render the opram contents
  • Use getLocalParameter() and serviceLocalParameter() to ensure that you get access to params that are only declared within the <dsp:droplet> tag

Limitations of ATG Custom Droplets

  • oparams are not executed precisely when serviceParameter() is called
  • They get rendered only after service() method exits
  • Hence, avoid:
    • setting global or thread state variables in oparams
    • opening or closing JDBC/socket in oparams
    • Replacing output stream
Switch droplet —