Welcome to WebmasterWorld Guest from 54.226.209.162

Forum Moderators: ocean10000

Message Too Old, No Replies

Creating a Unique Order ID using ASP

How do I do this using sessions?

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

New User

10+ Year Member

joined:July 17, 2003
posts:6
votes: 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!

5:59 pm on July 27, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:July 3, 2002
posts:82
votes: 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.
1:52 am on July 28, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:July 18, 2003
posts:43
votes: 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?
5:20 am on July 28, 2003 (gmt 0)

New User

10+ Year Member

joined:July 17, 2003
posts:6
votes: 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

5:26 am on July 28, 2003 (gmt 0)

New User

10+ Year Member

joined:July 17, 2003
posts:6
votes: 0


sorry all it was not global.asp as u know its global.asa lol
3:27 pm on July 28, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:July 3, 2002
posts:82
votes: 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)

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members