<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>betweenGo &#187; Commerce</title>
	<atom:link href="http://betweengo.com/category/atg/commerce/feed/" rel="self" type="application/rss+xml" />
	<link>http://betweengo.com</link>
	<description>We make Ruby on Rails easy.  We make ATG easy.</description>
	<lastBuildDate>Thu, 24 Jun 2010 19:42:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Limiting the Quantity Added to a Cart</title>
		<link>http://betweengo.com/2010/01/14/limiting-the-quantity-added-to-a-cart/</link>
		<comments>http://betweengo.com/2010/01/14/limiting-the-quantity-added-to-a-cart/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 18:00:00 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Commerce]]></category>
		<category><![CDATA[CartModifierFormHandler]]></category>
		<category><![CDATA[ecommerce]]></category>

		<guid isPermaLink="false">http://betweengo.com/2010/01/14/limiting-the-quantity-added-to-a-cart/</guid>
		<description><![CDATA[ 
(Photo: Speed Limit 14 MPH by bredgur)
Sometimes the client will ask that the quantity of items you can add to the cart be limited to some number, say 14 like in the photo above.  
Often people will implement this by putting in checks throughout the JSP.&#160; But this is not the best solution [...]


Related posts:<ol><li><a href='http://betweengo.com/2009/11/02/how-to-add-multiple-items-to-the-shopping-cart-in-atg/' rel='bookmark' title='Permanent Link: How to Add Multiple Items to the Shopping Cart in ATG'>How to Add Multiple Items to the Shopping Cart in ATG</a></li>
<li><a href='http://betweengo.com/2007/11/15/sku-and-product-ids-in-commerceitem/' rel='bookmark' title='Permanent Link: CommerceItem, which one is the SKU ID?'>CommerceItem, which one is the SKU ID?</a></li>
<li><a href='http://betweengo.com/2009/08/17/how-to-debug-an-invalidversionexception-from-updating-an-atg-order/' rel='bookmark' title='Permanent Link: How to Debug an InvalidVersionException from Updating an ATG Order'>How to Debug an InvalidVersionException from Updating an ATG Order</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p align="center"><a href="http://www.flickr.com/photos/bredgur/2402977168/"><img style="display: inline; margin-left: 0px; margin-right: 0px" title="Speed Limit 14 MPH on Flickr" alt="Speed Limit 14 MPH on Flickr" src="http://farm4.static.flickr.com/3074/2402977168_32e08bbc26.jpg" /></a> </p>
<p align="center">(Photo: <a title="Speed Limit 14 MPH on Flickr" href="http://www.flickr.com/photos/bredgur/2402977168/">Speed Limit 14 MPH</a> by <a title="Flickr: bredgur&#39;s Photostream" href="http://www.flickr.com/photos/bredgur/">bredgur</a>)</p>
<p>Sometimes the client will ask that the quantity of items you can add to the cart be limited to some number, say 14 like in the photo above. <img src='http://betweengo.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Often people will implement this by putting in checks throughout the JSP.&#160; But this is not the best solution because it is more labor intensive and you may miss something.</p>
<p>Another solution is to deal with the issue in the <a title="CartModifierFormHandler (ATG Java API)" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG9.1/apidoc/atg/commerce/order/purchase/CartModifierFormHandler.html">CartModifierFormHandler</a> by extending the <a title="CartModifierFormHandler.doAddItemsToOrder (ATG Java API)" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG9.1/apidoc/atg/commerce/order/purchase/CartModifierFormHandler.html#doAddItemsToOrder(atg.servlet.DynamoHttpServletRequest, atg.servlet.DynamoHttpServletResponse)">doAddItemsToOrder method</a>.&#160; Simply check the quantity of each AddCommerceItemInfo item and make sure that its quantity plus the quantity of the same item already in the cart does not go over the limit.&#160; If it does modify the quantity in the AddCommerceItemInfo item appropriately.</p>
<p>Here is how I implemented this.</p>
<pre>    @Override
    protected void doAddItemsToOrder(DynamoHttpServletRequest pRequest,
            DynamoHttpServletResponse pResponse) throws ServletException,
            IOException {

        // fetch the order
        Order order = getOrder();
        if (order == null) {
            String msg = formatUserMessage(MSG_NO_ORDER_TO_MODIFY, pRequest,
                    pResponse);
            throw new ServletException(msg);
        }

        // iterate through the add commerce item infos, making sure that adding
        // any of them will not result in a quantity greater than LIMIT
        AddCommerceItemInfo[] addCommerceItemInfos = getItems();
        for (int ii = 0; ii &lt; addCommerceItemInfos.length; ii++) {

            // see if there is a commerce item already in the order for the next
            // add commerce item info
            AddCommerceItemInfo addCommerceItemInfo = addCommerceItemInfos[ii];
            String catalogRefId = addCommerceItemInfo.getCatalogRefId();
            CommerceItem commerceItem = findCommerceItemByCatalogRefId(order,
                    catalogRefId);
            if (commerceItem == null) {
                continue;
            }

            // check that the quantity we add won't result in a total quantity
            // greater than LIMIT
            long addQty = addCommerceItemInfo.getQuantity();
            long qty = commerceItem.getQuantity();
            if (qty &gt;= LIMIT) {
                addCommerceItemInfo.setQuantity(0);
            } else if (qty + addQty &gt; LIMIT) {
                long newAddQty = LIMIT - qty;
                addCommerceItemInfo.setQuantity(newAddQty);
            }
        }

        super.doAddItemsToOrder(pRequest, pResponse);
    }

    protected CommerceItem findCommerceItemByCatalogRefId(Order pOrder,
            String pCatalogRefId) {
        for (int ii = 0; ii &lt; numCommerceItems; ii++) {
            CommerceItem commerceItem = (CommerceItem) commerceItems.get(ii);
            String catalogRefId = commerceItem.getCatalogRefId();
            if (catalogRefId.equals(pCatalogRefId))
                return commerceItem;
        }
        return null;
    }</pre>


<p>Related posts:<ol><li><a href='http://betweengo.com/2009/11/02/how-to-add-multiple-items-to-the-shopping-cart-in-atg/' rel='bookmark' title='Permanent Link: How to Add Multiple Items to the Shopping Cart in ATG'>How to Add Multiple Items to the Shopping Cart in ATG</a></li>
<li><a href='http://betweengo.com/2007/11/15/sku-and-product-ids-in-commerceitem/' rel='bookmark' title='Permanent Link: CommerceItem, which one is the SKU ID?'>CommerceItem, which one is the SKU ID?</a></li>
<li><a href='http://betweengo.com/2009/08/17/how-to-debug-an-invalidversionexception-from-updating-an-atg-order/' rel='bookmark' title='Permanent Link: How to Debug an InvalidVersionException from Updating an ATG Order'>How to Debug an InvalidVersionException from Updating an ATG Order</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2010/01/14/limiting-the-quantity-added-to-a-cart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NullPointerException in ATG OrderDiscountCalculator</title>
		<link>http://betweengo.com/2009/12/15/nullpointerexception-in-atg-orderdiscountcalculator/</link>
		<comments>http://betweengo.com/2009/12/15/nullpointerexception-in-atg-orderdiscountcalculator/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 13:39:40 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Commerce]]></category>
		<category><![CDATA[NullPointerException]]></category>
		<category><![CDATA[OrderDiscountCalculator]]></category>

		<guid isPermaLink="false">http://betweengo.com/2009/12/15/nullpointerexception-in-atg-orderdiscountcalculator/</guid>
		<description><![CDATA[
(Photo: calculator by ansik) 
There is a bug in the ATG OrderDiscountCalculator which causes a NullPointerException (NPE) under certain conditions.&#160; Fortunately ATG provides the source for this class (I wish they did for all their classes or at least a larger subset of them) so it was pretty simple to figure out why this was [...]


Related posts:<ol><li><a href='http://betweengo.com/2009/07/16/could-not-install-atg-2007-1/' rel='bookmark' title='Permanent Link: Could Not Install ATG 2007.1'>Could Not Install ATG 2007.1</a></li>
<li><a href='http://betweengo.com/2009/12/20/twitter-weekly-updates-for-2009-12-20/' rel='bookmark' title='Permanent Link: Twitter Weekly Updates for 2009-12-20'>Twitter Weekly Updates for 2009-12-20</a></li>
<li><a href='http://betweengo.com/2009/08/17/how-to-debug-an-invalidversionexception-from-updating-an-atg-order/' rel='bookmark' title='Permanent Link: How to Debug an InvalidVersionException from Updating an ATG Order'>How to Debug an InvalidVersionException from Updating an ATG Order</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p align="center"><a href="http://www.flickr.com/photos/ansik/304526237/"><img title="calculator on Flickr" alt="calculator on Flickr" src="http://farm1.static.flickr.com/109/304526237_6d1acf58bb.jpg" /></a></p>
<p align="center">(Photo: <a title="calculator on Flickr" href="http://www.flickr.com/photos/ansik/304526237/">calculator</a> by <a title="Flickr: ansik&#39;s Photostream" href="http://www.flickr.com/photos/ansik/">ansik</a>) </p>
<p>There is a bug in the <a title="OrderDiscountCalculator (ATG Java API)" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG9.1/apidoc/atg/commerce/pricing/OrderDiscountCalculator.html">ATG OrderDiscountCalculator</a> which causes a <a title="NullPointerException (Java 2 Platform SE 5.0)" href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html">NullPointerException</a> (NPE) under certain conditions.&#160; Fortunately ATG provides the source for this class (I wish they did for all their classes or at least a larger subset of them) so it was pretty simple to figure out why this was happening.</p>
<p>The OrderDiscountCalculator assumes that the taxableShippingGroupSubtotalInfo local will not be null.&#160; If it is an NPE will result when this local is referenced and the page that called this calculator will crash.</p>
<p>The simple fix is to check if it is null and if it is to continue to the next shipping group.</p>
<pre>if (taxableShippingGroupSubtotalInfo == null) {
  continue;
}</pre>
<p>At my request ATG Support has filed a problem report, <a title="ATG - Customer Care Site  - PR #166384 NullPointerException in OrderDiscountCalculator" href="https://www.atg.com/esupport/bugs/?FullViewBug=ViewBug&amp;bugId=166384">NullPointerException in OrderDiscountCalculator</a>.</p>
<p>Update 12-17-2009: ATG may have fixed this issue for ATG 9.1 p1, <a title="ATG - Customer Care Site  - PR #162722 NPE in OrderDiscountCalculator w/empty shipping groups in Order" href="https://www.atg.com/esupport/bugs/?FullViewBug=ViewBug&amp;bugId=162722">NPE in OrderDiscountCalculator w/empty shipping groups in Order</a>.</p>


<p>Related posts:<ol><li><a href='http://betweengo.com/2009/07/16/could-not-install-atg-2007-1/' rel='bookmark' title='Permanent Link: Could Not Install ATG 2007.1'>Could Not Install ATG 2007.1</a></li>
<li><a href='http://betweengo.com/2009/12/20/twitter-weekly-updates-for-2009-12-20/' rel='bookmark' title='Permanent Link: Twitter Weekly Updates for 2009-12-20'>Twitter Weekly Updates for 2009-12-20</a></li>
<li><a href='http://betweengo.com/2009/08/17/how-to-debug-an-invalidversionexception-from-updating-an-atg-order/' rel='bookmark' title='Permanent Link: How to Debug an InvalidVersionException from Updating an ATG Order'>How to Debug an InvalidVersionException from Updating an ATG Order</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2009/12/15/nullpointerexception-in-atg-orderdiscountcalculator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Add Multiple Items to the Shopping Cart in ATG</title>
		<link>http://betweengo.com/2009/11/02/how-to-add-multiple-items-to-the-shopping-cart-in-atg/</link>
		<comments>http://betweengo.com/2009/11/02/how-to-add-multiple-items-to-the-shopping-cart-in-atg/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 19:39:29 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Commerce]]></category>

		<guid isPermaLink="false">http://betweengo.com/2009/11/02/how-to-add-multiple-items-to-the-shopping-cart-in-atg/</guid>
		<description><![CDATA[
(Photo: Red Cart Conga, Baby by It&#8217;sGreg)
ATG’s CartModifierFormHandler has a handle method for adding multiple items to the shopping cart, handleAddMultipleItemsToOrder.
&#60;dsp:input type=&#34;submit&#34; bean=&#34;CartModifierFormHandler.addMultipleItemsToOrder&#34; /&#62;
What is required is that in the request you set the product ID and SKU ID (catalogRefId) for each product you want to add.
&#60;dsp:input bean=&#34;CartModifierFormHandler.productIds&#34; paramvalue=&#34;product.id&#34; type=&#34;hidden&#34; /&#62;
&#60;dsp:input bean=&#34;CartModifierFormHandler.catalogRefIds&#34; paramvalue=&#34;sku.id&#34; type=&#34;hidden&#34; /&#62;
Seems [...]


Related posts:<ol><li><a href='http://betweengo.com/2010/01/14/limiting-the-quantity-added-to-a-cart/' rel='bookmark' title='Permanent Link: Limiting the Quantity Added to a Cart'>Limiting the Quantity Added to a Cart</a></li>
<li><a href='http://betweengo.com/2007/03/28/printing-out-an-array/' rel='bookmark' title='Permanent Link: Printing out an array'>Printing out an array</a></li>
<li><a href='http://betweengo.com/2009/07/31/how-to-add-products-to-categories-using-content-groups/' rel='bookmark' title='Permanent Link: How to Add Products to Categories using Content Groups'>How to Add Products to Categories using Content Groups</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p style="text-align: center"><a href="http://www.flickr.com/photos/itsgreg/286126175/"><img title="Red Cart Conga, Baby on Flickr" alt="Red Cart Conga, Baby on Flickr" src="http://farm1.static.flickr.com/121/286126175_adfbe77f4a.jpg" /></a></p>
<p style="text-align: center">(Photo: <a title="Red Cart Conga, Baby on Flickr" href="http://www.flickr.com/photos/itsgreg/286126175/">Red Cart Conga, Baby</a> by <a title="Flickr: It&#39;sGregs photostream" href="http://www.flickr.com/photos/itsgreg/">It&#8217;sGreg</a>)</p>
<p>ATG’s <a title="CartModifierFormHandler (ATG Java API)" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG9.0/apidoc/atg/commerce/order/purchase/CartModifierFormHandler.html">CartModifierFormHandler</a> has a handle method for adding multiple items to the shopping cart, <a title="CartModifierFormHandler.handleAddMultipleItemsToOrder(atg.servlet.DynamoHttpServletRequest, atg.servlet.DynamoHttpServletResponse)" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG9.0/apidoc/atg/commerce/order/purchase/CartModifierFormHandler.html#handleAddMultipleItemsToOrder%28atg.servlet.DynamoHttpServletRequest,%20atg.servlet.DynamoHttpServletResponse%29">handleAddMultipleItemsToOrder</a>.</p>
<pre>&lt;dsp:input type=&quot;submit&quot; bean=&quot;CartModifierFormHandler.addMultipleItemsToOrder&quot; /&gt;</pre>
<p>What is required is that in the request you set the product ID and SKU ID (catalogRefId) for each product you want to add.</p>
<pre>&lt;dsp:input bean=&quot;CartModifierFormHandler.productIds&quot; paramvalue=&quot;product.id&quot; type=&quot;hidden&quot; /&gt;
&lt;dsp:input bean=&quot;CartModifierFormHandler.catalogRefIds&quot; paramvalue=&quot;sku.id&quot; type=&quot;hidden&quot; /&gt;</pre>
<p>Seems pretty-straightforward, right?&#160; Well there are a couple of tricks.</p>
<p><strong>Trick #1: Setting the quantity</strong></p>
<p>Setting the quantity of the amount of each SKU you want added to the cart requiring naming the quantity input using the SKU iD.</p>
<pre>&lt;input type=&quot;text&quot; name=&quot;&lt;dsp:valueof param=&quot;sku.id&quot;/&gt;&quot; /&gt;</pre>
<p><strong>Trick #2: Handling zero quantity inputs</strong></p>
<p>When the handleAddMultipleItemsToOrder tries to add something that has a quantity of zero or less you it will output an error message that the quantity is zero or less.&#160; If you have a input form where the user does not have to add all the items on the page then this will be problematic.</p>
<p>To get around this restriction I overrode the <a title="CartModifierFormHandler.preAddMultipleItemsToOrder(atg.servlet.DynamoHttpServletRequest, atg.servlet.DynamoHttpServletResponse)" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG9.0/apidoc/atg/commerce/order/purchase/CartModifierFormHandler.html#preAddMultipleItemsToOrder(atg.servlet.DynamoHttpServletRequest, atg.servlet.DynamoHttpServletResponse)">preAddMultipleItemsToOrder</a> method.&#160; My method sets the productIds and catalogRefIds properties to only have items that have a quantity greater than zero.</p>
<pre>public void preAddMultipleItemsToOrder(DynamoHttpServletRequest pReq,
    DynamoHttpServletResponse pRes) throws ServletException,
    IOException {

  // get the SKU ID's and product ID's set in the form
  String[] oldCatalogRefIds = getCatalogRefIds();
  String[] oldProductIds = getProductIds();

  // make sure that the SKU ID's and product ID's are valid and of the
  // same length
  if (oldCatalogRefIds == null || oldCatalogRefIds.length == 0)
    return;
  if (oldProductIds == null || oldCatalogRefIds.length != oldProductIds.length) {
    return;
  }

  // initialize list for the SKU ID's and product ID's that we will add to
  // the shopping cart
  List<string> newCatalogRefIdsList = new ArrayList</string><string>(
      oldCatalogRefIds.length);
  List</string><string> newProductIdsList = new ArrayList</string><string>(
      oldCatalogRefIds.length);

  // iterate through original SKU ID's
  for (int ii = 0; ii &lt; oldCatalogRefIds.length; ii++) {

    // get next SKU ID
    String catalogRefId = oldCatalogRefIds[ii];

    // get quantity requested for that SKU ID
    long qty;
    try {
      qty = getQuantity(catalogRefId, pRequest, pResponse);
    } catch (NumberFormatException exc) {
      if (isLoggingDebug())
        logDebug(&quot;invalid quantity for catalogRefId=&quot; + catalogRefId, exc);
      qty = 0;
    }

    // if quantity &gt; 0 then save this SKU ID and it's product ID
    if (qty &gt; 0) {
      newCatalogRefIdsList.add(catalogRefId);
      String productId = oldProductIds[ii];
      newProductIdsList.add(productId);
    }
  }

  // set the catalog ID's property to only have the SKU ID's of things
  // that are being ordered
  String[] newCatalogRefIds = new String[newCatalogRefIdsList.size()];
  newCatalogRefIdsList.toArray(newCatalogRefIds);
  if (isLoggingDebug()) {
    logDebug(&quot;old catalogRefIds=&quot; + Arrays.toString(oldCatalogRefIds)
        + &quot;, new catalogRefIds=&quot;
        + Arrays.toString(newCatalogRefIds));
  }
  setCatalogRefIds(newCatalogRefIds);

  // set the product ID's property to only have the product ID's of things
  // that are being ordered
  String[] newProductIds = new String[newProductIdsList.size()];
  newProductIdsList.toArray(newProductIds);
  if (isLoggingDebug()) {
    logDebug(&quot;old productIds=&quot; + Arrays.toString(oldProductIds)
        + &quot;, new productIds=&quot;
        + Arrays.toString(newProductIds));
  }
  setProductIds(newProductIds);
}</string></pre>


<p>Related posts:<ol><li><a href='http://betweengo.com/2010/01/14/limiting-the-quantity-added-to-a-cart/' rel='bookmark' title='Permanent Link: Limiting the Quantity Added to a Cart'>Limiting the Quantity Added to a Cart</a></li>
<li><a href='http://betweengo.com/2007/03/28/printing-out-an-array/' rel='bookmark' title='Permanent Link: Printing out an array'>Printing out an array</a></li>
<li><a href='http://betweengo.com/2009/07/31/how-to-add-products-to-categories-using-content-groups/' rel='bookmark' title='Permanent Link: How to Add Products to Categories using Content Groups'>How to Add Products to Categories using Content Groups</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2009/11/02/how-to-add-multiple-items-to-the-shopping-cart-in-atg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Update Profile in ATG Commerce</title>
		<link>http://betweengo.com/2009/09/08/update-profile-in-atg-commerce/</link>
		<comments>http://betweengo.com/2009/09/08/update-profile-in-atg-commerce/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 11:00:00 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Commerce]]></category>
		<category><![CDATA[ATG]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[Personalization]]></category>

		<guid isPermaLink="false">http://betweengo.com/2009/09/08/update-profile-in-atg-commerce/</guid>
		<description><![CDATA[    (Photo: Wolf portrait 3 by Tambako the Jaguar)
ProfileTools provides methods for updating a profile.&#160; In ATG Commerce you can access the ProfileTools via the CommerceProfileTools.
Therefore to update a profile it is as simple as calling the update methods in ProfileTools.
getCommerceProfileTools().updateProperty(propertyName,
            [...]


Related posts:<ol><li><a href='http://betweengo.com/2009/07/29/atg-product-bundles/' rel='bookmark' title='Permanent Link: ATG Product Bundles'>ATG Product Bundles</a></li>
<li><a href='http://betweengo.com/2007/02/07/accessing-javabeans-getters-and-setters/' rel='bookmark' title='Permanent Link: Accessing JavaBean&#8217;s Getters and Setters'>Accessing JavaBean&#8217;s Getters and Setters</a></li>
<li><a href='http://betweengo.com/2009/07/31/how-to-add-products-to-categories-using-content-groups/' rel='bookmark' title='Permanent Link: How to Add Products to Categories using Content Groups'>How to Add Products to Categories using Content Groups</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p style="text-align: center"><a href="http://www.flickr.com/photos/tambako/2321286393/"><img title="Wolf portrait 3 on Flickr" alt="Wolf portrait 3 on Flickr" src="http://farm3.static.flickr.com/2099/2321286393_e291026133.jpg" /></a>    <br />(Photo: <a title="Wolf portrait 3 on Flickr" href="http://www.flickr.com/photos/tambako/2321286393/">Wolf portrait 3</a> by <a title="Flickr: Tambako the Jaguar&#39;s Photostream" href="http://www.flickr.com/photos/tambako/">Tambako the Jaguar</a>)</p>
<p><a title="ProfileTools (ATG Java API)" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG2006.3/apidoc/atg/userprofiling/ProfileTools.html">ProfileTools</a> provides methods for updating a profile.&#160; In ATG Commerce you can access the ProfileTools via the <a title="CommerceProfileTools (ATG Java API)" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG2006.3/apidoc/atg/commerce/profile/CommerceProfileTools.html">CommerceProfileTools</a>.</p>
<p>Therefore to update a profile it is as simple as calling the update methods in ProfileTools.</p>
<pre>getCommerceProfileTools().updateProperty(propertyName,
                                         property, getProfile());

getCommerceProfileTools().updateProperty(propertyTable, getProfile());</pre>
<p>The update methods get the MutableRepositoryItem for the profile, set the property in the MutableRepositoryItem and then update the item in the ProfileRepository.</p>
<p>Pretty simple, eh? <img src='http://betweengo.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>


<p>Related posts:<ol><li><a href='http://betweengo.com/2009/07/29/atg-product-bundles/' rel='bookmark' title='Permanent Link: ATG Product Bundles'>ATG Product Bundles</a></li>
<li><a href='http://betweengo.com/2007/02/07/accessing-javabeans-getters-and-setters/' rel='bookmark' title='Permanent Link: Accessing JavaBean&#8217;s Getters and Setters'>Accessing JavaBean&#8217;s Getters and Setters</a></li>
<li><a href='http://betweengo.com/2009/07/31/how-to-add-products-to-categories-using-content-groups/' rel='bookmark' title='Permanent Link: How to Add Products to Categories using Content Groups'>How to Add Products to Categories using Content Groups</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2009/09/08/update-profile-in-atg-commerce/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Debug an InvalidVersionException from Updating an ATG Order</title>
		<link>http://betweengo.com/2009/08/17/how-to-debug-an-invalidversionexception-from-updating-an-atg-order/</link>
		<comments>http://betweengo.com/2009/08/17/how-to-debug-an-invalidversionexception-from-updating-an-atg-order/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 17:40:19 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Commerce]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[transactions]]></category>

		<guid isPermaLink="false">http://betweengo.com/2009/08/17/how-to-debug-an-invalidversionexception-when-updating-an-atg-order/</guid>
		<description><![CDATA[
If you ever update an order outside of a transaction then the next time you update it within a transaction you will get the infamous, dreaded InvalidVersionException.
WARN  atg.commerce.order.ShoppingCartModifier
atg.commerce.order.InvalidVersionException: This order (o3830002) is out of date. Changes have been made to the order and the operation should be resubmitted. Order version 333, Repository item version [...]


Related posts:<ol><li><a href='http://betweengo.com/2009/07/28/how-to-debug-no-output-for-atg-foreach/' rel='bookmark' title='Permanent Link: How to Debug No Output for ATG ForEach'>How to Debug No Output for ATG ForEach</a></li>
<li><a href='http://betweengo.com/2009/11/02/how-to-add-multiple-items-to-the-shopping-cart-in-atg/' rel='bookmark' title='Permanent Link: How to Add Multiple Items to the Shopping Cart in ATG'>How to Add Multiple Items to the Shopping Cart in ATG</a></li>
<li><a href='http://betweengo.com/2007/07/20/submitting-an-atg-form-using-a-text-link/' rel='bookmark' title='Permanent Link: Submitting an ATG Form Using a Text Link'>Submitting an ATG Form Using a Text Link</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p style="text-align: center"><a href="http://www.flickr.com/photos/66164549@N00/2487291985/"><img title="I thought I saw a puddy cat.... on Flickr" src="http://farm4.static.flickr.com/3067/2487291985_fe237bde20.jpg" alt="I thought I saw a puddy cat.... on Flickr" /></a></p>
<p>If you ever update an order outside of a transaction then the next time you update it within a transaction you will get the infamous, dreaded <tt><a title="InvalidVersionException (ATG Java API)" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG2006.3/apidoc/atg/commerce/order/InvalidVersionException.html">InvalidVersionException</a></tt>.</p>
<pre>WARN  atg.commerce.order.ShoppingCartModifier
atg.commerce.order.InvalidVersionException: This order (o3830002) is out of date. Changes have been made to the order and the operation should be resubmitted. Order version 333, Repository item version 334.
   at atg.commerce.order.OrderManager.updateOrder(OrderManager.java:2557)</pre>
<p>For example this could happen if you update your order in your JSP page.</p>
<pre>&lt;dsp:setvalue bean=”order.foo” value=”bar” /&gt;</pre>
<p><strong>To fix this problem you must always make sure to update an order within a transaction like this.</strong></p>
<pre>Transaction tr = null;
try {
  tr = ensureTransaction();
  synchronized (getOrder()) {
    getOrder().setFoo("bar");
    try {
      getOrderManager().updateOrder(order);
    }
    catch (Exception exc) {
      processException(exc, MSG_ERROR_UPDATE_ORDER, pRequest, pResponse);
    }
  }
}
finally {
  if (tr != null) commitTransaction(tr);
}</pre>
<p>In some cases you might find a method is called within a transaction by another method and in other cases it is not.</p>
<pre>public boolean handleFoo(DynamoHttpServletRequest req, DynamoHttpServletResponse res) {
  Transaction tr = null;
  try {
    tr = ensureTransaction();
    synchronized (getOrder()) {
      setFoo("bar");
      try {
        getOrderManager().updateOrder(order);
      }
      catch (Exception exc) {
        processException(exc, MSG_ERROR_UPDATE_ORDER, pRequest, pResponse);
      }
    }
    return checkFormRedirect(getSuccessUrl(), getErrorUrl(), req, res);
  }
  finally {
    if (tr != null) commitTransaction(tr);
  }
}

public void setFoo(String foo) {
  getOrder().setFoo(foo);
}</pre>
<p>In the above example the <tt>handleFoo</tt> method properly updates the order within the transaction.  However calling the <tt>setFoo</tt> method directly will cause a problem since the order is not updated within a transaction.  To fix this you use the same pattern again to ensure the order is updated within a transaction.  It is okay to do this more than once during a request.</p>
<p><strong>To debug this problem you can use Eclipse to make sure that wherever you update an order is always within a transaction.</strong> You can use the debugger to find which methods are called and/or you can use the call hierarchy to find out how methods are called.</p>
<p><strong>Another way to help debug this is adding JSP code similar to the one I list below.</strong> It outputs the version of the order that the form handler has and the version that is in the repository.  If there is a difference then you know that the action you took before at some point updated the order outside of a transaction.</p>
<pre>&lt;dspel:getvalueof bean="ShoppingCartModifier.order.id" var="orderId" /&gt;
FORM HANDLER ORDER ID: ${orderId}&lt;br/&gt;
FORM HANDLER ORDER VERSION: &lt;dsp:valueof bean="ShoppingCartModifier.order.version" /&gt;&lt;br/&gt;
&lt;dsp:droplet name="/atg/dynamo/droplet/RQLQueryForEach"&gt;
  &lt;dsp:param name="queryRQL" value="ID IN { \"${orderId}\" }"/&gt;
  &lt;dsp:param name="repository" value="/atg/commerce/order/OrderRepository"/&gt;
  &lt;dsp:param name="itemDescriptor" value="order"/&gt;
  &lt;dsp:oparam name="output"&gt;
    REPOSITORY ORDER VERSION: &lt;dsp:valueof param="element.version"/&gt;&lt;br/&gt;
  &lt;/dsp:oparam&gt;
&lt;/dsp:droplet&gt;</pre>
<p>For further reading please see <a title="Nabble - ATG Dynamo - Commerce Assist Returns" href="http://www.nabble.com/Commerce-Assist-Returns-td15539950.html">Nabble &#8211; ATG Dynamo &#8211; Commerce Assist Returns</a> and the <a title="Transaction Management" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG2006.3/dynprog/dynprog0801.html">Transaction Management section</a> in the <a title="ATG Dynamo Programming Guide" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG2006.3/dynprog/index.html">ATG Programming Guide</a>.</p>


<p>Related posts:<ol><li><a href='http://betweengo.com/2009/07/28/how-to-debug-no-output-for-atg-foreach/' rel='bookmark' title='Permanent Link: How to Debug No Output for ATG ForEach'>How to Debug No Output for ATG ForEach</a></li>
<li><a href='http://betweengo.com/2009/11/02/how-to-add-multiple-items-to-the-shopping-cart-in-atg/' rel='bookmark' title='Permanent Link: How to Add Multiple Items to the Shopping Cart in ATG'>How to Add Multiple Items to the Shopping Cart in ATG</a></li>
<li><a href='http://betweengo.com/2007/07/20/submitting-an-atg-form-using-a-text-link/' rel='bookmark' title='Permanent Link: Submitting an ATG Form Using a Text Link'>Submitting an ATG Form Using a Text Link</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2009/08/17/how-to-debug-an-invalidversionexception-from-updating-an-atg-order/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Add Products to Categories using Content Groups</title>
		<link>http://betweengo.com/2009/07/31/how-to-add-products-to-categories-using-content-groups/</link>
		<comments>http://betweengo.com/2009/07/31/how-to-add-products-to-categories-using-content-groups/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 21:22:45 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Commerce]]></category>
		<category><![CDATA[Personalization]]></category>
		<category><![CDATA[ACC]]></category>
		<category><![CDATA[ATG]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[targeting]]></category>

		<guid isPermaLink="false">http://betweengo.com/2009/07/31/how-to-add-products-to-categories-using-content-groups/</guid>
		<description><![CDATA[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 [...]


Related posts:<ol><li><a href='http://betweengo.com/2007/12/07/debugging-category-bad-child-products/' rel='bookmark' title='Permanent Link: Debugging a Category&#8217;s Bad Child Products'>Debugging a Category&#8217;s Bad Child Products</a></li>
<li><a href='http://betweengo.com/2009/07/29/atg-product-bundles/' rel='bookmark' title='Permanent Link: ATG Product Bundles'>ATG Product Bundles</a></li>
<li><a href='http://betweengo.com/2007/12/07/creating-buy-n-get-m-free-promotions/' rel='bookmark' title='Permanent Link: Creating Buy N Get M Free Promotions'>Creating Buy N Get M Free Promotions</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>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.</p>
<p>In the <a title="ATG Commerce Guide to Setting Up a Store" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG2006.3/commstore/index.html">ATG Commerce Guide to Setting Up a Store documentation</a> you can see in the <a title="ATG Commerce Guide to Setting Up a Store - Viewing the Product Catalog" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG2006.3/commstore/commstore0204.html">Viewing the Product Catalog</a> section that a category can have child products but also child product groups.</p>
<p style="text-align: center;"><a href="http://betweengo.com/wp-content/uploads/2009/07/product-catalog.gif"><img class="size-medium wp-image-807 aligncenter" title="Product Catalog" src="http://betweengo.com/wp-content/uploads/2009/07/product-catalog-500x363.gif" alt="Product Catalog" width="500" height="363" /></a></p>
<p>Child product groups are actually content groups which are described in the <a title="Creating Content Groups" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG2006.3/business/business0601.html">Creating Content Groups</a> chapter of the <a title="ATG Personalization Guide for Business Users" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG2006.3/business/index.html">ATG Personalization Guide for Business Users</a>.</p>
<p><a href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG2006.3/business/business0602.html"><img class="aligncenter size-medium wp-image-811" title="Targeting &gt; Profile and Content Groups window" src="http://betweengo.com/wp-content/uploads/2009/07/Image1952-500x312.gif" alt="Targeting &gt; Profile and Content Groups window" width="500" height="312" /></a></p>
<p>Though the documentation shows a content group composed of features you can easily create a content group using the <tt>ProductCatalog</tt> as a content source and <tt>product</tt> as a content type.</p>
<p>To create a content group follow the steps in the ATG documentation for <a href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG2006.3/business/business0603.html">Creating New Content Groups</a> except use an item from the <tt>ProductCatalog</tt> when specifying the Content Type.  Then create the targeting rules for this Content Group.  Now you can specify this group in the <tt>Child products (group)</tt> property of a category.</p>


<p>Related posts:<ol><li><a href='http://betweengo.com/2007/12/07/debugging-category-bad-child-products/' rel='bookmark' title='Permanent Link: Debugging a Category&#8217;s Bad Child Products'>Debugging a Category&#8217;s Bad Child Products</a></li>
<li><a href='http://betweengo.com/2009/07/29/atg-product-bundles/' rel='bookmark' title='Permanent Link: ATG Product Bundles'>ATG Product Bundles</a></li>
<li><a href='http://betweengo.com/2007/12/07/creating-buy-n-get-m-free-promotions/' rel='bookmark' title='Permanent Link: Creating Buy N Get M Free Promotions'>Creating Buy N Get M Free Promotions</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2009/07/31/how-to-add-products-to-categories-using-content-groups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ATG Product Bundles</title>
		<link>http://betweengo.com/2009/07/29/atg-product-bundles/</link>
		<comments>http://betweengo.com/2009/07/29/atg-product-bundles/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 11:00:00 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Commerce]]></category>
		<category><![CDATA[ATG]]></category>
		<category><![CDATA[ecommerce]]></category>

		<guid isPermaLink="false">http://betweengo.com/2009/07/29/atg-product-bundles/</guid>
		<description><![CDATA[
Out of the box ATG eCommerce does not support product bundles.&#160; It does support SKU bundles, i.e. a product can consist of multiple SKU’s.
To support product bundles is pretty simple to implement.
First you create a new type of product for bundles in /atg/commerce/catalog/productCatalog.xml.
&#60;item-descriptor name=&#34;product&#34;&#62;
 &#60;table name=&#34;dcs_product&#34;&#62;
  &#60;property name=&#34;type&#34; data-type=&#34;enumerated&#34; default=&#34;regular&#34;&#62;
   &#60;attribute name=&#34;useCodeForValue&#34; [...]


Related posts:<ol><li><a href='http://betweengo.com/2005/07/28/user-defined-property-type-gotchas/' rel='bookmark' title='Permanent Link: user-defined property type gotcha&#8217;s'>user-defined property type gotcha&#8217;s</a></li>
<li><a href='http://betweengo.com/2010/01/21/specifying-one-to-many-relationship-in-atg-repositories/' rel='bookmark' title='Permanent Link: Specifying One-to-Many Relationship in ATG Repositories'>Specifying One-to-Many Relationship in ATG Repositories</a></li>
<li><a href='http://betweengo.com/2007/02/07/user-defined-property-types/' rel='bookmark' title='Permanent Link: ATG Repository User-Defined Property Types'>ATG Repository User-Defined Property Types</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p style="text-align: center"><a href="http://www.flickr.com/photos/joeyparsons/3352561284/"><img class="aligncenter" title="what&#39;s in my sxsw schwag bag - photo by joey.parsons - Flickr" alt="what&#39;s in my sxsw schwag bag - photo by joey.parsons - Flickr" src="http://farm4.static.flickr.com/3421/3352561284_992ee02488.jpg?v=0" width="500" height="331" /></a></p>
<p>Out of the box ATG eCommerce does not support product bundles.&#160; It does support SKU bundles, i.e. a product can consist of multiple SKU’s.</p>
<p>To support product bundles is pretty simple to implement.</p>
<p>First you create a new type of product for bundles in <tt>/atg/commerce/catalog/productCatalog.xml</tt>.</p>
<pre>&lt;item-descriptor name=&quot;product&quot;&gt;
 &lt;table name=&quot;dcs_product&quot;&gt;
  &lt;property name=&quot;type&quot; data-type=&quot;enumerated&quot; default=&quot;regular&quot;&gt;
   &lt;attribute name=&quot;useCodeForValue&quot; value=&quot;false&quot;/&gt;
   &lt;option value=&quot;regular&quot; code=&quot;0&quot;/&gt;
   &lt;option value=&quot;bundle&quot; code=&quot;1&quot; /&gt;
 &lt;/property&gt;
 &lt;/table&gt;</pre>
<p>
  <br />Then you define your bundles product to have the new products property. This property is simply a list of products that the bundle contains, e.g. Costco organic cotton polo shirt and Nike athletic shorts.</p>
<p></p>
<pre>&lt;item-descriptor name=&quot;bundle&quot; super-type=&quot;product&quot; sub-type-value=&quot;bundle&quot;&gt;
 &lt;table name=&quot;betweengo_product_bundle&quot; multi-column-name=&quot;seq_num&quot;
  type=&quot;multi&quot; id-column-names=&quot;product_bundle_id&quot;&gt;
  &lt;property name=&quot;products&quot; column-name=&quot;product_id&quot; data-type=&quot;list&quot;
   component-item-type=&quot;product&quot; display-name=&quot;Products&quot; category=&quot;Bundle&quot; /&gt;
 &lt;/table&gt;
&lt;/item-descriptor&gt;</pre>
<p>A few years ago I did a more advanced version of this implementation which allowed for different numbers of products in one bundle, e.g. two different kinds of shirts and one pair of pants.&#160; I did this using the concept of product links which is similar to SKU links that ATG supports.</p>
<p>If you are interested in wanting to implement a more advanced version <a title="Contact betweenGo" href="http://betweengo.com/contact-us/contact-form/?your_subject=Sales">please contact us</a>.</p>


<p>Related posts:<ol><li><a href='http://betweengo.com/2005/07/28/user-defined-property-type-gotchas/' rel='bookmark' title='Permanent Link: user-defined property type gotcha&#8217;s'>user-defined property type gotcha&#8217;s</a></li>
<li><a href='http://betweengo.com/2010/01/21/specifying-one-to-many-relationship-in-atg-repositories/' rel='bookmark' title='Permanent Link: Specifying One-to-Many Relationship in ATG Repositories'>Specifying One-to-Many Relationship in ATG Repositories</a></li>
<li><a href='http://betweengo.com/2007/02/07/user-defined-property-types/' rel='bookmark' title='Permanent Link: ATG Repository User-Defined Property Types'>ATG Repository User-Defined Property Types</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2009/07/29/atg-product-bundles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ATG Consulting Interview</title>
		<link>http://betweengo.com/2008/03/10/atg-consulting-interview/</link>
		<comments>http://betweengo.com/2008/03/10/atg-consulting-interview/#comments</comments>
		<pubDate>Tue, 11 Mar 2008 05:55:49 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Commerce]]></category>
		<category><![CDATA[Form Handlers]]></category>
		<category><![CDATA[Java SE]]></category>
		<category><![CDATA[Nucleus]]></category>
		<category><![CDATA[Repository]]></category>
		<category><![CDATA[ATG]]></category>
		<category><![CDATA[interview]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://betweengo.com/atg/2008/03/10/atg-consulting-interview/</guid>
		<description><![CDATA[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&#8217;s stack have you worked with?
How do you compare ATG with Ruby on Rails?
What is Nucleus?
What [...]


Related posts:<ol><li><a href='http://betweengo.com/2005/08/08/atg-forms-do-not-work-if-action-is-an-html-page/' rel='bookmark' title='Permanent Link: ATG forms do not work if action is an HTML page'>ATG forms do not work if action is an HTML page</a></li>
<li><a href='http://betweengo.com/2006/12/15/forwarding-instead-of-redirecting-in-form-handlers/' rel='bookmark' title='Permanent Link: Forwarding instead of Redirecting in Form Handlers'>Forwarding instead of Redirecting in Form Handlers</a></li>
<li><a href='http://betweengo.com/2007/07/20/submitting-an-atg-form-using-a-text-link/' rel='bookmark' title='Permanent Link: Submitting an ATG Form Using a Text Link'>Submitting an ATG Form Using a Text Link</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>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.</p>
<ol>
<li>Which versions of ATG have you worked with?</li>
<li>What parts of ATG&#8217;s stack have you worked with?</li>
<li>How do you compare ATG with Ruby on Rails?</li>
<li>What is Nucleus?</li>
<li>What is the ATG Repository?</li>
<li>When creating form handlers typically what ATG base class do you extend?  <em>GenericFormHandler.java</em></li>
<li>When creating droplets what ATG base class do you extend?  <em>DynamoServlet.java</em></li>
<li>What form handlers and methods do you use during checkout?  <em>ShoppingCartFormHandler, numerous handlers like handleMoveToConfirm, etc.</em></li>
<li>What does a user typically see during checkout?  <em>Add to shopping cart, login, billing and shipping address, payment, confirm, confirmation, email confirmation, shipped email.</em></li>
<li>How do you compare strings in Java?  If String a = &#8220;hello&#8221; and String b= &#8220;hello&#8221; what is a == b?  <em>True, a and b both reference the same constant string.</em></li>
</ol>
<p>In another interview I was asked these questions.</p>
<ol>
<li>What is HTTP?  How does it work?</li>
<li>If HTTP is stateless then how does a web application maintain state.</li>
</ol>


<p>Related posts:<ol><li><a href='http://betweengo.com/2005/08/08/atg-forms-do-not-work-if-action-is-an-html-page/' rel='bookmark' title='Permanent Link: ATG forms do not work if action is an HTML page'>ATG forms do not work if action is an HTML page</a></li>
<li><a href='http://betweengo.com/2006/12/15/forwarding-instead-of-redirecting-in-form-handlers/' rel='bookmark' title='Permanent Link: Forwarding instead of Redirecting in Form Handlers'>Forwarding instead of Redirecting in Form Handlers</a></li>
<li><a href='http://betweengo.com/2007/07/20/submitting-an-atg-form-using-a-text-link/' rel='bookmark' title='Permanent Link: Submitting an ATG Form Using a Text Link'>Submitting an ATG Form Using a Text Link</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2008/03/10/atg-consulting-interview/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Shop.com Product Display Integration</title>
		<link>http://betweengo.com/2008/02/11/shopcom-product-display-integration/</link>
		<comments>http://betweengo.com/2008/02/11/shopcom-product-display-integration/#comments</comments>
		<pubDate>Mon, 11 Feb 2008 22:33:55 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Commerce]]></category>
		<category><![CDATA[Commons]]></category>
		<category><![CDATA[ATG]]></category>

		<guid isPermaLink="false">http://betweengo.com/atg/commerce/2008/02/11/shopcom-product-display-integration/</guid>
		<description><![CDATA[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&#8217;s GSA Repository.
Export the products into an XML file according to the PDI DTD using the XStream library.
FTP upload to Shop.com&#8217;s [...]


Related posts:<ol><li><a href='http://betweengo.com/2009/07/29/atg-product-bundles/' rel='bookmark' title='Permanent Link: ATG Product Bundles'>ATG Product Bundles</a></li>
<li><a href='http://betweengo.com/2007/12/23/turning-off-perforce-windows-explorer-integration/' rel='bookmark' title='Permanent Link: Turning off Perforce Windows Explorer Integration'>Turning off Perforce Windows Explorer Integration</a></li>
<li><a href='http://betweengo.com/2008/07/18/maven-integration-for-eclipse/' rel='bookmark' title='Permanent Link: Maven Integration for Eclipse'>Maven Integration for Eclipse</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Last year for <a title="Casual Male" href="http://casualmale.com/" target="_blank">Casual Male</a> I did the Shop.com Product Display Integration (PDI) which allows Casual Male to sell its products on <a title="Casual Male at Shop.com" href="http://www.shop.com/Casual_Male-c72864-c!.shtml">Shop.com</a>.</p>
<p>The integration involved three steps.</p>
<ol>
<li>Access all the products organized by category using ATG&#8217;s GSA Repository.</li>
<li>Export the products into an XML file according to the PDI DTD using the <a title="XStream" href="http://xstream.codehaus.org/">XStream library</a>.</li>
<li>FTP upload to Shop.com&#8217;s servers using <a title="Apache Commons Net" href="http://commons.apache.org/net/">Apache Commons Net library</a>.</li>
</ol>


<p>Related posts:<ol><li><a href='http://betweengo.com/2009/07/29/atg-product-bundles/' rel='bookmark' title='Permanent Link: ATG Product Bundles'>ATG Product Bundles</a></li>
<li><a href='http://betweengo.com/2007/12/23/turning-off-perforce-windows-explorer-integration/' rel='bookmark' title='Permanent Link: Turning off Perforce Windows Explorer Integration'>Turning off Perforce Windows Explorer Integration</a></li>
<li><a href='http://betweengo.com/2008/07/18/maven-integration-for-eclipse/' rel='bookmark' title='Permanent Link: Maven Integration for Eclipse'>Maven Integration for Eclipse</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2008/02/11/shopcom-product-display-integration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Persisting Orders</title>
		<link>http://betweengo.com/2007/12/10/persisting-orders/</link>
		<comments>http://betweengo.com/2007/12/10/persisting-orders/#comments</comments>
		<pubDate>Mon, 10 Dec 2007 22:33:04 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[ACC]]></category>
		<category><![CDATA[Commerce]]></category>
		<category><![CDATA[ATG]]></category>

		<guid isPermaLink="false">http://betweengo.com/atg/2007/12/10/persisting-orders/</guid>
		<description><![CDATA[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&#8217;t see incomplete orders being saved then this means this property is not set to true.
More information on Troubleshooting Order Problems [...]


Related posts:<ol><li><a href='http://betweengo.com/2007/11/17/date-and-timestamp-repository-data-types/' rel='bookmark' title='Permanent Link: Date and Timestamp Repository Data Types'>Date and Timestamp Repository Data Types</a></li>
<li><a href='http://betweengo.com/2007/11/15/sku-and-product-ids-in-commerceitem/' rel='bookmark' title='Permanent Link: CommerceItem, which one is the SKU ID?'>CommerceItem, which one is the SKU ID?</a></li>
<li><a href='http://betweengo.com/2009/07/31/how-to-add-products-to-categories-using-content-groups/' rel='bookmark' title='Permanent Link: How to Add Products to Categories using Content Groups'>How to Add Products to Categories using Content Groups</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>When troubleshooting orders it is really helpful to be able to view the order in the ACC.</p>
<p>By default orders are saved because <code>persistOrders</code> property of the <code>/atg/commerce/ShoppingCart</code> component is set to true. If you don&#8217;t see incomplete orders being saved then this means this property is not set to true.</p>
<p>More information on <a href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG2006.3/commprog/commprog1012.html">Troubleshooting Order Problems</a> can be found in the <a href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG2006.3/commprog/index.html">ATG Commerce Programming Guide</a>.</p>


<p>Related posts:<ol><li><a href='http://betweengo.com/2007/11/17/date-and-timestamp-repository-data-types/' rel='bookmark' title='Permanent Link: Date and Timestamp Repository Data Types'>Date and Timestamp Repository Data Types</a></li>
<li><a href='http://betweengo.com/2007/11/15/sku-and-product-ids-in-commerceitem/' rel='bookmark' title='Permanent Link: CommerceItem, which one is the SKU ID?'>CommerceItem, which one is the SKU ID?</a></li>
<li><a href='http://betweengo.com/2009/07/31/how-to-add-products-to-categories-using-content-groups/' rel='bookmark' title='Permanent Link: How to Add Products to Categories using Content Groups'>How to Add Products to Categories using Content Groups</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2007/12/10/persisting-orders/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->