TCS Pre-ILP Assignments - Online Shopping Portal[Case Study]


Read my whole experience at TCS here - My life with TCS - a Walkthrough

Note :
To all those looking up for this project, I'm putting up my version of the Portal. Please DO NOT upload it as it is. Every single statement of a Project can vary person to person. And if you are planning to upload it as it is, please keep in Mind that I'm doing a project in PHP for the first time. I had very little time to work it out and only Internet to Help. The Coding is not complete, and represents only the skeleton of the Study. However to those who are interested to know how to approach the Case Study, Please do go through the Follow and Enjoy. And I would like to have comments from a PHP Expert as well!


 For the past few weeks people had been happily skipping over the Courses given in Aspire, but all realised the difficulty once Aspire put up a Case Study - To develop an Online Shopping Portal. The Case study goes as follows.


Scenario: Online Shopping Portal 
XYZ.com wants to create an online shopping portal for managing its registered customers and their shopping.
The customers need to register themselves first before they do shopping using the shopping portal. However, everyone, whether registered or not, can view the various products along with the prices listed in the portal.
The registered customers, after logging in, are allowed to place order for one or more products from the products listed in the portal. Once the order is placed, the customer gets a reference order number and the order status should be “order in process”.
The customers can track their order using the given reference number.
The management of XYZ.com should be able to modify the order status of a particular reference order number to “shipped” once the products are shipped to the shipping address entered by the customer at the time of placing the order.
Can you help XYZ.com to realize their dream of having an online shopping portal?
Steps to be followed
 1. Create the interface for the XYZ.com shopping portal using HTML/XHTML and CSS. 
 2. Implement the client side validations using JavaScript. 
 3. Create the tables using MySQL. 
 4. Implement the functionality using the server side scripting language, PHP. 
 5. Integrate all the above tasks and make the XYZ.com shopping portal functional. 
Note: Please zip your casestudy files and upload it here. You can submit only one file
 First Sight - ? DANGER! Yes, that's what will come to your mind. Only a week was given to submit this case study, and I believe 90% aspirants relied on others to complete this project. So how difficult is this case study? I would say a bit difficult if you tend to implement a full fledged shopping portal. But I do not think TCS requires us to do that, they just need to know how good our Software minds are trained. Its funny that this Case study was my Major Project in B.Tech.
  Looking for the codes? Pretty sure you are scrolling up and down, but more than codes, I'm writing this down for those who are interested in knowing how to approach the Case study. Yes codes will be available at the end, you can scroll down for that.
  So let's begin to give a thought for the project, where do we start? NO, not coding. First you need to split it up, else the whole project will eat you up alive. Here is how I split it up -
  • User Details
  • Order Details
  • Product Details[Optional]
Now pick up one by one.
User Details
 Now look back at the requirement, you can basically find out Users need to do 3 things
  • Register in the Portal
  • Registered Users can Order items
  • Registered Users can Check Status
Now what exactly does Register mean? It simply means your details are stored in the Database, and you have a Username and Password to verify it. Now here comes the requirement of designing the Database. At one shot, you realise that it requires the attributes - Username and Password. And then think what all details do you give while registering to a site? Summing them up, I created a simple database with the following attributes
  • Username
  • Password
  • First Name
  • Email Id
  • Address
  • Phone Number
You can add more, which are of course optional.
Now that you have designed the Database, time to give a thought on how many Pages do you need for these functionalities? Let me jot down a few -
  • A Login Form
  • Registrations Form
Only two? Yes, and of course you can add more like Forgot Password, Welcome Page etc. I'm pretty sure you will be having an idea of the contents of these two pages. These pages require mainly two functionalities -
  • Login
  • Register
Login function would check upon if the Username and Password provided are correct, and Register would Insert the details of the New user into the table!
That's IT! You just designed a module of the Case study! Now to the coding, I'm not including much details, I've attached the Files at the end, refer and catch up.
Note : Make sure you use Javascript to Validate the Text boxes in Register Page.

Order Details
 The reason why I put up Product Details as Optional is because that part essentially only contains a Database.
  • Products
We can have a wide range of attributes for this table, but for our basic needs, these would do
  • Prod_id
  • Prod_name
  • Price
That would comprise of our second Table.
The next part is a bit more difficult than the ones we went through[Idea is easy, a bit difficult to code]. Order Details require us to avail Registered Users to Order items, and provide them with a Reference Id. So lets first create the Table. It will contain the following attributes- 
  • Ref_id
  • Prod_name/Prod_id
  • Quantity
  • Total Price
  • Status
And what about the required page?
  • Order Page where all items would be highlighted
  • A Page where you display the Items ordered
  • A page to Check the Status of Transaction
So in short, a user Logs in, get to the Page where the Products are displayed. Then he selects the required products and Orders it, where he receives a Unique Reference id. Using that id, he can keep track of the transaction.
Again - That's IT! Now coming to the coding part, I'm doing something on PHP for the first time, and under unfavorable surroundings as well. Even after being Blank about PHP, I gave a shot on it and completed[atleast the Skeleton] of the case study in less than 12 hours. To work on PHP, you need to download Wamp server. Download it here -wampserver.com. Copy the files into the folder ...wamp/www. I had created the Databases right through MySQL, so make sure you do that right too.
Forgive my mistakes, lets learn together. I would love to have comments from a PHP Expert! Leave a comment if you have any Queries!
Online Shopping Portal -  Download Here
This link might not be available now. Sorry for the inconvenience, I don't have a copy of it either. If anyone who already downloaded this has a copy, please do share it at author@virteacon.com. Thanks!