1 2 3 Previous Next 34 Replies Latest reply: Oct 29, 2013 2:14 AM by lam0620 RSS

    Unable to show catalog,product and sku info through jsp.

    1030836

      Hi All,

       

      I have created catalog items through ACC and with the help of categorylookup,productlookup and skulookup droplet I am trying to display catalog items .

       

      But I am getting blank page when hitting the jsps.

       

      In console I am not getting any error.

       

      Please tell me how to find out what is the cause of this?

       

      Regards,

      Vikas

        • 1. Re: Unable to show catalog,product and sku info through jsp.
          Ricky S

          is it the default catalog u created?

          Is it associated to the profile u r using?

           

          some code u using in jsp will help a bit to identify the issue.

          U see any startup errors in the console?

          • 2. Re: Unable to show catalog,product and sku info through jsp.
            Grando

            Hi,

             

            Is the catalog associated with your site?

            Are you getting correct ids to pass to lookup droplets?

            You can put logDebug in this droplets to help you find the problem.

             

            Post more information, like your code, to help us identify what is happening.

             

            Bye.

            • 3. Re: Unable to show catalog,product and sku info through jsp.
              Nitin Dubey

              Also, Adding what Grando said,

               

              1) Did u run Catalog maintance server(CMS) from dyn/ admin after adding those from ACC? If not derived property will never be set in catalog elements.

              2) If u r not using multisite, dont worry about catalog being set to profile.ATG will take care of it.

               

              try to frame ur code according to this:

               

              <dsp:droplet name="ForEach">

                      <dsp:param name="array" bean="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>

               

               

              <!--categoryNavigation.jsp-->

               

               

              <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">

                                  <br /><dsp:a href="displayProduct.jsp">

                                                 <dsp:param name="productId" param="childProduct.id" />

                                           </dsp:a>

                              </dsp:oparam>

                          </dsp:droplet>

               

              </dsp:oparam>

              </dsp:droplet>

              • 4. Re: Unable to show catalog,product and sku info through jsp.
                Swamy K

                Hi ,

                 

                I also faced the same issue and able to resolve now .Please go through the below link and it will resolve the issue.

                 

                http://atgsamples.blogspot.com/

                 

                Regards,

                Swamy K

                • 5. Re: Unable to show catalog,product and sku info through jsp.
                  1030836

                  Yes I have associated the catalog to profile but since I am not using multisite it doesn't matter.

                   

                  I am using following code as storefront.jsp:-

                   

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

                  <dsp:param bean="/atg/userprofiling/Profile.catalog.allRootCategories" name="array"/>

                  <dsp:oparam name="output">

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

                  </dsp:oparam>

                  <dsp:oparam name="output">

                  <tr>

                  <td>

                  <dsp:getvalueof id="a26" param="element.template.url" idtype="java.lang.String">

                  <dsp:a href="<%=a26%">

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

                        </dsp:a>

                  </dsp:getvalueof>

                  <dsp:param param="element.repositoryId" name="id"/>

                  <dsp:param value="pop" name="navAction"/>

                  <dsp:param param="element" name="Item"/>

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

                  </td>

                  </tr>

                  </dsp:oparam>

                  <dsp:oparam name="empty">

                  <p>No Root Categories Found.

                  </dsp:oparam>

                  </dsp:droplet>

                   

                  And while hitting this page I am getting No Root Categories Found as output.

                  Can you tell me what I am missing?

                   

                  Regards,

                  Vikas

                  • 6. Re: Unable to show catalog,product and sku info through jsp.
                    1030836

                    Yes, I have run the CMS from dyn/admin after creataing my catalog items.

                     

                    I tried your suggested code but it is not working.

                     

                    Getting the same blank page.

                     

                    Regards,

                    Vikas

                    • 7. Re: Unable to show catalog,product and sku info through jsp.
                      1030836

                      Hi,

                       

                      I tried the given suggestion but getting same issue.

                       

                      Regards,

                      Vikas

                      • 8. Re: Unable to show catalog,product and sku info through jsp.
                        1030836

                        Hi Grando,

                         

                        Below are the jsp pages-

                         

                        store.jsp:-

                         

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

                                <dsp:param name="array" bean="Profile.catalog.allRootCategories" />

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

                                <dsp:oparam name="output">

                                    <br/>

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

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

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

                                    </dsp:a>

                                </dsp:oparam>

                            </dsp:droplet>

                         

                        genericcategory.jsp:-

                         

                        <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">

                                            <br /><dsp:a href="genericproduct.jsp">

                                                           <dsp:param name="productId" param="childProduct.id" />

                                                     </dsp:a>

                                        </dsp:oparam>

                                    </dsp:droplet>

                         

                        genericproduct.jsp:-

                         

                        <dsp:droplet name="/atg/commerce/catalog/ProductLookup">

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

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

                           <%-- id would also be a param here but it was passed in --%>

                           <dsp:oparam name="output">

                                            <span>

                                            <dsp:valueof param="element.displayName">No name</dsp:valueof></span>

                                            <br>

                                            <b><dsp:valueof param="element.description"/></b></td>

                                        <tr valign=top>

                                          <td>

                                            <dsp:droplet name="IsEmpty">

                                              <dsp:param name="value" param="element.largeImage.url"/>

                                              <dsp:oparam name="false">

                                 <dsp:getvalueof id="imageURL" param="element.largeImage.url" idtype="java.lang.String">

                                                <dsp:img hspace="70" alt="Product image" src="<%=imageURL%>"/>

                          </dsp:getvalueof>

                                              </dsp:oparam>

                                            </dsp:droplet>

                                            <dsp:getvalueof id="pval0" param="element"><dsp:include page="skulist.jsp"><dsp:param name="product" value="<%=pval0%>"/></dsp:include></dsp:getvalueof>

                                            <br>                            

                                            <span>Product Description</span><br>

                                            <span><dsp:valueof param="element.longDescription">No description</dsp:valueof>

                                           </span>

                                          </td>

                                        </tr>

                                        </table>

                                      </td>

                        </dsp:oparam>

                        </dsp:droplet>

                         

                         

                        Please tell me what I am missing!

                         

                        Thanks & Regards,

                        Vikas

                        • 9. Re: Unable to show catalog,product and sku info through jsp.
                          Swamy K

                          Hi, I am suspecting profile is not associated with any catalog. Can you execute and check what is the output you r getting.                                                                         No category found for the profile.     

                          • 10. Re: Unable to show catalog,product and sku info through jsp.
                            Grando

                            Hi,

                             

                            You are using <dsp:param name="productId" param="childProduct.id" /> to pass productId to genericproduct.jsp, but in ProductLookup you are getting <dsp:param param="itemId" name="id"/>.

                            You have to use  <dsp:param param="productId" name="id"/>, using the same parameter name you are using to pass to jsp to pass to lookup droplet.

                             

                            Looking to your code, I couldn't see any other problem with it, it seems ok.

                            Try change the parameter name, to point to the right param (productId instead of itemId).

                             

                            Hope it helps !

                            • 11. Re: Unable to show catalog,product and sku info through jsp.
                              1030836

                              Hi,

                               

                              I did not get you.

                              What do you want me to print?

                               

                              Regards,

                              Vikas

                              • 12. Re: Unable to show catalog,product and sku info through jsp.
                                Nitin Dubey

                                If u have populated database with CRS details, Please verify that Store.EStore is present in ur manifest.

                                • 13. Re: Unable to show catalog,product and sku info through jsp.
                                  1030836

                                  No I have not populated data with CRS details.

                                   

                                  I have  populated the db with the ddl of required modules-das,dps,dss,dcs and motorpriseall_ddl.sql.

                                  • 14. Re: Unable to show catalog,product and sku info through jsp.
                                    Nitin Dubey

                                    Have u added motorprise module in  manifest?

                                    1 2 3 Previous Next