triskt17 Posted January 14, 2013 Share Posted January 14, 2013 I have an online store and I want to have a page where a guest can log in without having to register as a returning customer. I've been told I need to write some code where I put temporary information into mysql and then write code to erase that information when the order is processed. The problem is I have no idea where to start! All my orders are referenced by customer ID. Can someone please help me? Quote Link to comment Share on other sites More sharing options...
MDCode Posted January 14, 2013 Share Posted January 14, 2013 Are you saying that guests can confirm purchase information? If so I would change that immediately. However, I assume you have a way to add the information into mysql already. If so, you have easy choices: 1. Delete the information when they confirm a purchase or 2. Use cron jobs Quote Link to comment Share on other sites More sharing options...
JonnoTheDev Posted January 14, 2013 Share Posted January 14, 2013 You may need to change the way your checkout functions. If your website is setup where you need to complete a registration form, then login before they can add to basket and proceed to checkout I would scrap that. Firstly, i'm guessing that your database design will not allow orders to be disjointed from a customer, i.e they need a customer ID. I would change your website so customers are actually registered on checkout whether they are going to come back to your website or not. When they checkout the first thing you can do is ask for their email address and password. If they dont have an account i.e If they are a first time buyer they still need to enter their details for shipping, payment, etc on your website so you can capture this and register them at this point and complete the checkout. Similar to how Amazon works. I would not be looking at deleting any information. What if a customer needs to print off an invoice in the future? If you have deleted their record there is no way that they can do this. Customers should always be registered, it is the order process that should be ammended. Quote Link to comment Share on other sites More sharing options...
triskt17 Posted January 16, 2013 Author Share Posted January 16, 2013 Thank you so much for replying! I got this template from a class I took and I am no where near a programmer and could use all the help I can get! If there was a step below newbie, that would be me. So right now you can add things to the shopping cart and when you check out, then it asks if you are a returning customer or a new customer. My boss hates the fact that you have to register so is there a way to go to write some code so that i have a guest login page and it enters the same user name and password for them? And they just enter their shipping address and it emails that information to me? I do like the way amazon works, and I guess with different wording I can make it sounds I just need shipping information. I do know the current code I have references logins by email, so if they think that they are checking out as a guest, and next time try to do it again, they have to remember their password. That is encrypted in my database so if they forget it, I dont know how to get it back to them. You are correct in that I have customer id's associated with all my orders and I have my database all set up for customers, orders, and products. If Im right, I think customers are the highest of the order which is where I am getting lost. I am pretty nervous as to deleting things out of the database, and Im pretty sure that I would screw all that up. I appretiate your help! Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 16, 2013 Share Posted January 16, 2013 I would say on the orders table, make it possible for an order to have a NULL or 0 customer id. If so, require them to enter their order number to view the order. Link the shipping/billing table to the order number and customer id, so if no customer id you can use the order number. Lots of websites do this. It's not that hard. Quote Link to comment Share on other sites More sharing options...
JonnoTheDev Posted January 22, 2013 Share Posted January 22, 2013 Are you using an off-the-shelf application for this website such as osCommerce? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.