Jump to content

Custom order in manufacturer product list


Recommended Posts

Hello everyone, i want to sort product list by my own way in manfacturer page, they way I sorted in catefory page from backend.


lets clear the problem...


i have category called dell there have 5 products, dell1, dell2, dell3, dell4, dell5 etc. to sort them by my own in category view i select "position inside category" as default order, and its working fine in when clickng the category in front end. but when click manufacturer in fron end there product lists either assending or dessinding not my own order way. can anyone tell me how can i achive custome order in manufacturer page also.


Thanks in advance.

Share this post

Link to post
Share on other sites

  • 2 months later...
  • 1 year later...
  • 4 months later...
  • 9 months later...
  • 2 months later...

Hi everyone,


If you want to change this, you can modify (or override) ManufacturerController.php line 97 (in /controllers/front/ without override)


Replace $this->orderBy ...

$products = $this->manufacturer->getProducts($this->manufacturer->id, $this->context->language->id, (int)$this->p, (int)$this->n, $this->orderBy, $this->orderWay);
... by the order you want (examples : 'price', 'quantity', 'reference'). I guess you can change $this->orderway by 'desc' or 'asc' (didn't try yet)


So you have something like :

$products = $this->manufacturer->getProducts($this->manufacturer->id, $this->context->language->id, (int)$this->p, (int)$this->n, 'price' , $this->orderWay);
Unfortunately you can't use a specific order since prestashop backoffice doesn't allow you to do it (on Edited by vcopleutre (see edit history)

Share this post

Link to post
Share on other sites

  • 3 years later...

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

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More