Orchard Harvest 2017 – Using external data with Orchard

Jorge Agraz is opening the conference after Sébastien Ros’ keynote with a talk about using external data in Orchard. Jorge work for Onestop, a company that builds e-commerce sites. Their web sites get their commerce data from APIs and then used to display that through their controllers with Orchard shapes. They attempted to use widgets instead of controllers, but that came with some significant maintenance problems.

The Katy Perry web site is built with Orchard

With the latest version, commerce pages are actual Orchard content types: category, product and shopping cart. They have elements, fields, and parts to represent everything. A Product driver lazily gets data from the commerce API and instantiates more than 20 shapes from it, that can be used to display the contents. This provides a lot of flexibility, and is easier to move around between dev, staging, and production servers. The number of shape alternates in typical themes has been drastically reduced from 50 to 90 down to 6.

Interestingly, themes have a shape table provider that can be used to turn shapes on or off, and configure them, going beyond what placement.info can do.

No Comments