Posts

Understanding Products And Fetching The Products in Console Application in Sitecore OrderCloud

Image
Hello everyone, In this blog we will see how we can create a product in Sitecore OrderCloud. Additionally, we will see how to fetch that product in console application. This usecase will be using Buyer User. To start, lets quickly navigate OrderCloud Portal. To create a product and assign that product to the user, we need to follow some steps listed below: 1) Creating a product: Navigate to Product section in OrderCloud portal. See the below screenshot for your reference.You can directly copy the JSON payload as shown and can submit it rather than filling individual fields. 2) Assigning Product to Catalog: Once product is created assign that product to Catalog by navigating to Catalog section. Note : Now Check, whether product is assigned properly to Catalog. Your Catalog should be in active state or else your product will not be shown to buyer user. Also your Catalog should be assigned to your Buyer Organization where that user is present. 3) Verify Product visible for that ...

Understanding Security Profile Group in Sitecore OrderCloud

Image
Hello everyone, In this blog we will try to understand, what is Security Profile in Sitecore OrderCloud. How we can Security Profile in Sitecore OrderCloud. Let's first understand what is Security Profile. According to Sitecore OrderCloud definition "Security profiles are groups of roles (permissions), each of which grant users access to specific API endpoints and functionality. This lets you have permission based API calling from applications. If a request is made by a user without sufficient roles, they will receive a 403 Forbidden response" This come very handy in Ecommerce application where you have role based functionalities. The best example is Buyer User who will having different roles(Ex.MeAddress,Shopper,MeCreditCardAdmin etc.) and Seller User(Ex. FullAccess, OrderAdmin,BuyerAdmin,CatalogAdmin etc.).There are multiple roles in Sitecore OrderCloud which we will see in different blog. Let's create our first Security Profile in Sitecore OrderCloud Navigate ...

Understanding Different Authentication Grant Type WorkFlows in Sitecore OrderCloud

Image
Hello everyone,In my previous blog regarding OrderCloud, we have seen what is Buyer organization, Buyer User group, Buyer User and how they are related to each other. In this blog we will try to understand the Authentication mechanism used by Sitecore OrderCloud. What different grant types it support and how we can connect to a third party OpenID(basically for implementing Single Sign On) for implementing the same. Sitecore OrderCloud mechanism is built on OAuth 2.0 to support both Authentication and Authorization.If you want to understand Authentication and Authroization you can refer my blog on the same Here .I have tried to explain using Sitecore and how it implement the same. So lets get started. In Sitecore OrderCloud there are basically 6 GrantType Workflows which is listed below Password Grant Type Workflow Client Credential Workflow Refresh Workflow Elevated Password Workflow Anonnymous Shopping Workflow SSO Workflow Password Grant Type Workflow : The most common grant type...

Understanding Buyer, User Group and User concepts in Sitecore OrderCloud

Image
Hello everyone, In this blog we will try to understand what is Buyer, Buyer Organization, User Group, Users in Sitecore OrderCloud. We will also see how we can create all these in Sitecore OrderCloud portal. Buyer : Buyer is real world entity who come to your ecommerce website and look for products to buy. He can also navigate through your website without purchasing anything Users : Users are basically a single entity in Sitecore OrderCloud who perform some operation in Marketplace. They can either be Buyer user or Seller user User Groups : This is basically a collection of users with same interest or common persona in market place. Ex. Different user with similar interest in one category in ecommerce website. Buyer Organization : Buyer Organization is an umberalla under which User Group containing common persona and interest resides. Its a collection of User and User Groups. Now let's see that how in Sitecore OrderCloud Portal, we can create those. Creating a Buyer Organ...

Some Useful Sitecore PowerShell Script Part 2

Hello Everyone, this is my continuation for Part1 where we have seem some powershell script which can be handy during our Sitecore development. In this part we will see some powershell script which can be useful to us. Powershell script to find the all the link referrers of an item. Item path: Path of the item for which we need to find the where it is being getting used. #Getting Item referrer $props = @{ InfoTitle = "Referrers" InfoDescription = "Lists all items that are using this item" PageSize = 25 } function Get-ItemReferrers { $item = Get-Item -Path "{{Item path}}" $linkDb = [Sitecore.Globals]::LinkDatabase $links = $linkDb.GetReferrers($item) foreach($link in $links){ $linkedItem = Get-Item -Path master:\ -ID $link.SourceItemID $linkedItem } } $items = Get-ItemReferrers $items | Show-ListView @props -Property @{Label="Name"; Expression={$_.DisplayName} }, @{Label="Path...

Some Useful Sitecore Powershell Scripts Part 1

Hello Everyone. As we all know, when we work with Sitecore, there are many situation where we need to use powershell scripts. It can be for bulk item creation or item modification. In this blog, we will see some useful powershell script Creating Bulk Items in Sitecore from one data folder to another.In this example we are creating Country items for example Destination Path (Where item is going to be created) Source Item Path (From where item is going to be fetch) Template to be used : The template path from which item will be created. $destinationPath = "{{Destination Path}}" $countryItems = Get-ChildItem -Path "{{Source Item Path}}" $bulk = New-Object "Sitecore.Data.BulkUpdateContext" try { foreach($record in $countryItems) { $item = New-Item -Path $destinationPath -Name $record.Name -ItemType "{{Template to be used}}" $item.Editing.BeginEdit() $item["Title"] = $record["Title"] $item[...

Introduction To Sitecore OrderCloud

Image
Hello everyone, This is my first blog for Sitecore OrderCloud series. This is an introductory blog where we will try to understand basic concept about what is Sitecore OrderCloud, what are some common terminologies use in Order Cloud. In this blog we will also see how we can create our first market place in Sitecore OrderCloud. Lets understand what is Sitecore OrderCloud first. According to Sitecore, Sitecore OrderCloud powers unique ecommerce, order management, and marketplace solutions while following MACH( Microservices-based, API-first, Cloud-native, and Headless ) architecture. Sitecore OrderCloud gives a platform in form of portal as well as expose Rest API where you can build whole backend system require for and ecommerce solution.Everything inside Sitecore OrderCloud is exposed through rest api which any front end ecommerce application can easily integrate and use it. Sitecore OrderCloud supports B2B, B2C and B2X business model Some basic concept in Sitecore OrderCloud are ...

My Sitecore Upgrade Learnings Part 2

Image
Hello Everyone, This is second part of  My Sitecore Upgrade Learnings. In previous part we have seen, how to upgrade Sitecore from one version to another. You can refer the same in link Part1 . In this blog, we will try to cover the backend code part upgrade required for the same. There are many ways in which we can upgrade the code part listed below. Updating the Sitecore DLL using Package Manager Console for all the projects in your current solution Using a Powershell Script to update the Sitecore DLL for all the projects in your current solution The First option is fairly simple. Open any project of your solution, Click on references --> Manage Nuget Package. Once Nuget Package is open, then you will see the installed version of Sitecore DLL. Click on Update tab and you will be able to see the updated version. Just select the version as per your need and click on update. It will also update all the dependent DLL for that version. There is one more option to update th...

My Sitecore Upgrade Learnings Part 1

Image
Hello Everyone, In this blog I will share my learnings and experience while working on Sitecore upgrade project. Recently we migrated our Sitecore solution from 9.2 with SXA to Sitecore 10.2 with SXA. I will also share my experience regarding what was our approach to implement the same. Sitecore already have a very good document which clearly explains what is needed to upgrade the Sitecore version. If you are upgrading from version prior to Sitecore 9 that this blog will not be that much useful but still you can refer this for some learning purpose. So let's get started. We were having a Sitecore managed cloud in 9.2 with compatible SXA 1.9 installed on it. We started with following approach mentioned below. We got a new Sitecore Manage cloud instance with 10.2 version We installed the Compatible Sitecore PowerShell (6.3 IAR) and SXA version (10.2.0) with respect to 10.2 After successful installation on CM environment, we required to deploy respective SXA modules on CD environmen...

OAuth 2.0 and OpenID implementation in Sitecore Website

Image
Hello everyone, In this blog we will try to see how we can implement OAuth 2.0 and OpenID for Authentication and Authorization. In previous blog post we discuss what is OAuth 2.0 and OpenID and how Sitecore uses the same for Authentication and Authorization. This blog will give you a basic idea that how we can follow Sitecore approach to integrate third party Identity provider. So let's get started. Would recommend everyone to read my previous article on OAuthAndOpenID The first step will be, to create a client page with login button. This button will be responsible for transfering you to Identity Server. We will see how Sitecore does it and will try to use the same logic for our login button logic. Create a Login Controller. This controller will give us the required SignInInfo details which will be passed to Identity Server. You can refer below code. We have created a Login Action method which will call the GetSignInInfo method to get the identity url protected readonl...