Virtual Product Content (IProductContent)
In early versions of Merchello, in order to render products, it was required to make an association with an Umbraco content node so that additional properties such as images and descriptions could be added. Merchello version 1.12.x introduced IProductContent
which itself implements Umbraco's IPublishedContent
.
Merchello versions 1.12.x and later allow for a back office editor to extend Merchello products directly be associating Umbraco document types by creating a Product Content Type reference. Extended properties can then be edited through Merchello's product editor directly.
A slug is also generated for the product.
At this point, the product can be rendered as virtual content (meaning they do not require an Umbraco content node to be created in the content section). This is accomplished by using an Umbraco Content Finder by the product slug.
By default, the URL for the IProductContent will be /[product-slug]
Various cultures can be configured in the Merchello.config file.
<contentFinderCulture>
<!-- You can set slug prefixes for products for each culture if you need to.
e.g. with the following settings, en-US product URLs will be /en/[slug]
<route cultureName="en-US" productSlugPrefix="en" />
-->
</contentFinderCulture>
In implementations, where more complicated URLs are desired, developers can write their own content finder and use the MerchelloHelper to find the TypedProductContent
.
Updated less than a minute ago