Oracle ATG – Code to display items in Shopping Cart

Oracle ATG – Code to display items in ShoppingCart

ShoppingCart

<dsp:droplet name="ForEach">
    <dsp:param name="array"  bean="/atg/commerce/Shoppingcart.current.commerceItems"/>
       <dsp:oparam name="output">
            <dsp:param name="commerceItem" param="element"/>
            <input type="text" size="3"  value='<dsp:valueof param="commerceItem.quantity"/>'>
            <dsp:valueof param="commerceItem.catalogRefId"/>
            <dsp:valueof converter="currency" 
                 param="commerceItemi.priceInfo.listPrice">no price</dsp:valueof>
            <dsp:valueof converter="currency" 
                 param="commerceItem.priceInfo.amount">no price</dsp:valueof>
       </dsp:oparam>
</dsp:droplet>
Shoppingcart.current.commerceItems –  allows to retrieve the ShoppingCart (OrderHolder) and display the items on the web page. Most preferred mechanism to display the commerce items and  can retrieve other required values using this without having to create additional objects.
This holds good across the application as the ShoppingCart  is a session component.
commerceItem.quantity – Will display the quantity id the current commerce item
commerceItemi.priceInfo.listPrice  – Will display the List price of the commerce item
commerceItem.priceInfo.amount – Will display the Amount (Sale Price) of the commerce item.

You may also like this

seperator

About TechnoStixs.com

Personalization related tables in Oracle ATG

ORACLE ATG ENDECA & JAVA TECHNOLOGY XCHANGE SYSTEM. TechnoStixs.com is a dedicated weblog for Oracle ATG, Oracle Endeca, Java/J2EE and web developers. We take pride in our work. Every publication is carefully analyzed, written and tested to ease the understanding of the topic or subject.

We cover Oracle ATG, Oracle Endeca, Java Core Technologies, eCommerce, J2EE Frameworks, Web Service, Build Tools, Unit Test Frameworks and Others.

1,902 total views, 2 views today

Add comment