Conditional sub-layouts
Centara can have conditional sub-layouts.
Idea with conditional sub-layouts is that you have one default sub-layout which is normally shown. And you have one or more conditions which will replace the default sub-layout when their condition is true.
Configuration
To set up conditional layout
Go in the settings for a layout which you wish to have sub-layout on.
Publish to make the new setting active.
Examples:
The following condition checks if there is customer set and if the customer is in the customer group which has the key VIP_Customers.
customer && customer.groups.VIP_Customers
The following condition checks if balance is higher than zero.
state.isInTransaction && balance > 0
The following condition checks if there is customer on the transaction.
customer
The following condition checks if store is number 5.
pos.store = 5
Last updated
Was this helpful?