Heatherbell Posted July 5, 2019 Share Posted July 5, 2019 Setting up a new CE Phoenix BS4 shop. Want to maintain current grid view of products but want to completely remove the 'sort by - grid - list' container from pages. Any ideas gratefully received. Link to comment Share on other sites More sharing options...
burt Posted July 5, 2019 Share Posted July 5, 2019 3 hours ago, Heatherbell said: Want to maintain current grid view of products but want to completely remove the 'sort by - grid - list' container from pages. admin > modules > header_tags > "grid/list" > {uninstall} That should do it - I'm pretty sure that was the same in Frozen. I'm not sure if that would have unintended consequences though. Link to comment Share on other sites More sharing options...
burt Posted July 5, 2019 Share Posted July 5, 2019 OK, leave it with me - will test and come up with solution. Link to comment Share on other sites More sharing options...
burt Posted July 5, 2019 Share Posted July 5, 2019 2 minutes ago, Heatherbell said: hoping for an answer. I turned off the HT module as described above, this created an output of "grid", but with the list content... to combat that, make a new file called "ggi.php", with this content; class hook_shop_siteWide_ggi { var $ggi = null; function listen_injectSiteEnd() { $this->ggi .= <<<eod <script> $('#products .item').removeClass('l-g-i').addClass('g-g-i'); </script> eod; return $this->ggi; } } and upload into /includes/hooks/shop/siteWide/ Link to comment Share on other sites More sharing options...
burt Posted July 5, 2019 Share Posted July 5, 2019 https://github.com/gburton/Responsive-osCommerce/issues/740 Link to comment Share on other sites More sharing options...
Heatherbell Posted July 5, 2019 Author Share Posted July 5, 2019 @burt Just implemented your code, works fine - but maybe you misunderstand, in my original question at top of page (if you can wade through the politics) "want to completely remove the 'sort by - grid - list' container from pages." I want that whole container to disappear, sort by and everything. Link to comment Share on other sites More sharing options...
ArtcoInc Posted July 5, 2019 Share Posted July 5, 2019 @Heatherbell Is this what you want? To completely remove the entire 'Sort By / List / Grid / Manufactures' container? To do this required a lot of editing of the /includes/modules/product_listing.php file. @burt may have a way to do this without core changes, but if not, are you willing to do core changes? M Link to comment Share on other sites More sharing options...
Heatherbell Posted July 5, 2019 Author Share Posted July 5, 2019 @ArtcoInc Many thanks for your reply - that is exactly what I want - always easier said than done! Core changes now seem to be frowned upon but I am willing to do anything (up to a point :)) Link to comment Share on other sites More sharing options...
burt Posted July 5, 2019 Share Posted July 5, 2019 OK, I did miss that... You've a couple of options, note that I have not tried any of them so syntax may be a little out - but it should give you ideas; A. remove the code by amending core code (note that is nothing "bad" about core code changes, I just advise to do it as little as possible and then to try to remember what you did for future reference). - remove this block of code: https://github.com/gburton/Responsive-osCommerce/blob/master/includes/modules/product_listing.php#L40-L103 B. hide that same block of code using .css - add this to user.css: div.alert-filters { display: none !important; } C. hide that same block of code using javascript - add this to that ggi.php that I had you create earlier in the thread: $('div.alert-filters').hide(); As mentioned, syntax may be out but gives the general idea. Of the three, I'd likely do it in the .css if it was me. Link to comment Share on other sites More sharing options...
Heatherbell Posted July 5, 2019 Author Share Posted July 5, 2019 @burt Thank you so much for taking the time for this - you are a gem! The user.css addition worked like a charm! Link to comment Share on other sites More sharing options...
burt Posted July 5, 2019 Share Posted July 5, 2019 You could also put something like this in the .css (for reminder); /* removes grid/list entirely, see www.oscommerce.com/forums/topic/493639-how-to-remove-sort-by-grid-list */ div.alert-filters { display: none !important; } Link to comment Share on other sites More sharing options...
ArtcoInc Posted July 5, 2019 Share Posted July 5, 2019 @burt @Heatherbell What I had done essentially was option A (I commented it out instead of actually deleting it). But, IMHO, option B would be a better way to do it. @burt ! M Link to comment Share on other sites More sharing options...
Heatherbell Posted July 5, 2019 Author Share Posted July 5, 2019 2 minutes ago, burt said: You could also put something like this in the .css (for reminder); /* removes grid/list entirely, see www.oscommerce.com/forums/topic/493639-how-to-remove-sort-by-grid-list */ div.alert-filters { display: none !important; } Great advice - I am an idiot and I need to adopt this practice for everything I do from now on, especially with my shiny new Phoenix! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.