Category: OrderCloud

Process to delete Sitecore OrderCloud Marketplace

Admin User who created the Marketplace can delete and Transfer the Ownership of the Account. Where the ownership is transfered to the users cannot delete the Marketplace.

To delete the Marketplace you should have first created a Marketplace and login to the portal as Admin User having Full Access.

For creating your Marketplace see this blog.

Once you have logged in to the portal from Dashboard select the Marketplace you want to delete.

In this case lets delete the Marketplace with name “OrderCloud Blog Auto Generated ID”

Once you are in the Marketplace, you should see the option to Delete since you have FullAccess

Confirmation message is displayed. Click on Send Confirmation Code

A confirmation code is sent to your registered mail.

Once you select option to Send Confirmation Code, you should receive mail on your registered email address from noreply@four51.com.

The mail should have details of the Marketplace you are attempting ot delete along with the code

Use this code to confirm the deletion of Maretplace

And the deleted Marketplace is no more in the Dashboard-

Setup OrderCloud Headstart project using Azurite, Storage Explorer and Cosmos DB Emulator – Part 1

Follow below steps to configure Sitecore Ordercloud Headstart middleware without having to provision Azure online resources. i.e. setup offline Azure resources

Online vs Local Azure resources-

Azure Online ResourcesAzure Offline Resources
Azure App Configurationuse appSettings.json
Storage AccountAzurite Emulator and Azure Storage Explorer
Azure Cosmos DatabaseAzure Cosmos DB Emulator

Step 1 – Install and Run Azurite Emulator

Install Azurite- Pre-requisite is to install node js

npm install -g azurite

Run Azurite- Navigate to the folder where the supporting files should be deployed e.g.: c:\Azurite

azurite start

OR - if you want specfic folder and in debug mode 

azurite --silent --location c:\azurite --debug c:\azurite\debug.log

Blob service should listen to http://127.0.0.1:10000

Step 2 – Install Microsoft Azure Storage Explorer

Install Azure storage explorer. Download from here

Step 3 – Configure Blob Containers

Connect to Local Azure Storage

Click on the connect to open the connection dialog box

Select the Local storage emulator

Fill in the required details

Display name

Account name – this wil be used to connect to the blob storage

Blobs port- port used to connect to the vlob storage

Queues and Tables port- port used to connect queues and tables respectively

These are the connection information (you might have to note this)-

Local account is created-

Storage Explorer is now able to conect to Local Storage Emulator i.e. Azurite

Create a Blob Container – ngx-translate and create new Virtual Directory i18n

Blob Container and folder name can be any other name. You need to configure this correctly in UI config. See this in later steps

Upload the translation file

Ideally Container, Virtual Directory and trnslation file should be created by Headstart Api. I couldn’t make it work. Hence alternative this I have attached en.json file here.

Once uploaded you should be able to see the uploaded file-

Set Public Access Level to Blob Container

Select the Public read access for containers and blobs

Configure CORS settings

CORS settings are required for accessing the en.json file to access from the local blob storage

Click “Add” to add new CORS Settings-

Following values in –

Allowed Headers – x-ms-meta-data,x-ms-meta-target,x-ms-meta-abc

Exposed Headers – x-ms-meta-*

Check for all the steps performed above the operations in Blob Storage Explorer is successful.

Reference for CORS Rule-

https://docs.microsoft.com/en-us/rest/api/storageservices/cross-origin-resource-sharing–cors–support-for-the-azure-storage-services

Now try to access the translator file from local blob storage on – 127.0.0.1:10000/devstoreaccount1/ngx-translate/i18n/en.json

OrderCloud headstart configuration issues- resolved

OrderCloud headstart configuration issue- resolved

Error- Running the Headstart.Api with non-compatible .net framework

Resolution – Install .net core 3.1 from here

Error – while running the HeadStart.Api from the Azure Api Configuration when Cosmos is not setup in ServiceCollectionExtensions.cs

When writing this blog there is a issue whilst connecting the Cosmos service is the configuration for the same is set.

Change the code to following in ServiceCollectionExtensions.cs file-

Change the highlighted line as the empty strings are not gracefully handled.

Resolution

==> ServiceCollectionExtensions.cs

if(string.IsNullOrEmpty(config.DatabaseName)|| 
                string.IsNullOrEmpty(config.EndpointUri) || 
                string.IsNullOrEmpty(config.PrimaryKey))
{
  // allow server to be started up without these settings
  // in case they're just trying to seed their environment
  // in the future we'll remove this in favor of centralized seeding   
  // capability

     return services;
}

Error – while running the HeadStart.Api from the Azure Api Configuration when Cosmos is not setup in CosmosExtensions.cs

When writing this blog there is a issue whilst connecting the Cosmos service is the configuration for the same is set.

Change the code to following in CosmosExtensions.cs file-

Change the highlighted line as the empty strings are not gracefully handled.

Resolution- Crate a cosmos endpoint or change the highlighted line of code to-

==> CosmosExtensions.cs

if( string.IsNullOrEmpty(endpointUrl) ||     
           string.IsNullOrEmpty(primaryKey) ||  
           string.IsNullOrEmpty(databaseName))
{
   // allow server to be started up without these settings
   // in case they're just trying to seed their environment
   // in the future we'll remove this in favor of centralized seeding 
   //capability

        return services;
}

Create your first Sitecore OrderCloud Marketplace

Login to the OrderCloud portal.

https://portal.ordercloud.io/login

You will be shown the Dashboard and an option to create New Sitecore OrderCloud Marketplace

Step 1 – Select Region

While writing this blog there are 4 Regions avaialble for you to select. As per the document you should create Marketplace in Us-West region by default so as to seed using headstart. If you want to use regions other than Us-West you might have to request this to OrderCloud team.

Select region Us-West from the region option.

Step 2 – Autoselected Environment

By default the Sandbox environment is selected for you to try the OrderCloud. If you want to access Staging or Production contact OrderCloud team.

Step 3 – Provide Mareketplace ID [optional]

Provide the Marketplace Id if you want to have your own name. Id’s are Writable i.e. if you chose your ID OrderCloud will generate the same for you or you may let the OrderCloud auto generate the ID.

Chose the Marketplace ID

Step 4 – Provide Marketplace Name

Provide Marketplace name or description here. Click on Create Marketplace.

A new Marketplace will be created and you will be redirected to the Settings tab of the Marketplace with Instance details and other Basic info.

You should also see your newly created Marketplace in Dashboard

Now lets try creating a Marketplace with the same name in the same region i.e. Us-West

You can see OderCloud doesn’t allow to create a new Maretplace with the same name

If you also try creating a Marketplace with the same name in different region it wont allow-

Create a new Marketplace without providing the ID

A new Marketplace is created and OrderCloud gave it a Unique ID