I'm working on following kind of project web shop project: when retailer registers he/she has possibility to customize outlook of their pages. There are some pages which outlook can be customized. Product information etc is stored in database. Every retailer uses database with same structure, so only the location where and how that data is showen changes. Here is how the idea goes:
- client enters to web shop
- program loads product details from database
- program loads templates and parses them
- product page is printed out
Now comes my problem. I can store templates into a database. Then table structure for templates could look like this:
userid
template_name
template_body
Or I could store templates under retailer's folder. Then the structure could look like this:
retailers
|-retailer1
| |-templates
| |-template1.tpl
| |-template2.tpl
|
|-retailer2
| |-templates
| |-template1.tpl
| |-template2.tpl
I need to get the shop run fast and safely, so which one of those possibilities would be recommended? Or if someone has any other ideas it is also welcome 🙂