This event is fired when a customer is being set to a sale and this event is called to either allow this customer to be used or disallow the operation. The event may also return an alternative Customer id to be used replacing the current value being used. It is numbered as event #5004
Symbol | Value |
%ctx.number.1% | The customer id being set. This will be a non zero value, but can be a positive or negative number |
%data.workingsale.???% | |
%data.workingcustomer.???% |
Please refer to Set Customer Event for detailed operation description.
This event can return
:event(5004) // If requesting cid=17, redirect to cid=201 if data(workingcustomer.cid) == 17 then exit 201 // If requesting cid=18, ignore request and leave sale as is if data(workingcustomer.cid) == 18 then exit 0 // Generally allow it exit 1