Jump to content

[SOLVED] Block Manufacturer my specific order (without rename like 01, 02, 03 ..)


Recommended Posts

Hello,

    I am looking for solution how to order manufacturers in BLOCK MANUFACTURER by my specific order. There are few solutions but none of them I would like to use.

 

    I have just few manufacturers and it's number will not be growing much. So I need something to order them and when one or two will be added I need to reorder all of them to make my specific order that I need.

 

    I do not want to rename manufacturers like 01, 02, 03 etc because when I have Clean URL, this number (01, 02, 03 ..) will be there.

Edited by J-works.cz (see edit history)
Link to comment
Share on other sites

I found the solution. If you do not need data about when you added current manufacturer into PrestaShop. Personally I do not need this data. I do not show it anywhere so I can you se it for order my manufacturers in BLOCK MANUFACTURER.

 

1) Create backup.

2) Edit data in DB table PS_MANUFACTURER - update date of all manufacturers (column DATE_ADD) acording to your specific. First manufacturer with older date, others with date closer to today, etc.

3) Edit file classes/Manufacturer.php. Look for words "ORDER BY m.`name` ASC" (line 177). Change this to: ORDER BY m.`date_add` ASC.

4) .. that is all.

 

Now you have manufacturers ordered according the date in column ADD_DATE all over the site.

Link to comment
Share on other sites

  • 3 weeks later...
×
×
  • Create New...