Skip to Content

New J2Commerce 6.6.5 is out. Here is everything in the release.

See What’s New
Account
Enter the email address on your account.
Forgot your username?
Enter your password.
Forgot your password?

Or continue with

Closed Public Category: Technical Support / Bugs Ticket #587

Remove manufacturer from "Sortby"-Dropdwon

This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Conversation

Sigrid Gramlinger

Hi,

I am not using brands/manufacturers on a shop.
Can I remove it from the sortby dropdown?

In the default_sortfilter.php there is only the javascript to generate the dropdown.
But how can I remove an entry there?

Thanks
Sigrid

Attachments

j2commerce-sortby-dropdown.png
Olivier Buisard Staff

Hello Sigrid,

in your override, you can add, at the beginning of the file:

unset($this->filters['sorting']['brand']);

unset($this->filters['sorting']['rbrand']);

The sorting key is set to:

[
  "" => "Sort Product by"
  "pname" => "Name (A - Z)"
  "rpname" => "Name (Z - A)"
  "min_price" => "Price (Low > High)"
  "rmin_price" => "Price (High > Low)"
  "sku" => "SKU (A - Z)"
  "rsku" => "SKU (Z - A)"
  "brand" => "Brand (A-Z)"
  "rbrand" => "Brand (Z-A)"
]

Olivier.