2 Replies Latest reply: Jan 6, 2013 11:39 PM by RMishra RSS

    how to display a list of products using productLookUp Droplet

    Raghuram A
      Hi,
      Iam passing a list to jsp which is having prouctIds ... how to display all the product name of all products in that list using prouctLookUp and ForEach droplets.... Or is there any other way to do this ....
        • 1. Re: how to display a list of products using productLookUp Droplet
          Manohar Narsupalli
          try following with foreach and productlookup droplets:

          <dsp:droplet name="/atg/dynamo/droplet/ForEach">
          <dsp:param param="productIdList" name="array"/>
          <dsp:oparam name="output">     
                    <dsp:droplet name="/atg/commerce/catalog/ProductLookup">
                    <dsp:param param="element" name="id"/>
                    <dsp:oparam name="output">
                    <dsp:valueof param="element.displayName"/>
                    </dsp:oparam>
                    </dsp:droplet>
               </dsp:oparam>
          </dsp:droplet>
          • 2. Re: how to display a list of products using productLookUp Droplet
            RMishra
            .... Or is there any other way to do this ...
            Same code as above using using category.childProducts:
            <dsp:droplet name="CategoryLookup">
              <dsp:param param="categoryId" name="id"/>
              <dsp:param value="category" name="elementName"/>
              <dsp:oparam name="output">
                   <dsp:droplet name="ForEach">
                        <dsp:param name="array" param="category.childProducts"/>
                        <dsp:oparam name="output">
                             <dsp:droplet name="ProductLookup">
                                  <dsp:param param="productId" name="id"/>
                                  <dsp:param value="product" name="elementName"/>
                                  <dsp:oparam name="output">                                 
                                        use your code here
                                  </dsp:oparam>
                           </dsp:droplet>
                        </dsp:oparam>       
                   </dsp:droplet>
              </dsp:oparam>
            </dsp:droplet>
            -RMishra