Category: ATG

Deleting profiles and all associated orders

Nothing fancy, just a simple component to delete all profiles with no activity in the last 180 days. We needed this in our development and QA environments to reclaim disk space. import javax.transaction.TransactionManager; import atg.commerce.order.*; import atg.commerce.pricing.*; import atg.dtm.*; import…

Example of creating an order in ATG

I spent a lot of time understanding the plumbing of the Pipeline, OrderManager, etc. As I have indicated in the past, simple startup examples of ATG development are hard to find. The out of the box form handlers work far…

Add BCC admin user with SQL

I was having an issue using my AD account to log into the BCC in the load test environment. In production, we have deleted the admin account for security reasons. This forces users to use their LDAP credentials, which is…

Print HTTP headers in ATG

ATG provides a class named InsertableServletImpl, which can do pretty much what it sounds like. You insert the servlet to be run in the ATG servlet pipeline where you dictate. This allows us to inject behavior into our application at…

How is the ATG CONFIGPATH built?

The CONFIGPATH in ATG is not an operating system variable. In other words, you don’t issue something like the following… export CONFIGPATH=/directory_a /directory_B /directory_B start_app.sh The CONFIGPATH is pretty much what it sounds like. If you have done any work…

What does ATG liveconfig actually do?

liveconfig is essentially a switch to runAssembler that creates a properties file to override default ATG Nucleus behavior. It optimizes the configuration for a “live” production site. Specifically, it overrides the following properties. configurationCheckMilliseconds=10000 -to- configurationCheckMilliseconds=-1 checkFileNameCase=false -to- checkFileNameCase=false (yes,…

ATG scheduler job example

ATG supplies a scheduler of sorts that can be used to run tasks that are supposed to run on a recurring basis. First, cd to your ATG installation directory, and set your CLASSPATH so that the compiler can find the…

Simple ATG JSP and droplet

This post assumes you have installed the Commerce Reference Store. It was also written for ATG 10.0.3, although it may work on other versions, as well. Create the following file, named printAllOrders.java, under $ATG_INSTALL_DIR/home/locallib import java.io.*; import javax.servlet.*; import javax.servlet.http.*;…