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 184.108.40.206-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.
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.
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?
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.