Today I had the most detailed but at same time most interesting ATG consulting interview yet. Here are the questions I was asked with answers when appropriate in italics.
- Which versions of ATG have you worked with?
- What parts of ATG’s stack have you worked with?
- How do you compare ATG with Ruby on Rails?
- What is Nucleus?
- What is the ATG Repository?
- When creating form handlers typically what ATG base class do you extend? GenericFormHandler.java
- When creating droplets what ATG base class do you extend? DynamoServlet.java
- What form handlers and methods do you use during checkout? ShoppingCartFormHandler, numerous handlers like handleMoveToConfirm, etc.
- What does a user typically see during checkout? Add to shopping cart, login, billing and shipping address, payment, confirm, confirmation, email confirmation, shipped email.
- How do you compare strings in Java? If String a = “hello” and String b= “hello” what is a == b? True, a and b both reference the same constant string.
In another interview I was asked these questions.
- What is HTTP? How does it work?
- If HTTP is stateless then how does a web application maintain state.
Last year for Casual Male I did the Shop.com Product Display Integration (PDI) which allows Casual Male to sell its products on Shop.com.
The integration involved three steps.
- Access all the products organized by category using ATG’s GSA Repository.
- Export the products into an XML file according to the PDI DTD using the XStream library.
- FTP upload to Shop.com’s servers using Apache Commons Net library.
When troubleshooting orders it is really helpful to be able to view the order in the ACC.
By default orders are saved because persistOrders property of the /atg/commerce/ShoppingCart component is set to true. If you don’t see incomplete orders being saved then this means this property is not set to true.
More information on Troubleshooting Order Problems can be found in the ATG Commerce Programming Guide.
When starting ATG instances with the DCS module I will often see this warning.
DistributorSender No remote servers configured
This is because in the product catalog two item descriptors, media-internal-binary and media-internal-text, are configured to use the Dynamo content distributor system if it is available. This is documented in the Using Content Distribution with a SQL Content Repository section of the ATG Dynamo Programming Guide.
Since out of the box the Dynamo content distributor system is not configured we see the above warning. To turn it off simply set
loggingWarning=false for the
ATG’s promotion engine is pretty advanced and relatively easy to use for creating promotions as described in their Creating Promotions section in the Commerce Programming Guide.
ATG’s documentation gives numerous examples of how to create buy N get M free promotions.
For example to create a simple Buy 2 Get 1 Free promotion one would create the following rule.
“For next 2 items whose product is in the category named Foo, discount up to 1 item whose product is in the category named Foo”
The only issue with the above rule is that you cannot set conditions on customers. If you need to set conditions on customers then you have create a rule like this.
“When order contains at least 3 items whose product is in the category named Foo and at most 5 items whose product is in the category named Foo and customer’s name is Frank, discount up to 1 item whose product is in the category named Foo”
Note you will have to create separate promotions for each level, i.e. one for the 3 for 1, one for the 6 for 2, one for the 9 for 3, etc.
Also if you change a promotion I believe you have to restart the ATG server otherwise at least the current customers will still be using the old promotion.
Colors by CurveTo
The CommerceItem has two properties, catalogRefId and catalogId.
I always forget which one is which so I am writing this post so I can remember. I guess it was because some companies have different conventions about SKU’s and products.
Maybe one day someone will explain the reason for the naming.
Note that sometimes the catalogId is null though Iâ€™ve never seen the catalogRefId be null.
You can also try to get the product ID by using the auxiliaryData property. This property has a productId property.