Announcement

Collapse
No announcement yet.

Sort by / Show All

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

    Sort by / Show All

    Is there an easy way to get a Show All for the Sort_By drop down form? Or is this a module solution.

    I have bootstrap, Miva PR 9, latest version.

    Thanks,

    Jamie
    Jamie Donaldson
    JSDVS Web Design / Development
    Web Design | Web Development | E-commerce Design & Integration

    #2
    Re: Sort by / Show All

    Yes, you just need to pass -1 for the Per_Page value:

    http://suivant-theme.mivamerchantdev...er&Per_Page=-1
    Brennan Heyde
    VP Product
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment


      #3
      Re: Sort by / Show All

      Okay, no dice....here's a couple of versions I am inserting but neither are working:

      Code:
      <mvt:if expr="g.Sort_By EQ 'Per_Page=-1'">
          <option value="Per_Page=-1" selected="selected">Show All</option>
      <mvt:else>
          <option value="Per_Page=-1">Show All</option>
      </mvt:if>
      
      and
      
      
      <mvt:if expr="g.Sort_By EQ 'disp_order&Per_Page=-1'">
          <option value="disp_order&Per_Page=-1" selected="selected">Show All</option>
      <mvt:else>
          <option value="disp_order&Per_Page=-1">Show All</option>
      </mvt:if>
      No errors, just doesn't do anything. Am I anywhere close with either of those above?

      Jamie
      Jamie Donaldson
      JSDVS Web Design / Development
      Web Design | Web Development | E-commerce Design & Integration

      Comment


        #4
        Re: Sort by / Show All

        Originally posted by jsdva View Post
        Okay, no dice....here's a couple of versions I am inserting but neither are working:

        Code:
        <mvt:if expr="g.Sort_By EQ 'Per_Page=-1'">
            <option value="Per_Page=-1" selected="selected">Show All</option>
        <mvt:else>
            <option value="Per_Page=-1">Show All</option>
        </mvt:if>
        
        and
        
        
        <mvt:if expr="g.Sort_By EQ 'disp_order&Per_Page=-1'">
            <option value="disp_order&Per_Page=-1" selected="selected">Show All</option>
        <mvt:else>
            <option value="disp_order&Per_Page=-1">Show All</option>
        </mvt:if>
        No errors, just doesn't do anything. Am I anywhere close with either of those above?

        Jamie
        from the suviant theme looks more like..

        Code:
        <div class="row bg-white bottom-shadow filter-items-container">    <div class="column whole medium-half large-one-third sorting">
                <mvt:if expr="l.settings:search_results:products_on_page_count GT 1">
                    <form method="get" action="&mvte:global:sessionurl;" class="inline-labeling nm">
                        <input type="hidden" name="Screen" value="&mvte:global:Screen;" />
                        <input type="hidden" name="Store_Code" value="&mvte:global:Store_Code;" />
                        <input type="hidden" name="Category_Code" value="&mvte:global:Category_Code;" />
                        <input type="hidden" name="Product_Code" value="&mvte:global:Product_Code;" />
                        <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>
                    <!-- end sorting -->
                </mvt:if>
            </div>
        and
        Code:
        <nav class="column whole medium-half large-three-twelfths medium-align-right large-align-left per-page">		<mvt:if expr="l.settings:search_results:products_on_page_count GT 1">
        			<ul>
        				<li class="medium uppercase">View</li>
        				<mvt:if expr="g.Per_Page EQ 12">
        					<li><a href="&mvte:global:sessionurl;Screen=&mvte:global:Screen;&Store_Code=&mvte:global:Store_Code;&Category_Code=&mvte:global:Category_Code;&Product_Code=&mvte:global:Product_Code;&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:global:sessionurl;Screen=&mvte:global:Screen;&Store_Code=&mvte:global:Store_Code;&Category_Code=&mvte:global:Category_Code;&Product_Code=&mvte:global:Product_Code;&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:global:sessionurl;Screen=&mvte:global:Screen;&Store_Code=&mvte:global:Store_Code;&Category_Code=&mvte:global:Category_Code;&Product_Code=&mvte:global:Product_Code;&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:global:sessionurl;Screen=&mvte:global:Screen;&Store_Code=&mvte:global:Store_Code;&Category_Code=&mvte:global:Category_Code;&Product_Code=&mvte:global:Product_Code;&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:global:sessionurl;Screen=&mvte:global:Screen;&Store_Code=&mvte:global:Store_Code;&Category_Code=&mvte:global:Category_Code;&Product_Code=&mvte:global:Product_Code;&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:global:sessionurl;Screen=&mvte:global:Screen;&Store_Code=&mvte:global:Store_Code;&Category_Code=&mvte:global:Category_Code;&Product_Code=&mvte:global:Product_Code;&Search=&mvte:global:Search;&Sort_By=&mvte:global:Sort_By;&Per_Page=-1">All</a></li>
        				</mvt:if>
        			</ul>
        			<!-- end per-page -->
        		</mvt:if>
        	</nav>
        Last edited by Mark Hood; 02-25-15, 08:10 AM.
        Mark Hood
        Vermont Gear

        Comment


          #5
          Re: Sort by / Show All

          You are the absolute best Mark!! I am using the bootstrap framework, so I just added it to the end of the paging section. Instead of the drop down, I should have been focused on the paging all along. Thank you so much for setting me straight!

          Jamie
          Jamie Donaldson
          JSDVS Web Design / Development
          Web Design | Web Development | E-commerce Design & Integration

          Comment

          Working...
          X