Commerce

Extending Sitecore Experience Accelerator(SXA) Repositories

Posted on

SXA modules(talking about features mainly) follow the repository pattern. Each api controller depends on a repository to call commerce roles. For example, we have a module Sitecore.Commerce.XA.Feature.Cart which takes care of cart and checkout related operations. There is a CartController which talks to AddToCartRepository for adding a product to the cart.   This repository exposes three methods

While working on a project recently, we had to implement inventory checks for certain products while adding them to the cart. AddLineItmesToCart method doesn’t check for inventory so we decided to overwrite the functionality for this method. In order to extend AddToCartRepository, we created a feature module in our project calling it MyProject.Commerce.XA.Feature.Cart. Since this module extends the Sitecore.Commerce.XA.Feature.Cart module, we added required references to our module. We only wanted to extend the functionality of AddToCartRepository so we created the ExtendedAddToCartRepository class which inherits from AddToCartRepository. And rest was simple C# code 🙂

InventoryManager was required to make the inventory […]

Commerce

Sitecore Commerce – Robust Integration to External Systems

Posted on

Sitecore commerce provides almost all the commerce features out of the box. For example, we get Catalog/product management, pricing management, delivery fee management etc. All the commerce applications we create using Sitecore Commerce get the option to use these features and go to market. But at times, we use other tools rather just Sitecore Commerce to manage our business needs. I will explain this in details. Recently working on a Sitecore commerce project, we came across a situation where Product Management is done outside the Sitecore Commerce Environment. The client is using a legacy system which manages catalogs and products. In order to sync those products from the legacy system into Sitecore Commerce Catalogs, we considered certain options Exposing an API in SC Commerce which accepts a list of products. When new products are created or there are changes to existing products, the legacy system would pass them to our API Exposing an […]

Commerce

Sitecore Experience Commerce Architecture – Satellite View

Posted on

Sitecore Experience Commerce(SXC) provides a stupendous solution to the e-commerce world which can be customized to fill in the requirements for B2B: Businesses to business B2C: Business to end customer. This post assumes the readers are across commerce concepts in general e.g. business entities, catalogs, carts, orders, checkout process, payments, inventory management, order fulfilment etc. In this post, I will share a holistic overview of SXC architecture. Who should read this? Sitecore developers who are working or potentially going to work on SXC, architects who are looking into how SXC functions. Since SXC is part of the Sitecore platform, the basic understanding of Sitecore is required. In the future posts, I will be describing different parts of SXC in detail. SXC Architecture: Sitecore XC is comprised of the following components.  Sitecore Experience Platform aka XP in Sitecore world. Sitecore Experience Accelerator Storefront(SXA) Sitecore Commerce Engine Connect layer between storefront and Commerce Engine  Business Tool Identity Server Basic understanding of these components would […]