Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Change order products appear in catalog


simoncs

Recommended Posts

Hi

This forum is excellent - it's helped me loads so far, thanks all!

 

But i am still new to this and a bit lost -

 

How can i changed the order in which item appear in the catalog on my site? ie reading from left to right.

 

I thought it might be alphabetical? but prob is i am selling tickets to an event and the products are called

Saturday 6th November Individual

Saturday 6th November Group

Saturday 4th December Individual

Saturday 4th December Group

 

At the moment the Dec tickets appear befor the nov ones

 

I have put numbers infront of these ie 1,2,3,4 etc but that didn't work

 

Had a look at database (bit scary!) cos i thought maybe they appear based on a product id number but the product numbers seem ok - ie the Nov tickets have lower product id numbers.

 

It appears that if i add another product this goes to the front of the catalog ie to the left hand side.

Does this mean that the order is in fact based on product id but in decending order?

How do i change this?

 

My catalog is very simple as i only have tickets to sell - can i change number of products that appear on a row?

 

thanks

Simon

Link to comment
Share on other sites

  • 2 weeks later...

The default order in the product listing is by name - this is the code in index.php:

 

 ? ? ? ?if ($column_list[$i] == 'PRODUCT_LIST_NAME') {
? ? ? ? ?$HTTP_GET_VARS['sort'] = $i+1 . 'a';
? ? ? ? ?$listing_sql .= " order by pd.products_name";
? ? ? ? ?break;

 

the 'order by' clause may be changed to order the products by whatever you choose - I would suggest that you give your products a model number and change the above to 'order by p.products_model'.

 

 

You can change the number of rows returned in admin->configuration->maximum values->search results. Set this to the desired number of rows you wish to display :)

 

Matti

Link to comment
Share on other sites

Thank you Matti, I was looking for this answer too!

 

I changed it to p.products_model, and it now displays in order of model number... for the first page. But, if you click to the next page of products, or if you click "next" link to go there, the rest of the producst on the rest of the pages are sorted in alphabetical order of product name, starting with the last item displayed on the first page.

 

Example here: http://www.fleetwoodsounds.com/catalog/index.php?cPath=22

 

I'd like it to sort by model number, and ideally, also have the little "plus" next to the column header "Model", so it is clear that it is being sorted this way.

 

Any ideas?

 

Thanks,

Steve

Link to comment
Share on other sites

Anyone know of a solution?

 

I changed it to p.products_model, and it now displays in order of model number... for the first page. But, if you click to the next page of products, or if you click "next" link to go there, the rest of the products are no longer sorted by the model number.

 

And so, this solution only works for the first page, not subsequent pages.

 

Example here: http://www.fleetwoodsounds.com/catalog/index.php?cPath=22

 

 

Any help would be apreciated.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...