A couple weeks ago I described how to extend the pricing model used by Sitecore E-Commerce Fundamental Edition. That was a relatively simple example, because I needed to replace the component that is responsible for calculating a price. This was a matter of extending functionality. What about extending the data model?
When you buy a product online, often times additional products are offered to you based on that product. For example, if you buy a camera you might be offered an extended warranty. If your order consists of a single camera and a single extended warranty, the relationship is pretty clear and it's probably safe to assume the warranty applies to the camera.
But what if you buy two cameras at once, and you want a 5-year extended warranty on one camera and a 2-year extended warrantry on the other? In that case, it becomes much more important to be able to associate the camera with its warranty.
This requires that the data model be extended in order to accomodate the additional information (in this case, the fact that one order line is related to another). This post explains how to do this using the example of product add-ons.
This is what the finished example should look like:
As I started writing this post it quickly became obvious that a blog post isn't the most effective way to communicate this example. While no single piece of the example is too complicated, there are many pieces to consider:
Rather than breaking this example up in a long series of separate posts, I created a guide that explains how to do this. You can get the document in the SEFE documentation section on SDN (look for the document named E-Commerce Extending Order Lines). You can get the finished source code from the SEFE Extensions project in Sitecore's Shared Source Library.
And if you have any questions, you can post them in the comments. Or better yet, in the SEFE discussion forum.
please tell me how to extend SES 2.0 order line