Requirements for the following code changes: CSSUI Store, PR8 Update 4
Notes BEFORE you begin:
Insert the following new code immediately following the <div class="expanded"> tag ( Or <div class="line-item"> if you are in line-item mode ) in the Category Product List Layout, Related Product List Layout, Product List Layout, and Search Results Layout tabs on pages CTGY, PROD, PLST, and SRCH. You should NOT be replacing any code, just inserting. It should look like this:
Note: the numbers in bold red can and should be changed to reflect your actual pagination settings. For example, if you have pagination set to 12 products per page, you should replace the first set of matching bold red numbers 10 with 12.
Notes BEFORE you begin:
- You will need to turn on Sorting Options, Page Numbers, and the Items Per Page Filter on the following pages in order for these functions to work: CTGY, PROD, PLST, SRCH. The changes will be made to the Category Product List Layout, Related Product List Layout, Product List Layout, and Search Results Layout tabs of their respective pages.
- THIS POST WILL NOT FIT INTO A SINGLE POST, SO IT WILL BE SPREAD ACROSS 3 POSTS, THE MAIN POST AND 2 COMMENTS. BE SURE TO READ ALL THREE POSTS
- These changes apply to the default templates. Most of you will have custom sites. This means you may have to do some digging to find where in your template the changes should go.
Insert the following new code immediately following the <div class="expanded"> tag ( Or <div class="line-item"> if you are in line-item mode ) in the Category Product List Layout, Related Product List Layout, Product List Layout, and Search Results Layout tabs on pages CTGY, PROD, PLST, and SRCH. You should NOT be replacing any code, just inserting. It should look like this:
Code:
<div class="expanded"><div id="filter-items-container"><mvt:if expr="l.settings:category_listing:products_on_page_count GT 1"> <div class="sorting"> <form method="get" action="&mvte:global:sessionurl;"> <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="Sort_By">Sort By:</label> <select name="Sort_By" onchange="this.form.submit();"> <mvt:if expr="ISNULL g.Sort_By"> <option value="disp_order" selected="selected">Default</option> <mvt:else> <option value="disp_order">Default</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> <mvt:if expr="g.Sort_By EQ 'code_asc'"> <option value="code_asc" selected="selected">Code Ascending</option> <mvt:else> <option value="code_asc">Code Ascending</option> </mvt:if> <mvt:if expr="g.Sort_By EQ 'code_desc'"> <option value="code_desc" selected="selected">Code Descending</option> <mvt:else> <option value="code_desc">Code Descending</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 'newest'"> <option value="newest" selected="selected">Newest Items</option> <mvt:else> <option value="newest">Newest Items</option> </mvt:if> </select> <noscript><input type="submit" value="go"></noscript> </form> </div></mvt:if><mvt:if expr="l.settings:category_listing:products_on_page_count GT 1"> <div class="per-page"> <form method="get" action="&mvte:global:sessionurl;"> <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="Sort_By" value="&mvte:global:Sort_By;" /> <label for="Per_Page">View:</label> <select name="Per_Page" onchange="this.form.submit();"> <mvt:if expr="g.Per_Page EQ 10"> <option value="10" selected="selected">10</option> <mvt:else> <option value="10">10</option> </mvt:if> <mvt:if expr="g.Per_Page EQ 20"> <option value="20" selected="selected">20</option> <mvt:else> <option value="20">20</option> </mvt:if> <mvt:if expr="g.Per_Page EQ 40"> <option value="40" selected="selected">40</option> <mvt:else> <option value="40">40</option> </mvt:if> <mvt:if expr="g.Per_Page EQ -1"> <option value="-1" selected="selected">All</option> <mvt:else> <option value="-1">All</option> </mvt:if> </select> <noscript><input type="submit" value="go"></noscript> </form> </div></mvt:if> <mvt:if expr="l.settings:category_listing:page_links:last_page GT 1"> <div class="page-links"> <span class="page-links-title">Page(s):</span> <span class="page-links-container"> <mvt:if expr="l.settings:category_listing:page_links:current_page NE 1"> <a href="&mvte:category_listing:page_links:prev_link;" class="page-links-previous"><</a> <mvt:else> <span class="page-links-previous page-links-deactivated"><</span> </mvt:if> <mvt:if expr="l.settings:category_listing:page_links:current_page NE l.settings:category_listing:page_links:last_page"> <a href="&mvte:category_listing:page_links:next_link;" class="page-links-next">></a> <mvt:else> <span class="page-links-next page-links-deactivated">></span> </mvt:if> <span class="page-disp"> <mvt:if expr="NOT l.settings:category_listing:page_links:contains_first"> <a href="&mvte:category_listing:page_links:first_link;" class="page-links-inactive">1</a>... </mvt:if> <mvt:foreach iterator="pages" array="category_listing:page_links:pages"> <mvt:if expr="l.settings:category_listing:page_links:current_page EQ l.settings:pages:page_num"> <span class="page-links-active">&mvte:pages:page_num;</span> <mvt:else> <a href="&mvte:pages:link;" class="page-links-inactive">&mvte:pages:page_num;</a> </mvt:if> </mvt:foreach> <mvt:if expr="NOT l.settings:category_listing:page_links:contains_last"> ...<a href="&mvte:category_listing:page_links:last_link;" class="page-links-inactive">&mvte:category_listing:page_links:last_page;</a> </mvt:if> </span> </span> </div> </mvt:if> </div><div class="clear"></div>
Note: the numbers in bold red can and should be changed to reflect your actual pagination settings. For example, if you have pagination set to 12 products per page, you should replace the first set of matching bold red numbers 10 with 12.
Comment