iVend Retail Add-on Execution Sequence
This knowledge base article explains the iVend Retail Add-on execution sequence in the iVend Management Console.
Overview
The iVend Retail Add-on contains business driven code and deployment is performed in the iVend Management Console. This article describes how an add-on executes if there are two or more add-ons registered in the iVend Management Console at the same time.
Code Snippet for Add-ons
This section shows two add-on code snippets and how they are executed as configured in the iVend Management Console.
1. Refer to the code snippet below for Add-on 1:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CXS.Retail.Extensibility.Modules.Inventory;
using CXS.Retail.Extensibility;
using CXS.SubSystem.Inventory;
using System.Windows.Forms;
namespace CustomizeExistingScreenMANAGEMENT CONSOLE
{
class ProductView : ProductViewModuleBase
{
public override void OnBeforeSave(object sender, EventArgs<Product> args)
{
MessageBox.Show("Addon1 - On Before save");
}
}
}
2. Refer the code snippet below for Add-on 2:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CXS.Retail.Extensibility.Modules.Inventory;
using CXS.Retail.Extensibility;
using CXS.SubSystem.Inventory;
using System.Windows.Forms;
namespace SampleAddOnForMANAGEMENT CONSOLEEvents
{
class ProductView : ProductViewModuleBase
{
/// <summary>
/// On Before Cancel on ProductAddEditView .
/// </summary>
/// <param name="sender"></param>
/// <param name="args"></param>
public override void OnBeforeCancel(object sender, EventArgs<CXS.SubSystem.Inventory.Product> args)
{
MessageBox.Show("On Before Cancel - ProductView");
}
/// <summary>
/// On After Cancel on ProductAddEditView .
/// </summary>
/// <param name="sender"></param>
/// <param name="args"></param>
public override void OnAfterCancel(object sender, EventArgs<Product> args)
{
MessageBox.Show("On After Cancel - ProductView");
}
public override void OnBeforeSave(object sender, EventArgs<Product> args)
{
MessageBox.Show("Addon2 - On Before save");
}
}
}
The screen images below, illustrate an example of a set of registered Add-ons in the iVend Management Console and how they are executed according to their sequence:
Reference
Refer to the CitiXsys Knowledge Portal’s Extensibility pages for further information on iVend Retail Add-ons and Extensibility.