VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: terp on April 02, 2012, 15:29:10 PM

Title: [Solved] Remove Sort Option on Frontend
Post by: terp on April 02, 2012, 15:29:10 PM
I can hack it out of the frontend, but is there a backend param to 'Disable Sort' anywhere? I can't seems to find one.

I thought perhaps if you toggle all the 'Available Sort-by fields' to remove the checks it might go away. However, I can't seem to remove them all with the most current download. If I try to clear two or more checks at a time, click save, the configuration page compiles with them checked again after the save?!?!?! I can clear one at a time (uncheck one, save, uncheck another, save, etc), but when down to the last check, I can't clear it.

...but the ability to remove the sort option from the frontend would be very nice.


(and while logged into these forums, why must I keep entering this captcha to post??? lol)
Title: Re: Remove Sort Option on Frontend
Post by: terp on April 02, 2012, 15:31:47 PM
...and will create another thread related to this later, but for the record ...setting the currency is the most unintuitive process I have ever experienced. I feel like jumping off my balcony right now.

(let me reenter the captcha to post this...)
Title: Re: Remove Sort Option on Frontend
Post by: terp on April 05, 2012, 05:39:38 AM
I'll assume a backend param doesn't exist and hack one in or simply remove it from the template when the page is compiled.

Title: Re: Remove Sort Option on Frontend
Post by: John2400 on April 05, 2012, 09:58:46 AM
Terp ,

Just a type of solution - instead of lots of hacking -
* in the configuration find - product order setting _ just pick one
* product name - in both upper and lower box and save.
* find the language folder and find your language ( en-GB) folder and find the file (en-GB.com_virtuemart.ini)

edit lines - 431, 247, 415 ( these are sort by, product name , =/-) 
* Just write 'products listed below' - that way no sorting but you can always change them back if needed.
Title: Re: Remove Sort Option on Frontend
Post by: terp on April 05, 2012, 17:24:33 PM
Quote from: John2400 on April 05, 2012, 09:58:46 AM
Terp ,

Just a type of solution - instead of lots of hacking -
* in the configuration find - product order setting _ just pick one
* product name - in both upper and lower box and save.
* find the language folder and find your language ( en-GB) folder and find the file (en-GB.com_virtuemart.ini)

edit lines - 431, 247, 415 ( these are sort by, product name , =/-) 
* Just write 'products listed below' - that way no sorting but you can always change them back if needed.

Thanks, sir. Yea, I finally assumed having only one would eliminating any sorting and it did...except it still showed that whole block of sort stuff. Changing the language is a good idea, thanks.  But I think I'm going to run with removing that entire block...don't seed the # of products filter, the little sort graphic/button thingy with zero options, the results #, etc, etc.

I was going to add a backend param to remove it with a couple of IFs, but since it all will be overwritten on an upgrade, just removing the block was fastest. ;)

Thanks for your reply. If the developers would consider a feature request, please consider adding a toggle in the backend to display/hide the entire sort box-related stuff.
Title: Re: Remove Sort Option on Frontend
Post by: Studio 42 on April 10, 2012, 14:37:47 PM
the echo is done with this line in view/category/default.php
<?php echo $this->orderByList['orderby']; ?>
you can comment it to have nothing displayed
Title: Re: Remove Sort Option on Frontend
Post by: terp on April 10, 2012, 16:43:28 PM
Quote from: Electrocity on April 10, 2012, 14:37:47 PM
the echo is done with this line in view/category/default.php
<?php echo $this->orderByList['orderby']; ?>
you can comment it to have nothing displayed

Perfect, thanks. Created a template override and commented this block out. (consider a backend param in future versions). :)

Title: Re: [Solved] Remove Sort Option on Frontend
Post by: jbodeen on June 19, 2012, 23:37:21 PM
While we are on a wish list, it would be nice to move the counter and navigation to the bottom of the page also.
Title: Re: [Solved] Remove Sort Option on Frontend
Post by: operapixie on July 04, 2012, 09:30:20 AM
I echo the wish list request for this to be a parameter in the back end.
Title: [Solved] Remove Sort Option on Frontend
Post by: amymattian on August 03, 2012, 11:00:47 AM
Definitely a good idea to have the "sort by" optional and also so that admin can choose is it up or bottom. Thanks!

Anne
Title: Re: [Solved] Remove Sort Option on Frontend
Post by: terp on August 03, 2012, 14:24:49 PM
We can't get major bugs addressed (ToS checkbox, for example), so I doubt we'll ever see this feature added, guys...just do the override and be done with it. ;)
Title: Re: [Solved] Remove Sort Option on Frontend
Post by: gabrielperez77 on February 27, 2015, 21:46:50 PM
Thanks a lot for this solution. It worked for me :D