Informatics Practices · Ch 7 — Project Based Learning
Project I : Online Shopping Platform
Project I : Online Shopping Platform
The Big Picture: Why This Project Exists
Murugan wants to launch an online fashion store called APPAREL EASY. Before he can sell a single shirt, he needs a system to manage his inventory, track customers, and understand his sales. This project is about designing that system — from the data structure in Pandas to the software that stores records and the plots that help him make business decisions.
The core challenge is balancing two things: the technical side (storing data correctly) and the business side (knowing what sells, when, and to whom).
The Business Requirements
Murugan has a clear plan for his merchandise and sales events.
Categories and Sub-categories
- Two broad categories: Men and Women.
- Under each category, three sub-categories: Clothing, Footwear, and Accessories.
Mega Sales Events
- Festive Sale: Runs from one month before Diwali to Christmas. Discount code: FEST, discount offered: 10 per cent.
- End of Season Sale: Runs in February and August. Discount code: EOS, discount offered: 15 per cent.
What Murugan Wants to Track
- Monthly revenue generation.
- Category-wise sales.
- Sales specifically during the mega events.
- Discounts offered — whether from manufacturers, payment sites, or promotional campaigns run by APPAREL EASY itself.
The Data Structure: Fields in the Data File
Every item of apparel sold will be recorded in a data file. The fields are:
- Apparel Code — a unique identifier for each product.
- Name — the product name (e.g., Men’s Trousers, Skirt).
- Category — either Men or Women.
- Size — the size of the apparel.
- Price — the selling price.
- Customer Name — who bought it.
- Payment Mode — how the customer paid.
- Discount Code — either FEST or EOS, or blank if no sale.
What the Category field determines:
- If Category is Men, the apparels can be: Men’s Trousers, Men’s Shirt, Men’s Jeans, Men’s T-shirt.
- If Category is Women, the apparels can be: Skirts, Top, Pants, Jeans, Kurta, etc.
Payment Mode rules:
- If the payment mode is Credit Card or Debit Card, the system must also store: Credit card number, cardholder name, CVV, and validity date.
- If the payment mode is Cash on Delivery (COD), no additional details are required.
The Sale Selection Logic
Murugan wants to randomly select merchandise to put on sale during the mega events. There is one hard rule:
The selected merchandise should not exceed 70 per cent of the total merchandise available.
This means at least 30 per cent of the stock always sells at full price.
What the Software Must Do
The project has three main parts:
- Visualise the data structure — design the Pandas DataFrame that holds all the fields listed above, keeping every requirement in mind.
- Implement the data structure using Python Pandas — actually create the DataFrame, populate it with sample data, and write code to handle the logic (like applying discount codes and checking the 70 per cent limit).
- Design the software to:
- Store details of all merchandise that will be put online for sale.
- Maintain records of customers visiting the e-commerce site.
- Maintain records of how many customers actually place an order. …