Thursday, 14 November 2013 1 comments

How to configure Currency Code for Price Info in ATG / changing priceInfo.currencyCode value in atg


 PricingTools Determine the Pricing Locale. PricingTools returns the configured defaultLocale property. The pricing engines use this to determine the currency code. If you are using Oracle ATG Web Commerce’s multisite feature and want to use different currency codes for different sites, you can take the following steps:
  1. Add a pricing locale to the Site repository items.
  2. Override the PricingTools.getDefaultLocale method to retrieve the currency code for the site


    Instaed of overriding  PricingTools.getDefaultLocale method what you can also do is:

    1. Create the following folder structure 





    2. In PricingTools.properties add the bellow property, build and verify.

    defaultLocale = <<your desired locale>>

    eg: defaultLocale = en_IN (for india) this locale will return currency code as INR.



    FOR ANY QUERIES KINDLY POST A COMMENT.









0 comments

Products Not Getting Displayed in ATG / Products Not Getting Displayed for Anonymous user in ATG

If you are not able to see the products in the module you created in ATG or Products Not Getting Displayed and no error is there in your server console then:

Probably this might be because of null value in the default catalog in the profile when it is getting created. to overcome this:

1.  Create folder Structure similar to the following




2. In CatalogTools.properties add

defaultCatalogId=<<Some catalogId you have already created>>

eg: defaultCatalogId=catalog20004


Build and check the output. This will help.


FOR ANY CLARIFICATIONS KINDLY POST A COMMENT.
1 comments

How to display products and skus in ATG, How to add a Sku to cart, How to display Sku images

After Creating New ATG MODULE,( Refer Previous Post Here)




Use the Following Out Of the BOX Atg droplets to display. Code Snippet is as shown bellow:

   

<%@ taglib uri="http://www.atg.com/taglibs/daf/dspjspTaglib1_0" prefix="dsp" %>
<dsp:importbean bean="/atg/userprofiling/Profile" var="Profile"/>
<dsp:page>
<dsp:droplet name="/atg/dynamo/droplet/ForEach">

        <dsp:param name="array" bean="/atg/userprofiling/Profile.catalog.allRootCategories" />
          <dsp:param name="elementName" value="category" />
        <dsp:oparam name="output">
         <br/>

            <dsp:a href="categoryNavigation.jsp">

                <dsp:valueof param="category.displayName" />

                <dsp:param name="categoryId" param="category.id" />

            </dsp:a>

        </dsp:oparam>

    </dsp:droplet>

</dsp:page>


categoryNavigation.jsp:


 <%@ taglib uri="http://www.atg.com/taglibs/daf/dspjspTaglib1_0" prefix="dsp" %>
<dsp:page>
<dsp:droplet name="/atg/commerce/catalog/CategoryLookup">

        <dsp:param name="id" param="categoryId" />

        <dsp:param name="elementName" value="category" />

        <dsp:oparam name="output">
         <dsp:droplet name="/atg/dynamo/droplet/ForEach">

                <dsp:param name="array" param="category.childCategories" />

                <dsp:param name="elementName" value="category" />

                <dsp:oparam name="output">

                    <br />

                    <dsp:a href="categoryNavigation.jsp">

                        <dsp:valueof param="category.displayName" />

                        <dsp:param name="categoryId" param="category.id" />

                    </dsp:a>

                </dsp:oparam>

            </dsp:droplet>

            <dsp:droplet name="/atg/dynamo/droplet/ForEach">

                <dsp:param name="array" param="category.childProducts" />

                <dsp:param name="elementName" value="childProduct" />

                <dsp:oparam name="output">
<ul>
                    <br />
                        <dsp:valueof param="childProduct.id" />
                        <dsp:valueof param="childProduct.displayName" />
                        <dsp:valueof param="childProduct.childSKUs" />
                            <dsp:droplet name="/atg/dynamo/droplet/ForEach">
                                <dsp:param name="array" param="childProduct.childSKUs" />
                                <dsp:param name="elementName" value="childSKU" />
                                <dsp:oparam name="output">
                            <li>    <dsp:valueof param="childSKU.id" />
                        <dsp:valueof param="childSKU.displayName" />
                        <dsp:valueof param="childSKU.listPrice" />
                        <img src='/walletshop<dsp:valueof param="childSKU.largeImage.url"/>'/>
                        <dsp:form id="addSku" action="categoryNavigation.jsp">
                        <dsp:input bean="/atg/commerce/order/purchase/CartModifierFormHandler.addItemCount" value="1" type="hidden"/>
                        <dsp:input bean="/atg/commerce/order/purchase/CartModifierFormHandler.addItemToOrderSuccessURL" value="/walletshop/catagrydisplay.jsp" type="hidden"/>
                        <dsp:input bean="/atg/commerce/order/purchase/CartModifierFormHandler.addItemToOrderErrorURL" value="/walletshop/errors.jsp" type="hidden"/>
                        <dsp:input bean="/atg/commerce/order/purchase/CartModifierFormHandler.items[0].productId" paramvalue="childProduct.id" type="hidden"/>
                        <dsp:input bean="/atg/commerce/order/purchase/CartModifierFormHandler.items[0].quantity" type="hidden" value="1" />
                        <dsp:input bean="/atg/commerce/order/purchase/CartModifierFormHandler.items[0].catalogRefId" paramvalue="childSKU.id" type="hidden" />
                        <dsp:input bean="/atg/commerce/order/purchase/CartModifierFormHandler.pageFlow" value="true" type="hidden" />
                        <dsp:input bean="/atg/commerce/order/purchase/CartModifierFormHandler.addItemToOrder" value="add" type="hidden"/>      
                        <input type="submit"  value="Submit"/>
                        </dsp:form>
                      
                      
                      
                        </li>
                                </dsp:oparam>
                            </dsp:droplet>
</ul>
                </dsp:oparam>

            </dsp:droplet>



</dsp:oparam>

</dsp:droplet>
</dsp:page>



THE FORM IN THE categoryNavigation.jsp  IS TO ADD ITEM TO CART.




 
;