Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

how to sort products names on product name base ...


HaseebWarraich

Recommended Posts

hi ....

i have a problem ...

exp i have following category

pent

then products

pent 10

pent 11

pent 12.... so on

pent 19

pent 2

pent 20

pent 21 ...so on

pent 29

pent 3

pent 30

 

products are shown in this order in my product page at user side as well as admin side .. how can i fix it in user side and admin .. admin not issue but user side is must ...

 

hope you got the problem

 

 

how can i fix it ....

please help me out ...

Link to comment
Share on other sites

my current query is this

select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status from products p, products_description pd, products_to_categories p2c where p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = '50' order by pd.products_name

 

in it sort order is mention ....

i am on osc v2.3 which add on i have to use ?

Link to comment
Share on other sites

Yes, it sort by "product name" and that is how you get it. You can order by anything of the following:

 

p.products_id, pd.products_name, p.products_quantity, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available

 

or add a new filed "sort_order" to the database, table products, make an input filed in admin so you can set it and then modify your query to use this.

 

That is what such an addon would do, you need to search the addons area, maybe somebody else has a link.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...