OMS Related Order Search:
Configuring Related Orders Indexable Fields:
In order to perform a fraud search on specific fields, you must appropriately index the fields on the Order
you would like to search by. The load_oms_search_fields.sql
file provided with the OMS module contain default index fields out-of-box.
Configuring the Display:
In order to customize the templates you can find the Thymeleaf partials here:
- The Related Orders Tab template can be found here:
oms/modules/order/relatedOrdersTab
- The listgrid template that displays related orders can be found here
oms/partials/listgrids/relatedOrdersListGrid
To add new indexable field "checkbox" to search by, you can modify the relatedOrdersTab
partial and add any new fields you wish (provided that they are in the index)
For example:
<label>
<input class="related-checkbox" type="checkbox" name="cfname" th:value="${order.customer.firstName}">
First Name
</label>
Notice that the name=cfname
matches an indexable field configured in the DB:
INSERT INTO BLC_FIELD (FIELD_ID, ENTITY_TYPE, PROPERTY_NAME, FRIENDLY_NAME, ABBREVIATION) VALUES (-1604, 'org.broadleafcommerce.core.order.domain.Order', 'customer.firstName', 'Customer First Name', 'cfname');