Posts

Showing posts from December, 2013

Working with Markets in EPiServer Commerce 7.5

It is a very strong feature of EPiServer Commerce 7.5 being an Enterprise Commerce Platform combined with the power of all CMS features. It can help businesses to grow and target correct markets and earn more profits. The "Market" means that you can define multiple markets, each with its own product catalog, language, currency, and promotions, for a single-site. It can be any type of division of Business, e.g. For a Business there can be more than one markets within the same country, language or a currency or another business may divide its markets at country level. E.g. A Book Seller Company may be selling different type of books in different parts of countries and they may require two different sites/markets or a car seller company selling cars in different countries Implementing markets
You can define your own markets by implementing the IMarket interface, and set up a list of supported languages (through CultureInfo), countries in that market, supported currencies, as w…

CMS Style rendering Templates in EPiServer Commerce 7.5

1.Create a Content Type We can use CMS-style rendering template in EPiServer Commerce 7.5. to use rendering template for a Node or an Entry, we need to define a content type class e.g. using EPiServer.Commerce.Catalog.ContentTypes; using EPiServer.Commerce.Catalog.DataAnnotations; using EPiServer.DataAnnotations;
namespace EPiServer.Commerce.XYZ {     [ContentType] publicclassFashionItemContent : VariationContent     {         [Encrypted]         [CultureSpecific] publicvirtualstring Description { get; set; }
        [SaveHistory] publicvirtualint Size { get; set; }     } }
2.Define templates It is possible to have several templates defined for the same model. If you want to display a Node/Entry on your site, you can do so by creating a template in the same way as we do with CMS content. e.g. [TemplateDescriptor(Default = true)] public

EpiServer Commerce specific Attributes

We can use any attribute developed for CMS, in our commerce content type models. e.g.  ContentType attributes, Access attributes, AvailableContentTypes attributes, TemplateDescriptor attribute, Property attributes, Image URL attribute and Default backing types also.

There are only a few specific attributes for commerce only that we can use in our models

CatalogContentType attribute
To connect the content type with an existing meta class, the CatalogContentTypeAttribute can be used. we connect them by defining the name of the meta class that should be connected to the content type.

using EPiServer.Commerce.Catalog.ContentTypes; using EPiServer.Commerce.Catalog.DataAnnotations;
namespace CodeSamples.EPiServer.Business.Commerce.Catalog.Provider {     [CatalogContentType(MetaClassName = "WineSKU")] publicclassCatalogContentTypeAttributeSample : VariationContent     {     } }

Encrypted attribute
To have "Use Encryption" enabled, we can use Encrypted attribute. It will encrypt th…

Strongly Type Models in EPiServer Commerce

We can create Strongly typed models just by inheriting a proper type from EPiServer.Commerce.Catalog.ContentTypes and and decorating it with the ContentTypeAttribute attribute. that means those types will be available as ContentData.

To create models for commerce content following types are available.
VariationContent: A type for variation/SKU models.
ProductContent: A type for product models.
BundleContent: A type for bundle models.
PackageContent: A type for package models.
DynamicPackageContent: A type for dynamic package models.
NodeContent: A type for category/node models.

Examples:
using EPiServer.Commerce.Catalog.ContentTypes; using EPiServer.Commerce.Catalog.DataAnnotations;
namespace EPiServer.Commerce.XYZ.Models.MetaDataClasses {     [CatalogContentType(GUID = "BE40A3E0-49BC-48DD-9C1D-819C2661C9BC", MetaClassName = "Fashion_Item_Class")] publicclassFashionItemContent : VariationContent     { publicvirtualstring Description { get; set; }     } } namespace EPiServer.Commerc…

Assets and media in EpiServer Commerce 7.5

Asset management in Commerce By default the new content-based asset management system with the blob provider model  is used for adding assets to the catalog nodes and entries when manging catalogs. All files are stored in the same location as the EPiServer CMS files, providing a more unified user experience.

In a Commerce installation, products and product variants from the product catalog can be accessed from the Catalogs gadget in the Assets pane, with general support for drag and drop of content items into CMS pages and blocks. The integration is done using content type classes EPiServer.Commerce.Catalog,

EPiServer.Commerce.Catalog.ContentTypes and EPiServer.Commerce.Catalog.Provider.
Configuration of asset management systemThe legacy Asset Management system for Commerce Manager is still available in EPiServer Commerce, but by default the new asset management system is configured to be used. A notification message with this information is displayed.
The configuration setting UseLegac…