Siggy
--
Thanks,
Sigurd
--
Sigurd Magnusson | Chief Marketing Officer
SilverStripe
http://www.silverstripe.com
Office: +64 4 978 7332
Skype: sigurdmagnusson
Learn more about our next version of the SilverStripe product!
http://silverstripe.com/whats-coming-in-silverstripe-2-2/
class Product_Attribute extends DataObject {
static $db = array(
'Colour' => 'Varchar',
'Size' => 'Varchar'
);
}
And, then add on Product.php
static $has_many = array(
'Attributes' => 'Product_Attribute'
);
getCMSFields() on Product.php could be updated to allow a TableField
for adding new Product_Attribute(s).
This table would be used to add more colours and sizes for each product.
There's also the fact an Order_Item_Attribute class exists. But the
way I see it, we first
get the data saved with Product_Attribute then worry about getting
this information into Order_Item_Attribute. :-)
Anyone else have any ideas about how this sort of implementation could
be scalable?
Sean
-------
Sean Harvey | Developer
SilverStripe
http://silverstripe.com
Phone: +64 4 978 7330 ext 39
Skype: halkyon5
Level 3, 97-99 Courtenay Place
Wellington, New Zealand