Monday, October 22, 2018



Running Modern Point of Sale (MPOS) and Cloud Point of sale (CPOS) Samples

Today we are going to discuss on how to run and use Modern Point of Sale (MPOS) and Cloud Point of Sale (CPOS) samples provided in the Retail SDK by Microsoft as a development guide for Retail extension and customization development.

For Details on the Retail SDK please see my previous 

blog here.

Let’s navigate to Retail SDK -> POS and see what’s in there.



As we can see here the POS folder contains a visual studio solution that contains files that are built in order to make these sample run. Let’s run the any of the project MPOS and CPOS to see the contents.

Usually the development is done on the CPOS so let’s run the CPOS so that we can further proceed with running the sample extensions aswell.

Start the visual studio as an admin and open the CloudPos project.

NOTE: Make a backup of RetailSDK before making any changes to the SDK.



As we can see that the solutions contains two projects which are POS.Web and POS.Extensions. All the Extensions and customization we do will be done in the POS.Extension project and we donot need to look at the POS.Web project as no changes will be made to so we can collapse that project.

Now we can see that the POS.Extension project contains only three files…. We will look into the details of the files later but if we go into the extension folder of the POS folder we can see many folder which are not visible here



The highlighted files in the folder are not visible in the project so we need to make them visible in order to work with them. To make the files visible click on the show all files button highlighted in the image below and you will see all the files that were in the folder here.



Now we need to include the files that we need for development purpose in the project so we can work with them so include only the files we need to the project. Since we will be only working with some extensions for this blog let’s just include the SampleExtensions and SampleExtension2 folders to the project. The necessary files for development are the files except the folder with are optional to include so lets include the files.




Since the Retail Modern POS is a typescript based application so all the extensions developed for POS will be in typescript. Before moving on with the discussion over the files in the POS.Extension project let’s just have a look on the basic Cloud POS so that we can then identify the POS extension we applied to the POS.





This is the basic POS screen … Let’s Navigate to any product in the product categories.




.
This is the basic POS product view screen as we can see that there are many panels displaying here and we can extend more here … lets now move on with the details of the POS files we previously included in the project so that we can run our sample extensions and check its impact.

The two most important file after the customizations files that we included in the form of folders are tscongif.json and extension.json.

Tsconfig.json:

If we look into this file we can see multiple sample extension listed. So what does this file do … basically the extension listed in this file are excluded from build and are not applied to the POS inorder to run sampleextension and sampleextension2 we need to  comment them out from this file.



Extension.json:

This file consists of the link to the base extensions folder which contains the extension. This specifies the POS to look for the specified extension in the place. Initially the file is empty and we need to specify which extension are place where.









To run these extensions just simply build the solution and login to POS.




Here you can see the highlighted product availability sample in action.

No comments:

Post a Comment