clustersolutions Posted May 15, 2015 Share Posted May 15, 2015 @@BrockleyJohn, I just added a column to the products table as it is just an attribute...probably a big no no for no core code change. A nice thing about the core code was that adding a column had never broke anything for me. Just a pain during upgrade time... I run a stored procedure nightly to update the sort_analytic column... Link to comment Share on other sites More sharing options...
evbeej Posted September 14, 2015 Share Posted September 14, 2015 Hello, I was wondering if it was possible to have multiple drop downs rather than all the options being in just the one. for example: [product name] - with a drop down for [A - Z] and [Z - A] [Product Price] with a drop down for [low - high] and [high-low] etc.. similar to this: https://www.dropbox.com/s/fsaqqcnvpzoewcz/product-sort.jpg?dl=0 Thanks, Link to comment Share on other sites More sharing options...
♥Tsimi Posted February 17, 2016 Author Share Posted February 17, 2016 For those of you that have this Products Sort feature installed. There seems to be a problem with the sorting function when selecting a manufacturer from the manufacturers side box. Thanks to John for pointing this out. :thumbsup: Please apply the following code change to fix this. Open your product_listing.php and look for this code echo (isset($_GET['cPath']) ? tep_draw_hidden_field('cPath', $_GET['cPath']) : '') ; echo (isset($_GET['filter_id']) ? tep_draw_hidden_field('filter_id', $_GET['filter_id']) :''); replace with this echo (isset($_GET['cPath']) ? tep_draw_hidden_field('cPath', $_GET['cPath']) : '') ; echo (isset($_GET['filter_id']) ? tep_draw_hidden_field('filter_id', $_GET['filter_id']) :''); echo (isset($_GET['manufacturers_id']) ? tep_draw_hidden_field('manufacturers_id', $_GET['manufacturers_id']) :''); That's it already. Now you should be able to sort the products no matter if you select the manufacturer from the side box or if you browse through the categories. Link to comment Share on other sites More sharing options...
Psytanium Posted August 24, 2017 Share Posted August 24, 2017 I'm using the products specifications filter module, it's not working with this sorting module, when I choose a sorting option, the specification filter reset. anyone know how to make the 2 modules work together ? Link to comment Share on other sites More sharing options...
♥Moxamint Posted September 14, 2017 Share Posted September 14, 2017 @Tsimi Hi Lambros this sort filter works wonderfully well on my site. Thank you very much! My question though is not really related to this feature - I am trying to add the text "Sort By" in front of the filter dropdown (we have TEXT_SORT_BY ready in the language definitions), but this text and the dropdown box break into two lines. How do I align them? Thanks in advance, Eddy Link to comment Share on other sites More sharing options...
♥Tsimi Posted September 14, 2017 Author Share Posted September 14, 2017 @Moxamint Hi Eddy It's been a while since I had a look at this but I should have my files somewhere where I had this that way. I'll check as soon I get home from work. Link to comment Share on other sites More sharing options...
♥Tsimi Posted September 14, 2017 Author Share Posted September 14, 2017 @Moxamint Please try the following. Open your includes/modules/product_listing.php file FIND: echo tep_draw_pull_down_menu('sort', $products_sorter_array, '', 'onchange="this.form.submit()"'); REPLACE WITH echo TEXT_SORT_BY . '<span style="display: inline-block">' . tep_draw_pull_down_menu('sort', $products_sorter_array, '', 'onchange="this.form.submit()"') . '</span>'; Does this work for you? Link to comment Share on other sites More sharing options...
♥Moxamint Posted September 15, 2017 Share Posted September 15, 2017 @Tsimi Sorry but it does not work. Link to comment Share on other sites More sharing options...
♥Moxamint Posted September 15, 2017 Share Posted September 15, 2017 @Tsimi I had to change the following line of code as well: <div id="sort" class="col-xs-8 col-sm-4 col-md-3 pull-right"> and replace it with <div id="sort" class="pull-right"> Now they align properly: Would my changes ruin anything? Thanks, Eddy Link to comment Share on other sites More sharing options...
♥Tsimi Posted September 15, 2017 Author Share Posted September 15, 2017 @Moxamint Hmmm...can you post the whole code snippet? Link to comment Share on other sites More sharing options...
♥Moxamint Posted September 15, 2017 Share Posted September 15, 2017 @Tsimi Here is the code: <div id="sort" class="col-xs-8 col-sm-4 col-md-3 pull-right"> <?php echo tep_draw_form('sort', $PHP_SELF, 'get'); echo (isset($_GET['cPath']) ? tep_draw_hidden_field('cPath', $_GET['cPath']) : '') ; echo (isset($_GET['filter_id']) ? tep_draw_hidden_field('filter_id', $_GET['filter_id']) : ''); echo (isset($_GET['manufacturers_id']) ? tep_draw_hidden_field('manufacturers_id', $_GET['manufacturers_id']) : ''); echo '<strong>' . TEXT_SORT_BY . '</strong>' . '<span style="display: inline-block">' . tep_draw_pull_down_menu('sort', $products_sorter_array, '', 'onchange="this.form.submit()"') . '</span>'; echo tep_hide_session_id() . '</form>'; ?> </div> Thanks, Eddy Link to comment Share on other sites More sharing options...
♥Tsimi Posted September 15, 2017 Author Share Posted September 15, 2017 Can you once try to use this <div id="sort" class="col-xs-8 col-sm-4 pull-right"> Link to comment Share on other sites More sharing options...
♥Moxamint Posted September 15, 2017 Share Posted September 15, 2017 @Tsimi They align fine in larger views: Then they break into two lines in smaller views: And then they align again in xs view: Thanks, Eddy Link to comment Share on other sites More sharing options...
♥Tsimi Posted September 15, 2017 Author Share Posted September 15, 2017 I don't know your whole file but usually There is a layout like this for example <div class="row"> <div class="col-sm-6"> </div> <div class="col-sm-4"> </div> </div> You have to make sure both col-xx-xx add up to total of 12. If you need more space on the right for the dropdown change the col-sm- numbers. For example col-sm-4 for left and col-sm-6 for right side. Link to comment Share on other sites More sharing options...
♥Moxamint Posted September 15, 2017 Share Posted September 15, 2017 The whole product_listing file has only been modified for this additional sort filter feature. I'll check if I missed or screwed up something. Thanks, Eddy Link to comment Share on other sites More sharing options...
♥Tsimi Posted September 15, 2017 Author Share Posted September 15, 2017 I think you simply don't have enough space to fit the dropdown with Sort by text in there at certain views. The display:inline-block code has to stay since that makes it possible for the text to sit next to the dropdown. I would love to show you more examples but writting code with a phone is a PITA. (pain in the... ) Worst case, backup your shop and bring the data home if you can then we can look at it closer once I get back from work tonight. Link to comment Share on other sites More sharing options...
♥Moxamint Posted September 15, 2017 Share Posted September 15, 2017 Sure will do that - will talk with you later today. Thanks again, Eddy Link to comment Share on other sites More sharing options...
♥Moxamint Posted September 29, 2017 Share Posted September 29, 2017 @Tsimi Hi Lambros - now is it possible to make this sort filter work on the search result page <<advanced_search_result.php>>? This file is quite different from specials and products_new. Made a few attempts with no joy... Thanks, Eddy Link to comment Share on other sites More sharing options...
♥Tsimi Posted September 29, 2017 Author Share Posted September 29, 2017 Hi Eddy I never got it working with advanced_search_result.php, sorry. I just simply hid the sort filter dropdown on that page. Link to comment Share on other sites More sharing options...
♥Moxamint Posted September 29, 2017 Share Posted September 29, 2017 That's what I was thinking about doing as well. Thanks, Eddy Link to comment Share on other sites More sharing options...
sinopia Posted October 26, 2017 Share Posted October 26, 2017 Hello I'm using the v2.3.4, but I'm difficults in the code: <!-- BOF ADDITIONAL FILTER //--> <div id="sort" style="padding-top: 5px;"> <?php include(DIR_WS_MODULES . 'product_listing_sort.php'); echo tep_draw_form('sort', $PHP_SELF, 'get'); echo (isset($_GET['cPath']) ? tep_draw_hidden_field('cPath', $_GET['cPath']) : '') ; echo (isset($_GET['filter_id']) ? tep_draw_hidden_field('filter_id', $_GET['filter_id']) :''); echo tep_draw_pull_down_menu('sort', $products_sorter_array, '', 'style="width: 100%;" onchange="this.form.submit()"'); echo tep_hide_session_id() . '</form>'; ?> </div> <!-- EOF ADDITIONAL FILTER //--> Because I've the a dropdown for max products per page and it uses ?mppp=50&sort=1a, if using the filter for example to products name Z-A it sets ?sort=2. I don't have this by default I'm trying to insert it but this filter to sort by name, price, best sellers, etc isn't working, any solution? Link to comment Share on other sites More sharing options...
BrockleyJohn Posted October 26, 2017 Share Posted October 26, 2017 1 hour ago, sinopia said: Hello I'm using the v2.3.4, but I'm difficults in the code: <!-- BOF ADDITIONAL FILTER //--> <div id="sort" style="padding-top: 5px;"> <?php include(DIR_WS_MODULES . 'product_listing_sort.php'); echo tep_draw_form('sort', $PHP_SELF, 'get'); echo (isset($_GET['cPath']) ? tep_draw_hidden_field('cPath', $_GET['cPath']) : '') ; echo (isset($_GET['filter_id']) ? tep_draw_hidden_field('filter_id', $_GET['filter_id']) :''); echo tep_draw_pull_down_menu('sort', $products_sorter_array, '', 'style="width: 100%;" onchange="this.form.submit()"'); echo tep_hide_session_id() . '</form>'; ?> </div> <!-- EOF ADDITIONAL FILTER //--> Because I've the a dropdown for max products per page and it uses ?mppp=50&sort=1a, if using the filter for example to products name Z-A it sets ?sort=2. I don't have this by default I'm trying to insert it but this filter to sort by name, price, best sellers, etc isn't working, any solution? Try this: add after the line about filter_id echo (isset($_GET['mppp']) ? tep_draw_hidden_field('mppp', $_GET['mppp']) : '') ; Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
sinopia Posted October 27, 2017 Share Posted October 27, 2017 Hello @BrockleyJohn thank you for your reply. I'm insert it but doesn't seems to works, The dropdown for quantity works fine but the sorter filter to order it by A-Z, Z-A, Lower Price, Higher Price, etc... I've follow everything but isn't working, the options are fine but after selecting one it changes to ?sort=1 but nothing happens. Link to comment Share on other sites More sharing options...
BrockleyJohn Posted October 29, 2017 Share Posted October 29, 2017 @sinopia in your admin panel, configuration / product listing, what settings do you have? Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
sinopia Posted October 30, 2017 Share Posted October 30, 2017 Hi @BrockleyJohn only this: Product Listing Value Action Display Buy Now column 0 Display Category/Manufacturer Filter (0=disable; 1=enable) 1 Location of Prev/Next Navigation Bar (1-top, 2-bottom, 3-both) 3 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.