Today I checked in a new feature/improvement to an old feature. There is a database schema change & I really want to minimize those going forward but I think this one is not too major and worth the change.
Anyway, the change I implemented was to add more structure to product attributes. We've always had these in Satchmo but they were just name, value pairs without any structure around them. The use case for them is to provide additional information about your product, for example, to store the number of pages in a book product. The problem with this structure is that they were all free-form text so someone could use pages, another Pages and the third PAGES and they would all be different. This clearly limited their usefulness. The new change is that you can now define Attribute Options as well as custom validators for the field. What this means is that you can add an option "Pages" and make sure that the user enters an integer. The nice thing is that you could also require the admin to enter a value such as "Yes" or "No" and do a conversion on the data to make sure it's consistent. I'm not sure if this is adequately explaining the issue. Hopefully the docs here will explain it more - http://www.satchmoproject.com/docs/svn/product-attributes.html The reason I am excited about this change is that I think this will help people who just want to add one or two extra fields to the Satchmo products not have to worry about doing custom products. In my opinion, custom products should be required for way more complicated products - not just new fields or attributes. Anyway, I hope folks find it useful and if you are in production with a 0.9 shop make sure you are aware there is a schema change before you update to trunk. I haven't put together a script for migration. If you're not using attributes now, just drop the old product_productattribute table and resynch your database. If you have data in there, it's not going to be too difficult to dump the data and reload in the new schema. If someone creates a script let us know but I'm hopeful this feature wasn't used a lot so this is a minimal impact. -Chris -- You received this message because you are subscribed to the Google Groups "Satchmo users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/satchmo-users?hl=en.
