Developing an Add-On for the Management Console and POS

Developing an Add-On for the Management Console and POS

Introduction

This knowledge base article will assist developers on how to develop an Add-on for the iVend Management Console and the Point of Sale (POS).


Overview

iVend Retail 6.6/ 6.5 Extensibility – Add-on Framework facilitates developers to write custom code and develop an Add-on application for the iVend Management Console and the POS to fulfill various business requirements.


The new framework architecture is designed to provide developers with a more productive environment and simplified coding platform wherein the framework shows only relevant classes and methods by having the module namespace inherited in the project.


For example, developing an Add-on does not require a VSIX template and packaging now requires only a project DLL file for deployment.


How an iVend Retail Add-on Works

iVend Retail Add-on allows developers to extend the business logic either in the Management Console or at the Terminal POS. Once the developer deploys the extended business logic centrally as an Add-on at the Enterprise, it will be replicated to the entire retail landscape.


The developers put the business logic in the Add-on and attach the zip file containing the project DLL file on the Management Console.


After uploading the file, you need to select the Connect check box so that the Add-on can be replicated to all the Stores and POS in the network. Even though the Add-on is replicated to the entire store server network, the POS works as a base product only if it is not connected in the Management Console.


The Add-on Extensibility Framework enables developers to deploy multiple Add-ons on the one Enterprise.


Developing an Add-on for the Management Console and the POS

This section contains information about how to develop an Add-on for the iVend Retail Management Console using the iVend Retail Add-on Framework.


Follow these steps to develop an Add-on for the iVend Retail Management Console:


1. Create a new project of “Class Library” Project Type and for an example, let us name it “BasicSampleAddOn”.


2. Open the Property tab.


3. In the Property tab, keep the “Assembly Name” and “Default Name” value the same as the project name and save it.


4. Add the below mentioned file in the project reference:

a. CXSRetailPOS.exe (To locate this file, go to: <iVend Installation Directory>\PointOfSale)

b. CXS.Retail.ManagementUIComponents.dll (To locate this file, go to: <iVend installation directory>\ManagementConsole)

c. CXS.Retail.Extensibility.dll (To locate this file, go to: <iVend installation directory>\ManagementConsole)


5. Add a new class file and for our example, let us name it “AddOnBasePlugin.cs”.

AddOnBasePlugin.cs is a basic class file which contains the version, name, and other information. 


Refer to the Base Plugin code below.

1. Now add another class to write your logic. Let us name the class “AddingButtonsToPOSScreen.cs”.


2. Now inherit the class from “purchaseorderviewmodulebase” that avails us all the exposed methods for overriding.


3. Write code for customizing the events. Refer to the sample code provided below.


4. Build the solution once all customisations are made and saved.


5. Right-click on the Project and select Open Folder in the File Explorer.


6. Now go to the Bin > x86 > Release location and create a zip containing the project DLL file.


7. Then register the iVend Retail Add-on in the Management Console.


Note: Also include the CXSRetailPOS.exe file along with the Add-on project DLL while creating a zip file in the event that the Add-on is being developed for the iVend Retail POS.


Code snippet for the iVend Retail Add-on:

Below is the sample code snippet for the iVend Retail Add-on development along with an output screen image illustration:

using System;

using CXS.Retail.Extensibility.Modules.Purchasing;

using CXS.Retail.ManagementUIComponents;

using CXS.Platform.UIComponents;

using System.Windows.Forms;

using CXS.Framework.Core;

namespace BasicSampleAddOn

{

class AddingButtonsToPOScreen : PurchaseOrderViewModuleBase

{

public override void OnViewIntialized(object sender, CXS.Retail.Extensibility.ViewInitializedEventArgs args)

{

PurchaseOrderView POView = sender as PurchaseOrderView;

try

{

CXSButton cXSButton1 = POView.AddCustomButton("PO custom button 1");

CXSButton cXSButton2 = POView.AddCustomButton("PO custom button 2");

cXSButton1.Click += cXSButton1_Click;

}

catch (Exception e)

{

throw new CXSBusinessException(e.Message);

}

}

private void cXSButton1_Click(object sender, EventArgs e)

{

MessageBox.Show("Custom button clicked");

}

}

}


Sample Code Snippet for Base Plugin:

using System;

using CXS.Retail.Extensibility;

using System.Windows.Forms;

namespace BasicSampleAddOn

{

/// <summary>

/// Add on details like name, company, description, version etc.

/// </summary>

class AddOnBasePlugin : BasePlugin

{

public override string CompanyName

{

get { return "Company Name"; }

}

public override string Description

{

get { return "Sample add-on"; }

}

/// <summary>

/// Start up method for add-on. Here, we can define custom menus for MANAGEMENT CONSOLE or POS.

/// </summary>

public override void Start()

{

base.Start();

}

public override void ShutDown()

{

base.ShutDown();

}

//Specify add-on version.

public override Version VersionInfo

{

get

{

return new Version("1.0.0.0");

}

}

public override string Name

{

get { return "SampleAddOn"; }

}

}

}

 

Limitation

The iVend Retail Add-on application can only customise the iVend Management Console and the iVend Retail Terminal POS It does not used to customise the iVend Retail Mobile POS (mPOS), iVend Retail eCommerce, iVend Retail Integration Service, iVend Retail Replication Service, Handheld and any other services or components of the iVend Retail Suit.


References

Please refer to our iVend Retail Developer’s guide for further guidance and assistance on this topic.



    • Related Articles

    • Develop an AddOn for Management Console POS

      Introduction This knowledge base article will assist developers on how to develop an Add-on for the iVend Management Console and the Point of Sale (POS). Overview iVend Retail 6.6/ 6.5 Extensibility – Add-on Framework facilitates developers to write ...
    • Custom Menu on Management Console and POS

      Introduction This knowledge-based article provides developers with the information necessary to develop Add-ons for creating custom menus on the Management Console and the Point of Sale (POS). Overview With iVend versions 6.5 and above, the ...
    • Create New Screen for POS and Management Console

      Introduction This knowledge base article explains how to create a custom screen in the Management Console (MC) and the Point of Sale (POS). Purpose To provide developers with the ability to modify the existing MC and POS suite by adding their own ...
    • Custom Menu for the Management Console and the Point of Sale (POS)

      Introduction This knowledge-based article provides developers with the information necessary to develop Add-ons for creating custom menus on the Management Console and the Point of Sale (POS). Environment: iVend Version 6.5 Overview With iVend ...
    • Custom Button Panels in the Management Console and POS in iVend Retail

      Introduction This knowledge base article will assist developers on how to create a custom button panel in the iVend Management Console and at the POS. Environment: iVend Version 6.5 Purpose The main purpose for allowing the creation of custom button ...