Jump to content
Sign in to follow this  
Heatherbell

How to remove 'sort by - grid - list'

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Posted (edited)
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.

Edited by burt

This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

OK, leave it with me - will test and come up with solution.


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites
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...

lgi.jpg.badbe0390b9e57bc86f5830541dee68c.jpg

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/

 


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

@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.

Share this post


Link to post
Share on other sites

@Heatherbell

Is this what you want?

311494633_ScreenCapture-2019-07-05.jpg.415cf1c16e15380e5fc0f97ba937d95a.jpg

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


Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
Share on other sites

@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 :))

Share this post


Link to post
Share on other sites

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.

 

 


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

You could also put something like this in the .css (for reminder);

/* removes grid/list entirely, see forums.oscommerce.com/topic/493639-how-to-remove-sort-by-grid-list */
div.alert-filters { display: none !important; }

 


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites
2 minutes ago, burt said:

You could also put something like this in the .css (for reminder);


/* removes grid/list entirely, see forums.oscommerce.com/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!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×