Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-6798

Broken filter links if using ecommerce Layered Navigation

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: Trunk
    • Fix Version/s: 14.12.01, 16.11.01
    • Component/s: ecommerce
    • Labels:
    • Environment:

      Any

      Description

      If you enable Layered Navigation in the ecommerce (via CatalogScreens.xml) the Sub-Category and color filter links have no closing </a> tag.

      Patch attached.

      1. LayeredNavBar.ftl.patch
        2 kB
        Jason Reast-Jones
      2. LayeredNavScreenlet.png
        3 kB
        Jason Reast-Jones

        Activity

        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Thanks Jason,

        Your augmented patch is in
        trunk r1724566
        R15.12 r1724569
        R14.12 r1724570

        I began to handle conflicts in older releases but gave up, not important enough...

        I had also to change LayeredNavigation.groovy

        Show
        jacques.le.roux Jacques Le Roux added a comment - Thanks Jason, Your augmented patch is in trunk r1724566 R15.12 r1724569 R14.12 r1724570 I began to handle conflicts in older releases but gave up, not important enough... I had also to change LayeredNavigation.groovy
        Hide
        jacques.le.roux Jacques Le Roux added a comment - - edited

        Yes, I did the change for seeing the layered navigation in CatalogScreens.xml + the change in LayeredNavigation.groovy, I just did not know where to look. Thanks to you, I see it now . It seems no special view state is needed.

        I will commit the change you suggested + the change in LayeredNavigation.groovy

        Show
        jacques.le.roux Jacques Le Roux added a comment - - edited Yes, I did the change for seeing the layered navigation in CatalogScreens.xml + the change in LayeredNavigation.groovy, I just did not know where to look. Thanks to you, I see it now . It seems no special view state is needed. I will commit the change you suggested + the change in LayeredNavigation.groovy
        Show
        jreast Jason Reast-Jones added a comment - Maybe you need to be in a certain view state too: http://localhost:8080/ecommerce/control/category/~category_id=200?removeConstraint=2&clearSearch=N&searchCategoryId=200
        Hide
        jreast Jason Reast-Jones added a comment - - edited

        Are you not seeing the layered navigation as per the attached screenshot? On the left below the category tree. You have to change this to enable it.

        Index: specialpurpose/ecommerce/widget/CatalogScreens.xml
        ===================================================================
        --- specialpurpose/ecommerce/widget/CatalogScreens.xml	(revision 1724393)
        +++ specialpurpose/ecommerce/widget/CatalogScreens.xml	(working copy)
        @@ -164,10 +164,10 @@
         
                         <set field="titleProperty" value="PageTitleCategoryPage"/>
                         <script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Category.groovy"/>
        -                <!-- Open this commented section for the demo of Layered Navigation, navigate through Gizmo and Widgets categories to see it in action.
        +                <!-- Open this commented section for the demo of Layered Navigation, navigate through Gizmo and Widgets categories to see it in action.-->
                         <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/LayeredNavigation.groovy"/>
                         <set field="detailScreen" value="LayeredCategoryDetail"/>
        -                 -->
        +                 
                         <set field="tabButtonItem" value="LookupProductCategories"/>
                     </actions>
                     <widgets>
        
        Show
        jreast Jason Reast-Jones added a comment - - edited Are you not seeing the layered navigation as per the attached screenshot? On the left below the category tree. You have to change this to enable it. Index: specialpurpose/ecommerce/widget/CatalogScreens.xml =================================================================== --- specialpurpose/ecommerce/widget/CatalogScreens.xml (revision 1724393) +++ specialpurpose/ecommerce/widget/CatalogScreens.xml (working copy) @@ -164,10 +164,10 @@ <set field= "titleProperty" value= "PageTitleCategoryPage" /> <script location= "component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Category.groovy" /> - <!-- Open this commented section for the demo of Layered Navigation, navigate through Gizmo and Widgets categories to see it in action. + <!-- Open this commented section for the demo of Layered Navigation, navigate through Gizmo and Widgets categories to see it in action.--> <script location= "component://ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/LayeredNavigation.groovy" /> <set field= "detailScreen" value= "LayeredCategoryDetail" /> - --> + <set field= "tabButtonItem" value= "LookupProductCategories" /> </actions> <widgets>
        Hide
        jreast Jason Reast-Jones added a comment -

        I'll double-check maybe the other files have changed too.

        Show
        jreast Jason Reast-Jones added a comment - I'll double-check maybe the other files have changed too.
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        But I'm still unsure how to use this

        Show
        jacques.le.roux Jacques Le Roux added a comment - But I'm still unsure how to use this
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        OK I partially answered to myself looking at OFBIZ-3186

        Show
        jacques.le.roux Jacques Le Roux added a comment - OK I partially answered to myself looking at OFBIZ-3186
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        I just tried but had also to change

        Index: specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/LayeredNavigation.groovy
        ===================================================================
        --- specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/LayeredNavigation.groovy	(revision 1723830)
        +++ specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/LayeredNavigation.groovy	(working copy)
        @@ -59,7 +59,7 @@
             productCategoryRollups = from("ProductCategoryRollup").where("productCategoryId", searchCategoryId).filterByDate().queryList();
             previousCategoryId = null;
             if (productCategoryRollups) {
        -        for (GenericValue categoryRollup : productCategoryRollups) {
        +        for (categoryRollup in productCategoryRollups) {
                     categoryConstraint = new ProductSearch.CategoryConstraint(categoryRollup.parentProductCategoryId, true, false);
                     if (searchConstraintList.contains(categoryConstraint)) {
                         previousCategoryId = categoryRollup.parentProductCategoryId;
        

        Now, what does this add? I don't see much differences, were you just curious?

        Show
        jacques.le.roux Jacques Le Roux added a comment - I just tried but had also to change Index: specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/LayeredNavigation.groovy =================================================================== --- specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/LayeredNavigation.groovy (revision 1723830) +++ specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/LayeredNavigation.groovy (working copy) @@ -59,7 +59,7 @@ productCategoryRollups = from( "ProductCategoryRollup" ).where( "productCategoryId" , searchCategoryId).filterByDate().queryList(); previousCategoryId = null ; if (productCategoryRollups) { - for (GenericValue categoryRollup : productCategoryRollups) { + for (categoryRollup in productCategoryRollups) { categoryConstraint = new ProductSearch.CategoryConstraint(categoryRollup.parentProductCategoryId, true , false ); if (searchConstraintList.contains(categoryConstraint)) { previousCategoryId = categoryRollup.parentProductCategoryId; Now, what does this add? I don't see much differences, were you just curious?
        Hide
        jreast Jason Reast-Jones added a comment -

        Patch to add closing </a> to links.

        Show
        jreast Jason Reast-Jones added a comment - Patch to add closing </a> to links.

          People

          • Assignee:
            jacques.le.roux Jacques Le Roux
            Reporter:
            jreast Jason Reast-Jones
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development