Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sort Order


glamourfish

Recommended Posts

is there a way one can add an option to sort by date added when viewing a manufacturer or product type by clicking on it as one would do by price, etc?

if at first you do succeed...try not to look surprised!

Link to comment
Share on other sites

I would guess you're talking about the products we see grouped by category (and as you said optionally, manufacturer too)

 

If that's the case, you would need to add p.products_date_added to the queries that start around line 171 of index.php. Then around line 195, the 'order by' could be changed to p.products_date_added DESC

 

Since that table is already set up to be "sortable" by the customer, either by product name, price, or a number of other columns that you display...I would think you'd either want to remove that customer sorting capability, or else add another column, 'date added', visible on your pages...otherwise pre-sorting them by date added could potentially be a little confusing.

 

I guess you could just do away with the +/- that shows up next to the sorted item, like "product name +".

 

Maybe I'm on a different page altogether. I could have misunderstood or made too much out of it. :blink:

 

anybody at all?
Link to comment
Share on other sites

I think you're getting what I am saying. If you go to: http://www.g1skatesupply.net/catalog/index.php & choose a category you will see that it already displays by date added (thanks to a contribution i found). So all I really need to do - as you suggested, was add a column for date added. But i am just not sure where to do this.

if at first you do succeed...try not to look surprised!

Link to comment
Share on other sites

I'm a little confused, but I think I'll recover :blink:

 

choose a category you will see that it already displays by date added (thanks to a contribution i found).

 

I don't see the date added, except for the original locations on products_new.php and product_info.php

 

I thought you wanted to add the date added on a page like this, in the table...is that right?

 

http://www.g1skatesupply.net/catalog/index.php?cPath=21

 

Let me know... :)

 

I think you're getting what I am saying. If you go to: http://www.g1skatesupply.net/catalog/index.php & choose a category you will see that it already displays by date added (thanks to a contribution i found). So all I really need to do - as you suggested, was add a column for date added. But i am just not sure where to do this.
Link to comment
Share on other sites

I thought you wanted to add the date added on a page like this, in the table...is that right?

 

Sorry about the confusion - i do that to people ;-)

 

YES...that is exactly what I want to do.

 

The table already sorts by date added (new items first). But it doesn't display the date added column though. Hope that makes more sense.

if at first you do succeed...try not to look surprised!

Link to comment
Share on other sites

Oh, Ok...I didn't notice that the table was sorted by date added because there was no "date added column" :lol:

 

How ironic :lol:

 

Could you give me a link to the contribution you used for that? Meanwhile I'll try to find it....

 

One more thing, do you think you would want the column more towards the left or right? Of course it's flexible w/admin settings, but I'm thinking of the alignment left/right...so would you like to see it on the left or right?

 

Sorry about the confusion - i do that to people ;-)

 

YES...that is exactly what I want to do.

 

The table already sorts by date added (new items first). But it doesn't display the date added column though. Hope that makes more sense.

Link to comment
Share on other sites

I didn't forget about this...I'm pretty much done I just need to make sure I didn't make any silly mistakes. I'll get back here w/ some more info.

 

here is that contribution:

 

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

I was thinking of adding it in over to the far right. Maybe between the "price" & the "buy now" columns.

 

what do you think?

Link to comment
Share on other sites

  • 3 weeks later...

Archived

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

×
×
  • Create New...