Myrddin Wyllt Posted January 6, 2007 Share Posted January 6, 2007 Greetings. Here's what I'm trying to do. I have installed OSC 2.2 MS2 and the Barcode Contrib (Barcoding V1.0). Everything there is working fine, and I've managed to make some other minor changes (no enlarged images or links to same, short description viewed in category listing) with other contribs (credit to those who wrote them, I don't remember). What I want to do now is change the way an order ID is generated to add more digits to it. This will make the barcode more complex, and harder to duplicate. My ultimate goal is to allow customers to print their own event tickets by sending them a link to their account history info, and having them print it (with the barcode on the bottom of the page, of course). I will have a barcode reader, and can (presumably) extract the order IDs from the OSC database and feed them to the barcode reader for verification in the ticket office. So I'd like to have an order ID that includes the date of the purchase plus an incremental order number. For example: Order ID: 0701060001 07-01-06-0001 07= Year, 01=Month, 06=day, 0001=OSC generated order number, held to four places for continuity. If that is just too complicated, I'd settle for having a long relatively random-looking number string appearing ahead of the actual Order ID, as long as it doesn't change the length when the order ID goes from one digit to two, three, etc. The order of appearance doesn't matter either, so it could begin with the actual order ID and be followed by a date code or gibberish numbers. The only thing that matters is that each order is unique enough to fool most people, and enough to be eliminated from a list by a barcode reader. I've seen the article in the knowledge database, here: http://www.oscommerce.info/kb/osCommerce/G...s_and_Tricks/31 frankly, it might as well be written in Swahili for all the good that it does me. I wish I was better with php and MySQL, but I'm not, so I'm asking for your help. :'( "A witty saying proves nothing" --Voltaire Link to comment Share on other sites More sharing options...
wheeloftime Posted January 7, 2007 Share Posted January 7, 2007 Greetings. Here's what I'm trying to do. I have installed OSC 2.2 MS2 and the Barcode Contrib (Barcoding V1.0). Everything there is working fine, and I've managed to make some other minor changes (no enlarged images or links to same, short description viewed in category listing) with other contribs (credit to those who wrote them, I don't remember). What I want to do now is change the way an order ID is generated to add more digits to it. This will make the barcode more complex, and harder to duplicate. My ultimate goal is to allow customers to print their own event tickets by sending them a link to their account history info, and having them print it (with the barcode on the bottom of the page, of course). I will have a barcode reader, and can (presumably) extract the order IDs from the OSC database and feed them to the barcode reader for verification in the ticket office. So I'd like to have an order ID that includes the date of the purchase plus an incremental order number. For example: Order ID: 0701060001 07-01-06-0001 07= Year, 01=Month, 06=day, 0001=OSC generated order number, held to four places for continuity. If that is just too complicated, I'd settle for having a long relatively random-looking number string appearing ahead of the actual Order ID, as long as it doesn't change the length when the order ID goes from one digit to two, three, etc. The order of appearance doesn't matter either, so it could begin with the actual order ID and be followed by a date code or gibberish numbers. The only thing that matters is that each order is unique enough to fool most people, and enough to be eliminated from a list by a barcode reader. I've seen the article in the knowledge database, here: http://www.oscommerce.info/kb/osCommerce/G...s_and_Tricks/31 frankly, it might as well be written in Swahili for all the good that it does me. I wish I was better with php and MySQL, but I'm not, so I'm asking for your help. :'( There is several contributions available which involve a change of the order number. A few which came up are: Order number I Order number II where the first one might be just what you are looking for. The knowledge article merely explains how to use change the database field type when you need a bigger number as default possible. HTH Link to comment Share on other sites More sharing options...
nibl69 Posted January 7, 2007 Share Posted January 7, 2007 There is several contributions available which involve a change of the order number. A few which came up are:Order number I Order number II where the first one might be just what you are looking for. The knowledge article merely explains how to use change the database field type when you need a bigger number as default possible. HTH That first contribution is interesting. But what if you operate a busy website and get two orders placed at the exact same second? It's not likely, but it IS possible. What happens then? Link to comment Share on other sites More sharing options...
wheeloftime Posted January 7, 2007 Share Posted January 7, 2007 That first contribution is interesting. But what if you operate a busy website and get two orders placed at the exact same second? It's not likely, but it IS possible. What happens then? You could mix this solution with the original ordernumber generation by putting the date/time part before or after it. Link to comment Share on other sites More sharing options...
Myrddin Wyllt Posted January 7, 2007 Author Share Posted January 7, 2007 This looks very promising, indeed, wheeloftime. Thanks much! :thumbsup: "A witty saying proves nothing" --Voltaire Link to comment Share on other sites More sharing options...
Myrddin Wyllt Posted January 7, 2007 Author Share Posted January 7, 2007 Ok, got the second order number contribution installed... :) now for the sixty four thousand dollar question: How do I get the barcode mod (Barcoding V1.0) to look at the new modified order number from the second order number contrib (Improved Order Number), instead of going to the database for the number? :blush: "A witty saying proves nothing" --Voltaire Link to comment Share on other sites More sharing options...
Myrddin Wyllt Posted January 9, 2007 Author Share Posted January 9, 2007 Bump! :) "A witty saying proves nothing" --Voltaire Link to comment Share on other sites More sharing options...
wheeloftime Posted January 10, 2007 Share Posted January 10, 2007 Bump! :) No bumping please ! This is a question only for someone knowing that barcode contrib and even then.. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.