Results 1 to 9 of 9
  1. #1
    Join Date
    Apr 2010
    Posts
    100
    Plugin Contributions
    0

    Default Change the way order nubmer is generated

    Does anyone know if there is a way to change how the order number is generated? I believe currently it is just a sequence, which is really bad since people can easily guess how many orders you have.

    I think, at least, we can change it to something like:
    Current_timestamp-A_random_number
    Or something like that.

    This is also the case for customer ID: I can easily sign up as a customer today, and sign up as another customer 1 week later, then know how many customers the site has during this week. This is really bad.

    Thanks.

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: Change the way order nubmer is generated

    You'd have to rewrite the code which assigns those numbers - not exactly a simple job.

    I guess I don't understand why either of those things would be 'really bad'. Most customers don't care how much business you're doing as long as your site looks professional and your prices are good, and I can't think of a way your competitors could use the information to your disadvantage.

  3. #3
    Join Date
    May 2008
    Posts
    188
    Plugin Contributions
    0

    Default Re: Change the way order nubmer is generated

    Place an order yourself and then at regular intervals update that order number. If you jump it by a 1000 or so whatever level of traffic you want to imply every couple of days you will have the effect of implying a busier site.

  4. #4
    Join Date
    Apr 2010
    Posts
    100
    Plugin Contributions
    0

    Default Re: Change the way order nubmer is generated

    Quote Originally Posted by stevesh View Post
    You'd have to rewrite the code which assigns those numbers - not exactly a simple job.
    Do you know where is the code for that? (order number, and customer number)

  5. #5
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Change the way order nubmer is generated

    Quote Originally Posted by stevesh View Post
    I guess I don't understand why either of those things would be 'really bad'. Most customers don't care how much business you're doing as long as your site looks professional and your prices are good, and I can't think of a way your competitors could use the information to your disadvantage.
    Valid points!
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    Apr 2010
    Posts
    100
    Plugin Contributions
    0

    Default Re: Change the way order nubmer is generated

    Quote Originally Posted by DrByte View Post
    Valid points!
    So you think, all major website, Amazon, buy.com, etc., never use simple sequence as customer id or order id, they just did it for fun and for no reason?

    From technical point of view, it is not a good idea that a hacker can easily guess out all the IDs.

    Anyway, this is off the topic. Let's focus how to do it. Not why to do it.

  7. #7
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Change the way order nubmer is generated

    The current version of Zen Cart exerts no control over order numbers or customer numbers. It leaves that up to the database to handle via an auto-increment counter. That means when a new record is added, the database automatically picks the next integer number greater than the last one used. That's all handled by MySQL, not Zen Cart.

    I guess you're welcome to rewrite how MySQL works when adding +1 to numbers. You'll need a dedicated server to install your own customized C++ code, then compile the new code after you've written the new functionality, and then run your site from that. Of course, then all the *other* database tables that do other auto-incrementing will grow exponentially large and blow out capacity too.

    Assuming you're probably not interested in tackling it that way, we come back to finding a solid reason for thinking it's needed in the first place.
    I see no threat with regard to a hacker guessing customer IDs or order IDs. How exactly do you think those can be abused if they can be guessed? I'd be very interested in exactly what threat you think exists.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  8. #8
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Change the way order nubmer is generated

    I'm sure they had good reasons for generating customer and order ids in a different way, but with the volume of business they do, how could sequential numbers hurt them? I suppose a hacker could guess a valid number more easily if that would benefit them... but it would probably not be hard to guess a valid number like the actual ones, for a hacker who actually knows coding.

    Not sure about the customer id, but the order id is a primary key in the database, and needs to be sequential, unless you change the way the db works.

    Edit: Yeah, what DrByte said... :)

  9. #9
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: Change the way order nubmer is generated

    Quote Originally Posted by Cindy2010 View Post
    So you think, all major website, Amazon, buy.com, etc., never use simple sequence as customer id or order id, they just did it for fun and for no reason?

    From technical point of view, it is not a good idea that a hacker can easily guess out all the IDs.

    Anyway, this is off the topic. Let's focus how to do it. Not why to do it.
    I can't speak for Amazon, etc., but custom shopping cart software can do a lot of stuff a standard open source cart can't do, and at a much greater expense.

    As I mentiioned, you would have to write considerable code to accomplish what you're asking. You might try posting in the Commercial Help wanted forum.

    Most importantly, this forum isn't a Knowledge Base where you get pre-written answers depending on keywords in your question. It's a community, and the why is often more important than the how.

    I and (apparently) others think your approach doesn't make sense, and we'll be pleased to say so.

 

 

Similar Threads

  1. v154 Multi Site & CEON - need to change the links generated by the language flags
    By Xarum in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 2 May 2016, 11:00 PM
  2. v139h Order generated twice when we do the transaction through Paypal IPN
    By amruta2104 in forum General Questions
    Replies: 2
    Last Post: 24 Nov 2012, 01:48 PM
  3. authorize.net - no order or order notice was generated
    By kevinjatMB in forum Addon Payment Modules
    Replies: 7
    Last Post: 4 May 2011, 05:14 PM
  4. Change the way a product name is shown in an order
    By sketchhgal in forum General Questions
    Replies: 1
    Last Post: 10 Jun 2010, 07:54 PM
  5. Is there a way to change the order/invoice #?
    By jayequeue in forum Basic Configuration
    Replies: 2
    Last Post: 23 Mar 2010, 06:30 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR