homepage Welcome to WebmasterWorld Guest from 54.161.214.221
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
Forum Library, Charter, Moderators: ocean10000

Microsoft IIS Web Server and ASP.NET Forum

    
Creating a Unique Order ID using ASP
How do I do this using sessions?
joshmachine




msg:955165
 3:08 pm on Jul 27, 2003 (gmt 0)

Hello all,

I have developed a shopping cart in asp for my client, I have integrated it will a credit card processing gateway called Linkpoint. When a customer makes an order the details are sent to the client email,
there is a unique order id that is generated by linkpoint according to the customers IP address and sent to the client... something like 202.1.146.104-1059137157-481384-1029-6 ... now my client would like to have the order id generate according to year, month, day and order of the day, something like : 03-07-26-001.

How do I do this using sessions? or anyother method.

Can anyone help me out?

Thanks in advance!

 

smokin




msg:955166
 5:59 pm on Jul 27, 2003 (gmt 0)

the simplest way not the most efficient way would be to have a text file that contains the order counter (0001) and increment this counter for every order. Then at the end of every day reset the counter. Obviously you also need a function to format the date the way you want.

gangstah




msg:955167
 1:52 am on Jul 28, 2003 (gmt 0)

I'm a little confused, are you saying that Linkpoint is sending an email to the client with that crazy order id but the client would prefer an order id that is based on date?

joshmachine




msg:955168
 5:20 am on Jul 28, 2003 (gmt 0)

Hi gangstah,

There is a data field "oid" that can be passed from our cart to create the order id ourselves...for example
<input type="hidden" name="oid" value="">

If we are not passing this oid field with a value, Linkpoint creates its own based on the IP of the customer... a long oid as u see.

What my client now requires is create an order id (oid value) based on the year, month, day and order of the day something like...03-07-26-001 from the cart itself (created using ASP) and pass it to Linkpoint, insted of Linkpoint creating its own order id in such length.

Smokin, I am trying out with ur suggession too, somebody told me it can be done using session in asp, making use of global.asp...any idea on that?

Thanks

joshmachine




msg:955169
 5:26 am on Jul 28, 2003 (gmt 0)

sorry all it was not global.asp as u know its global.asa lol

smokin




msg:955170
 3:27 pm on Jul 28, 2003 (gmt 0)

joshmachine, You don't need to use sessions if you haven't already used them for your shopping cart. All you need to do is create the order id just before sending the data to Linkpoint.

For example your form data is sent to an asp page that creates the order id, then this is sent (along with your form data) to Link point using either javascript to automate the form post or the following asp object:
Microsoft.XMLHTTP

Hope that helps ;o)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved