Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product Sort Order


JohnRives

Recommended Posts

Posted

Hello, I can't believe no one has asked this basic question before, but I searched the entire forum using the search feature and cannot find it anywhere.

How do I rearrange the default sort order for new products?

I know how to sort catagories, but I cannot find anyway to sort my product listings. So far the only way I have been able to do it is to add a number in front of the title for each new product so that it sorts using that number. there has got to be a better way!

Any help would be appreciated, John

Posted
Hello, I can't believe no one has asked this basic question before, but I searched the entire forum using the search feature and cannot find it anywhere.

How do I rearrange the default sort order for new products?

I know how to sort catagories, but I cannot find anyway to sort my product listings. So far the only way I have been able to do it is to add a number in front of the title for each new product so that it sorts using that number. there has got to be a better way!

Any help would be appreciated, John

I guess the first question would be: what do you want to sort them by? If you want to sort by the product title, that's pretty easy, but I get the impression that that isn't what you're after.

 

If you could, please go into more detail about what your product information is like and how you want to do your sorting.

 

SMS

Posted

if you go to the contribs and search by the exact title of this thread, you'll be able to find some solutions for you to use :)

Posted

I would like to sort by quantity and item like this:

100 CDs

250 CDs

500 CDs

1,000 CDs

 

100 DVDs

250 DVDs

500 DVDs

1,000 DVDs

 

I thought this would be automatic, but the shopping cart dispalys 1,000 CDs before 100 CDs and then displays 100 DVDs. There isn't a way to keep them in order unless I add a numeric value before each product which is confusing once it's in the shopping cart check out.

 

 

I guess the first question would be: what do you want to sort them by? If you want to sort by the product title, that's pretty easy, but I get the impression that that isn't what you're after.

 

If you could, please go into more detail about what your product information is like and how you want to do your sorting.

 

SMS

Posted

I searched the contributions section using "product sort order" and skimmed each listing that was returned. I didn't see any that had information about how to control the display sort order of products.

 

if you go to the contribs and search by the exact title of this thread, you'll be able to find some solutions for you to use :)
Posted
I would like to sort by quantity and item like this:

100 CDs

250 CDs

500 CDs

1,000 CDs

 

100 DVDs

250 DVDs

500 DVDs

1,000 DVDs

 

I thought this would be automatic, but the shopping cart dispalys 1,000 CDs before 100 CDs and then displays 100 DVDs. There isn't a way to keep them in order unless I add a numeric value before each product which is confusing once it's in the shopping cart check out.

 

Ah, yes. The software is doing an alphabetic sort on the contents of the product name field. In a numeric sort, you'd get your products in the order you want (numerically, 250 comes before 1,000). In an alphabetic sort, the contents of the field aren't read as numbers but rather as text (and hence a string that starts with the character '2' comes after one that starts with the character '1', giving you the results you are seeing).

 

There are a few different ways to approach a problem like this:

 

You've already hit on one of them, and that's adding a prefix to the product name that gets it sorted in your intended order. You can add a numeric prefix or an alphabetic one. That's easy, fast, and cosmetically -- less than ideal.

 

Another is to find another field in the product record whose contents will sort the way you want the product to sort and then modify the software to use that field as the sort field instead of the product name field. Model # might be a possibility, depending on what your model numbers look like. Price might be another possibility. There may already be a contribution to allow sorting by something other than the product name; it's worth checking. Of the three options I can think of, this is probably the best one.

 

If there isn't an alternate product field that you can use to sort, then the other option that springs to mind is to modify the software to add such a field. This is not such a small job, so I hope that it doesn't come to this for you. If it does, I did notice a contribution that allows you to add custom fields to the product record. I don't know how stable it is; there's always a certain amount of risk with such things.

 

Yours in Service,

Stephanie

Posted
Ah, yes. The software is doing an alphabetic sort on the contents of the product name field. In a numeric sort, you'd get your products in the order you want (numerically, 250 comes before 1,000). In an alphabetic sort, the contents of the field aren't read as numbers but rather as text (and hence a string that starts with the character '2' comes after one that starts with the character '1', giving you the results you are seeing).

 

There are a few different ways to approach a problem like this:

 

You've already hit on one of them, and that's adding a prefix to the product name that gets it sorted in your intended order. You can add a numeric prefix or an alphabetic one. That's easy, fast, and cosmetically -- less than ideal.

 

Another is to find another field in the product record whose contents will sort the way you want the product to sort and then modify the software to use that field as the sort field instead of the product name field. Model # might be a possibility, depending on what your model numbers look like. Price might be another possibility. There may already be a contribution to allow sorting by something other than the product name; it's worth checking. Of the three options I can think of, this is probably the best one.

 

If there isn't an alternate product field that you can use to sort, then the other option that springs to mind is to modify the software to add such a field. This is not such a small job, so I hope that it doesn't come to this for you. If it does, I did notice a contribution that allows you to add custom fields to the product record. I don't know how stable it is; there's always a certain amount of risk with such things.

 

Yours in Service,

Stephanie

 

 

How do we get the software to by default sort by another feild, such as Product Model Number. Sounds like this may solve my problem too.

 

TIA

Posted
How do we get the software to by default sort by another feild, such as Product Model Number. Sounds like this may solve my problem too.

 

TIA

 

 

Try this:

 

http://www.oscommerce.com/community/contributions,911

Just between us, remember there are only 10 kinds of people in the world; those who understand binary and those who don't!!

 

Remember, learning is a "do-it-yourself" experience; although, not necessarily a "do-it-BY-yourself" experience.

 

The quickest way to learn is to forget to BACKUP!

Archived

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

×
×
  • Create New...