Thursday, September 4, 2014

Ordering Categories By Sequence in Left Navigation

Without adding the logic below in CategoryFacetDisplay.jspf, OOB gets the categories by quantity product under each category by default to change that ordering to by sequence no in CATGRPREL. You need to add the following code to reorder the list. This would fix the left navigation.

This is a good example of ArrayList manipulation in JSP


<wcf:useBean var="sequenceBasedFacetFieldList" classname="java.util.ArrayList"/>
<wcbase:useBean id="currentCategoryDataBean" classname="com.ibm.commerce.catalog.beans.CategoryDataBean">
<c:set target="${currentCategoryDataBean}" property="categoryId" value="${WCParam.categoryId}" />
</wcbase:useBean>
<c:forEach var="catDB" items="${currentCategoryDataBean.subCategories }">
<c:forEach var="item1" items="${facetField.entry }">
<c:if test="${item1.value == catDB.categoryId }">
<wcf:set target="${sequenceBasedFacetFieldList}" value="${item1 }"/>
</c:if>
</c:forEach>
</c:forEach>
<wcf:useBean var="categoryFacetList" classname="java.util.ArrayList"/>


<c:forEach var="item" items="${sequenceBasedFacetFieldList}" varStatus="aStatus">

....................

27 comments:

  1. Websphere commerce server Online Training, http://www.21cssindia.com/courses/webspere-commerce-server-online-training-200.html Websphere commerce server Online Training, Websphere commerce server Training, Websphere commerce server, Websphere commerce server Online Training| Websphere commerce server Training| Websphere commerce server| "Courses at 21st Century Software Solutions
    Talend Online Training -Hyperion Online Training - IBM Unica Online Training - Siteminder Online Training - SharePoint Online Training - Informatica Online Training - SalesForce Online Training - Many more… | Call Us +917386622889 - +919000444287 - contact@21cssindia.com
    Visit: http://www.21cssindia.com/courses.html"

    ReplyDelete
  2. Thanqs For Nice Information,Keen Technologies is one the best SAP BPC Online Training ,http://www.keentechnologies.com/sap-bpc-online-training.html,for more details visit our website.

    ReplyDelete
  3. That's awesum ! really liked your blog.I forwarded your blog to all of my BPC Consultants .SAP BPC ONLINE TRAINING

    ReplyDelete
  4. Nice information. I was searching for the same. It helped me alot and saved my time. Thanks alot SAP BPC ONLINE TRAINING

    ReplyDelete
  5. What a dazzling completed venture! I need to simply find a comfortable place to sit and unwind for some time. sap training in indore

    ReplyDelete
  6. This comment has been removed by the author.

    ReplyDelete
  7. Hello everyone,
    I have gone through your posts and came to see that the posts made by you are informatica. As well as I am already a reader of your RSS feed. And I will be following you all the way of my research. Thanks for providing information.

    ReplyDelete
  8. Thanks for Sharing such a useful information....

    Learn INFORMATICA through Online for Details Please go through the Link...

    Online INFORMATICA Training | USA | UK | AUSTRALIA | CANADA | SINGAPORE | JAPAN

    ReplyDelete
  9. This is such a amazing blog you share with us, looking forward to more amazing blog
    Crazy Bulk Reviews

    ReplyDelete
  10. Hi,
    very nice blog!!
    I enjoy reading through your article post, I wanted to write a little comment to support you and wish you a good continuation all the best for all your blogging efforts.
    Sap Testing Online Training

    ReplyDelete
  11. I have read your information its very useful topic for me. Thanks for providing information. Hyderabadsys providing online training services
    Informatica Online Training

    ReplyDelete
  12. Crazy bulk is one of the ideal options to build quality and strongest muscles masses just in 2 to 3 weeks. This is the greatest product for muscle growth that provides the good muscle size. The person who is looking for the right muscle gaining supplement they can choose this crazy bulk product to gain powerful muscles as well as the crazy bulk helps to increase your stamina. http://www.crazybulkstacks.com/

    ReplyDelete
  13. Crazy Bulk - Crazy bulk is one of the ideal options to build quality and strongest muscles masses just in 2 to 3 weeks. This is the greatest product for muscle growth & Read Crazy Bulk Review first. Provides the good muscle size. The person who is looking for the right muscle gaining supplement they can choose this crazy bulk product to gain powerful muscles as well as the crazy bulk helps to increase your stamina.
    http://www.crazybulkstacks.com/

    ReplyDelete
  14. Crazy Bulk - Crazy bulk is one of the ideal options to build quality and strongest muscles masses just in 2 to 3 weeks. This is the greatest product for muscle growth & Read Crazy Bulk Review first. Provides the good muscle size. The person who is looking for the right muscle gaining supplement they can choose this crazy bulk product to gain powerful muscles as well as the crazy bulk helps to increase your stamina.
    http://www.crazybulkstacks.com/
    https://youtu.be/MY-X-0GTcNg

    ReplyDelete
  15. Bodybuilding Vitamins That Every Bodybuilders Must To Consume
    The mission of every bodybuilder is to build smart and powerful muscles. For this every bodybuilder need to train smartly, include healthy nutrition’s in a suitable quantity, acquire high level of motivation and loyalty towards your fitness and diet program and do a lot of other things for the growth of their body muscles and overall body functionality. You need to sincere with yourself and do all things that you believe to be compulsory
    CrazyBulk, crazybulkreview, crazybulkdiscount
    http://www.crazybulksale.com/

    ReplyDelete
  16. Thank you for this valuable information. I have got some important suggestions from it. Get your business to the next level in simple steps.
    ERP Software Solutions in Chennai.

    ReplyDelete
  17. Thank you for Sharing. I'm working in brave technologies private limited, We are the best erp software developers based in chennai. erp providers in chennai

    ReplyDelete
  18. You post explain everything in detail and it was very interesting to read. Thank you.
    Best institute chennai

    ReplyDelete
  19. Awesome blog., In JSP the example of ordering categories by sequence in left navigation was superb as well as explained clearly., Thank u for sharing. Software Testing Training in Chennai | Six Sigma Certification Training in Chennai | Selenium Training in Chennai

    ReplyDelete
  20. seo services in chennai
    Really an amazing post..! By reading your blog post i gained more information.

    ReplyDelete