This post will show you the way to enable and use product search by attributes in POS (ePOS).
Configuration of product attributes in AX include two main steps:
- Configure attribute groups, attributes and attribute values for hierarchies, categories and products. Very nice explanation is here: ORGANIC AX: PRODUCT ATTRIBUTES
- Mark all attributes to be used for search as ‘Can be refined’ (we will use new ‘Brand’ attribute as a sample).
- Assign product attributes to stores. Technet article can be helpful:STORE PRODUCT ATTRIBUTES
- Run 1040, 1050 and 1070 jobs to update store databases.
I did not find any standard way to run search by attributes in POS. But we can enable such search by a very small coding.
The main limitations of search by attributes are:
- It can be executed only within a SINGLE product category. This makes impossible to search across different category hierarchies
- It is performed only in local store database; call HQ (AX) is not possible.
- Add new ‘Blank operation’ for POS. Code for operation is shown below. This blank operation runs standard ‘Item search’ operation, but with a parameter. The parameter should contain Rec ID of product category.
public void BlankOperation(IBlankOperationInfo operationInfo, IPosTransaction posTransaction)
operationInfo.OperationHandled = true;
- Add new button to POS layout
A. When POS starts item search with not empty category, it will show Search by attributes buttons: Category and Product attributes
B. When you click on magic glass, the list of product attributes configured as Can be refined for current store will be shown.
You can specify search values for multiple attributes, they will be applied as AND logical condition.
C. Search shows found products
D. If you click on Product details button, the list of attribute values will be shown.
E. Minimum number of search chars to enter is two (2). When you try to enter a single character, you will receive the error: Search requires a minimum of two characters.
F. Search by date attributes is disabled by default: AX does not allow marking date attributes as ‘Refinable’. However, if to change AX code a bit, search by date attributes will be possible.