Results 1 to 4 of 4

Hybrid View

  1. #1

    red flag Can you sort products by their ID (the order you enter them)

    I know under Configuration > Product Listing > Display Product Listing Default Sort Order

    you can enter 3c to sort by price, is there an entry to sort by ID (The order I enter the products in)?

    Thanks in advance

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Can you sort products by their ID (the order you enter them)

    Might peek in the Configuration ... Product Listing ...
    Display Product Listing Default Sort Order
    Product Listing Default sort order?
    NOTE: Leave Blank for Product Sort Order. Sort the Product Listing in the order you wish for the default display to start in to get the sort order setting. Example: 2a
    This will provide the listing by the physical sort order you enter for the products ...

    This allows you to be specific about the order of your products ...

    While you could use the products_id by altering code, you will find later entering a new product would throw it out of order ...

    If your current order is correct, you could update the products_sort_order by the products_id * 10 which would then set the value to 10 x the products_id ... this allows you to later add new products and enter them between old products ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3

    Default Re: Can you sort products by their ID (the order you enter them)

    By doing this directly in the mysql database?

    update products set sort_order = ( products_id * 10)

    What is the correct SQL to do this for every entry?
    Last edited by amdowney; 31 May 2007 at 03:29 PM.

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Can you sort products by their ID (the order you enter them)

    You could use:
    PHP Code:
    UPDATE products SET products_sort_order products_id 10
    This would change all Products to have a products_sort_order of 10 times their products_id ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

Similar Threads

  1. Hosting recommendations? (you can PM them to me if you want)
    By toomanyknots in forum General Questions
    Replies: 3
    Last Post: 4 Aug 2014, 04:11 AM
  2. Replies: 7
    Last Post: 1 Apr 2010, 11:01 PM
  3. can you control the sort order of the featured products on the front page
    By George Susini in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 18 Apr 2009, 08:05 PM
  4. Can you enter a number in the attribute option?
    By dmchr5 in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 12 Apr 2009, 12:36 AM
  5. Can you specify sort order with EP?
    By yellowdaises in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 15 Aug 2007, 04:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg