Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMatthew Smart
12,567 PointsMultiple websites shopping cart and with the same database
Hello guys, this isn't a problem with code kind of question, more a question on concept.
I have recently moved from a junior developer role to being a single developer for a new company. This company has around 20 websites that i need to rebuild and bring to the 21st century.
Around 8 of these websites will need to sell products using a shopping cart. The owner wants 1 single database to hold all of the products for each website. So this is what i plan to do, and hope you guys can tell me if its a bad idea (if so how would you do it).
The websites will all be WordPress sites by the way.... PLAN:
So firstly i will create a database server and plan the structure of the tables & relationships etc..
I will be creating an API using Laravels lumen. This will serve as the middle man to communicate to the websites and the database.
I will create a management tool for inputting products into the database (Usual CRUD application), and also do things like sowing statistics of best sellers etc...
I will create a plugin that will be used for all of these websites. This will be for the shopping cart. This plugin will call and fetch from the api and then to the database.
Create the websites and install the plugin.
The reason i have thought of this structure is to reduce using the same code over and over for every single websites. I will have a base website with the plugin that i can test things on, and any updates can be tested and rolled out to all of the websites. Essentially the only way the plugin with differ for each website will be the CompanyID.
This will be my first major kind of system built all by myself and is one of the reasons why i kind of chose this structure as it will test me and teach me a lot of different techniques. SO thats building an API using lumen. Building a web application using Laravel framework. Building a good WordPress plugin, along with building good WordPress themes.
So guys , here is the time for you to say that its a stupid idea and kill my dream system :( aha. But seriously is this a good concept to go on or should i totally re-think this?
Many Thanks
Matt