Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to change the alphabetic order


artweek

Recommended Posts

I would also be interested in this. We are trying to enter sizes and now matter what sequence we enter the sizes in, they do not come out in the order we want.

 

If this is related, I would welcome the reply.

 

NJ Sekela

Link to comment
Share on other sites

You are not being specific enough so All i can do is suggest you learn up on php array sort fuctions.

Link to comment
Share on other sites

When adding alot of content to a catagorie say there will be 6 pages of content on the 6th page the z items will be listed and the A items will be on the first i would like to swap the order of items. thanks

Link to comment
Share on other sites

So let me see if I understand this. Under the admin tool, you are browsing all the products in a category. You see the list of products starting from A... towards Z. and you want it in the reverse order, right?

 

If so, there are 2 ways I can think of to change this... find the code the selects the rows for this category and after that, use a php sort function to sort it the way you want it. Another way is to change the SQL SELECT statement and let it sort when retrieving those rows. SQL's SELECT statement has a parameter called "ORDER BY <column_name> DESC" which you can use to tell it to sort by that column and DESC tells it to go in reverse order.

 

It should not be difficult, but you will need to search through the code to find the correct location for this, then look at the mySql manual to get the correct syntax of the ORDER BY parameter. Of course, backup everything just in case.

 

-Neil.

Link to comment
Share on other sites

Spot on .. Presuming that it was not DESC to start

Link to comment
Share on other sites

Shane,

You can control the order of category and product by a field Sort Order: field in both the categories and product setup. The order relationship is 1 thru ...nnnnn which gives and ascending sequence...Starting with a larger number gives a decending order....

I hope this helps

Roman

dittone.com

Link to comment
Share on other sites

could use explain ths in a form of step-by-step its just im not to good at sql and things like that so would be really helpfull thankyou.

 

I've not done this before, so I don't have a step-by-step. But the code you want should be in the file catalog/admin/categories.php . I cannot even test anything here since my site is now live. If you are not familiar with this, I suggest asking one of the better coders on here.

 

BTW, since this is an on the admin side, why is it so urgent?

Link to comment
Share on other sites

  • 4 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...