Announcement

Collapse
No announcement yet.

Sort by broken on CTGY

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Sort by broken on CTGY

    Adding this to the new sub-forum:

    I notice on the Iron and Wool theme, a couple of things on the CTGY page:

    1) The VIEW 12/24/All links don't work correctly with SEO URLs. For example we have a page like this:
    HTML Code:
    http://www.example.com/category/name.html
    If I go to click on any of the View options, it returns an error because it's trying to load this url:
    Code:
    http://www.example.com/category/name.html?&Category_Code=name&Product_Code=&Search=&Sort_By=disp_order&Per_Page=12
    Also the Sort By dropdown doesn't work.

    I notice the Sort by and these links work on the Search Results page.


    2) When editing the Category Product List Layout, I notice that you have to keep it in Advanced mode. Switching to Point & click reverts to the old CTGY layout.

    3) In the Category Product List Layout, switching Items per page filter to off does nothing.


    -Kevin
    Last edited by lancermedia; 01-27-16, 02:31 PM.
    Web Design and Development, Internet Marketing
    Lancer Media, Inc.

    #2
    Hi Kevin,

    There are a couple of changes needed to make the per page and sorting functions work with URI management on the category page.

    Sort By
    Code:
        <form method="post" action="&mvte:urls:_self:auto;" class="inline-labeling nm">
            <input type="hidden" name="Search" value="&mvte:global:Search;" />
            <input type="hidden" name="Per_Page" value="&mvte:global:Per_Page;" />
            <label for="l-sort-by" class="medium uppercase">Sort By</label>
            <select name="Sort_By" id="l-sort-by" class="input-medium" onChange="this.form.submit();">
                <mvt:if expr="ISNULL g.Sort_By">
                    <option value="disp_order" selected="selected">Sort By&hellip;</option>
                <mvt:else>
                    <option value="disp_order">Sort By&hellip;</option>
                </mvt:if>
                <mvt:if expr="g.Sort_By EQ 'newest'">
                    <option value="newest" selected="selected">Newest</option>
                <mvt:else>
                    <option value="newest">Newest</option>
                </mvt:if>
                <mvt:if expr="g.Sort_By EQ 'bestsellers'">
                    <option value="bestsellers" selected="selected">Best Selling</option>
                <mvt:else>
                    <option value="bestsellers">Best Selling</option>
                </mvt:if>
                <mvt:if expr="g.Sort_By EQ 'price_asc'">
                    <option value="price_asc" selected="selected">Lowest Price</option>
                <mvt:else>
                    <option value="price_asc">Lowest Price</option>
                </mvt:if>
                <mvt:if expr="g.Sort_By EQ 'price_desc'">
                    <option value="price_desc" selected="selected">Highest Price</option>
                <mvt:else>
                    <option value="price_desc">Highest Price</option>
                </mvt:if>
                <mvt:if expr="g.Sort_By EQ 'name_asc'">
                    <option value="name_asc" selected="selected">Name Ascending</option>
                <mvt:else>
                    <option value="name_asc">Name Ascending</option>
                </mvt:if>
                <mvt:if expr="g.Sort_By EQ 'name_desc'">
                    <option value="name_desc" selected="selected">Name Descending</option>
                <mvt:else>
                    <option value="name_desc">Name Descending</option>
                </mvt:if>
            </select>
            <noscript><input type="submit" value="go" title="go" /></noscript>
        </form>
    Per Page
    Code:
        <ul>
            <li class="medium uppercase">View</li>
            <mvt:if expr="g.Per_Page EQ 12">
                <li><a href="&mvte:urls:_self:auto_sep;Search=&mvte:global:Search;&Sort_By=&mvte:global:Sort_By;&Per_Page=12" data-selected="selected">12</a> &#47;</li>
            <mvt:else>
                <li><a href="&mvte:urls:_self:auto_sep;Search=&mvte:global:Search;&Sort_By=&mvte:global:Sort_By;&Per_Page=12">12</a> &#47;</li>
            </mvt:if>
            <mvt:if expr="g.Per_Page EQ 24">
                <li><a href="&mvte:urls:_self:auto_sep;Search=&mvte:global:Search;&Sort_By=&mvte:global:Sort_By;&Per_Page=24" data-selected="selected">24</a> &#47;</li>
            <mvt:else>
                <li><a href="&mvte:urls:_self:auto_sep;Search=&mvte:global:Search;&Sort_By=&mvte:global:Sort_By;&Per_Page=24">24</a> &#47;</li>
            </mvt:if>
            <mvt:if expr="g.Per_Page EQ -1">
                <li><a href="&mvte:urls:_self:auto_sep;Search=&mvte:global:Search;&Sort_By=&mvte:global:Sort_By;&Per_Page=-1" data-selected="selected">All</a></li>
            <mvt:else>
                <li><a href="&mvte:urls:_self:auto_sep;Search=&mvte:global:Search;&Sort_By=&mvte:global:Sort_By;&Per_Page=-1">All</a></li>
            </mvt:if>
        </ul>
    For #2, that is how the interface function. As for #3, unless you use only the point-and-click version, the per page will not dynamically update.
    Matt Zimmermann

    Miva Web Developer
    Alchemy Web Development
    https://www.alchemywebdev.com
    Site Development - Maintenance - Consultation

    Miva Certified Developer
    Miva Professional Developer

    https://www.dev4web.net | Twitter

    Comment


      #3
      Thank you Matt!!

      -Kevin
      Web Design and Development, Internet Marketing
      Lancer Media, Inc.

      Comment

      Working...
      X