mobiquio Posted October 20, 2011 Share Posted October 20, 2011 I am just wondering if the Default "Sort By" Product Dropdown is working properly. I am using Version 1.4.4.0 Anyways the dropdown selection price:lowest price:highest product name: A to Z product name: Z to A In-stock first Does not seem to Fire the Javascript when viewing the products on the product list page...However it does seem to work on the list produced when searching. It is able to sort the searched product list and the manufactures product list but not main product list. In both cases it shows the Javascript is present as well as the Select Options. It looks like the only difference is the URL that is being query'd, Is it a problem with Friendly URLS or BUG or something. This Code DOES NOT WORK (Nothing Sorts) <!-- Sort products --> <script type="text/javascript"> //<![CDATA[ $(document).ready(function() { $('#selectPrductSort').change(function() { var requestSortProducts = 'http://www.totsandteapots.com/shop/45-my-blankee'; var splitData = $(this).val().split(':'); document.location.href = requestSortProducts + ((requestSortProducts.indexOf('?') < 0) ? '?' : '&') + 'orderby=' + splitData[0] + '&orderway=' + splitData[1]; }); }); //]]> </script> <form id="productsSortForm" action="http://www.totsandteapots.com/shop/45-my-blankee"> <p class="select"> <select id="selectPrductSort"> <option value="position:asc" selected="selected">--</option> <option value="price:asc" >Price: lowest first</option> <option value="price:desc" >Price: highest first</option> <option value="name:asc" >Product Name: A to Z</option> <option value="name:desc" >Product Name: Z to A</option> <option value="quantity:desc" >In-stock first</option> </select> <label for="selectPrductSort">Sort by</label> </p> </form> <!-- /Sort products --> This Code IS WORKING (Sorting Fine) <!-- Sort products --> <script type="text/javascript"> //<![CDATA[ $(document).ready(function() { $('#selectPrductSort').change(function() { var requestSortProducts = 'http://www.totsandteapots.com/shop/search?search_query=my+blankee&submit_search=Search'; var splitData = $(this).val().split(':'); document.location.href = requestSortProducts + ((requestSortProducts.indexOf('?') < 0) ? '?' : '&') + 'orderby=' + splitData[0] + '&orderway=' + splitData[1]; }); }); //]]> </script> <form id="productsSortForm" action="http://www.totsandteapots.com/shop/search?search_query=my+blankee&submit_search=Search"> <p class="select"> <select id="selectPrductSort"> <option value="position:asc" selected="selected">--</option> <option value="price:asc" >Price: lowest first</option> <option value="price:desc" >Price: highest first</option> <option value="name:asc" >Product Name: A to Z</option> <option value="name:desc" >Product Name: Z to A</option> <option value="quantity:desc" >In-stock first</option> </select> <label for="selectPrductSort">Sort by</label> </p> </form> <!-- /Sort products --> Link to comment Share on other sites More sharing options...
tully1 Posted January 26, 2012 Share Posted January 26, 2012 Hi, Did you solve this problem? I'm having the same problem. Maybe we can help each other out? Regards, Rob Link to comment Share on other sites More sharing options...
powerleds Posted May 11, 2012 Share Posted May 11, 2012 Same problem on my shop running 1.4.7.0. However the sorter does work in one category and does not in another one. any news? Link to comment Share on other sites More sharing options...
GekaO Posted July 7, 2012 Share Posted July 7, 2012 (edited) I found the same problem, but there is one difference - "sort by price" is working everywhere, "sort by name" is not working only in product-list. I have solved my problem. There was my fault. For sorting files in the category view answer the file /classes/category.php. In the beginning of the project, i has edited the line 575, adding there "sort by id". After deleting this condition, sorting is working as it must. Edited July 8, 2012 by GekaO (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts