Jump to content

Custom order in manufacturer product list


ahmadsajid

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.

Link to comment
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 1.6.1.4) Edited by vcopleutre (see edit history)
Link to comment
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...