Search code examples
phpmysqlcakephpe-commercenetbeans-8

How to express the workflows and data structures of a shopping site in a database schema and operations on it?


I'm working on a very ambitious e-commerce project. So far I have all my html templates created with Notepad++. I like to work in NetBeans using the MVC Cake Framework concept, which in my opinion is very easy to understand.

I know how to create a simple shopping cart with basic commands like add and delete. I also know how to work with MySQL databases (which I assume is all it takes). I'd like to push the game further by developing a full blown complex application like Walmart or Amazon where the customer can:

  • Log in
  • Manage their account
  • Manage a wishlist
  • View Order History
  • Manage Gift Cards & Vouchers
  • View, print invoices
  • Earn points in a customer reward system by reviewing products, sharing on social medias, passing orders ... and so on.

1- Has anyone of you done it? Is it possible using MVC Cake Framework?

2- As for the registration process and everything, I know it's mostly just database stuff, but how do I develop a Wishlist... The kind of wishlist that can be created by visitors without them having to register to add items on it BUT if they want to manage and save it, they need to create an account...

3- What about the "Air miles kind of reward system that is associated with one's account and activities (sharing on social medias, purchasing on the site, reviewing products...etc)? Is it just database stuff also? Doable with MySQL and MVC?

I hope I'm being clear enough to understand! Any form of help, feedback or input would be gladly appreciated! I'd love to hear about your experiences!


Solution

  • 1- Has anyone of you done it? Is it possible using MVC Cake Framework?

    Yes https://github.com/burzum/cakephp-cart-plugin

    But this is "just" a cart. If you look at it's features and architectures you see that this isn't the most trivial task. There are several things to take in consideration. I've worked on different ecommerce related projects before.

    2- As for the registration process and everything, I know it's mostly just database stuff, but how do I develop a Wishlist... The kind of wishlist that can be created by visitors without them having to register to add items on it BUT if they want to manage and save it, they need to create an account...

    Honestly, if you don't know how to develop a trivial wishlist I have serious doubts you'll be able to properly develop a complete ecommerce solution. A wishlist is basically just a jointable between products and users:

    | id | user_id | product_id |
    

    In CakePHP 2.x this is expressed as hasAndBelongsToMany association and in Cake3 it's called belongsToMany, it was just shortened.

    3- What about the "Air miles kind of reward system that is associated with one's account and activities (sharing on social medias, purchasing on the site, reviewing products...etc)? Is it just database stuff also? Doable with MySQL and MVC?

    Again, that you ask that makes me think you lack the required experience. Sure this is in theory doable with any language and any database system, it doesn't even has to be MVC, there are multiple ways to Rome.

    However, CakePHP + Mysql are a good choice. I would go for Cake 3.0 these days. I don't know what kind of answer you expect on this very broad question. The reward system and the social sharing are two different sub-systems that can work together. If you expect a full DB schema and architecture suggestions on this, sorry, it is simply too broad to be answered quickly.