Ecommerce size / colour options

Hello all,

I attempting to build a CMS framework with a simple ecommerce solution. Primarily aimed at band merch (t-shirts, hats etc). I’m primarily following the code and concepts used by the Novice To Ninja book

I’m just wondering how to structure the databse to allow the user to add an item that would have a drop down option for size / colour, and have the options customisable by the user.

The only way I can conceive of doing it is via a couple of lookup tables offering options for colour and size respectively. I’m just wondering if theire might be a simpler or accepted way of doing it

Cheers

That’s pretty much the simplest way to handle this, or at least the one that will allow the most flexibility. Technically three lookup tables and an inventory table

Inventory: ID: ShirtID, ColorID, SizeID, AvailableCount

Lookups
Shirt: ID, Description
Color: ID, Description
Size: ID, Description

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.