Hi, i'm triyng to search an order by "customer name" using the "AdminOrderSearch" class setting a value for the "customerName" property.
I see that it works only if i search with the complete customer name: firstname + lastname (e.g. "Mario Rossi"), and it does not work if i search for only a partial lastname (e.g. "Ross").
Printing the konakart mysql queries log i see that konakart executes a query with the equal "=" symbol (e.g. "select * from orders where customer_name = 'Ross' ") and not with "like" expression (e.g. "select * from orders where customer_name like '%Ross%' ").
How can i solve this issue?
Regards,
G
In the AdminOrderSearch object you can set the search rule:
public void setCustomerNameRule(int customerNameRule)
The rule for the search. Valid values are:
KKConstants.SEARCH_EXACT
KKConstants.SEARCH_ADD_WILDCARD_BEFORE
KKConstants.SEARCH_ADD_WILDCARD_AFTER
KKConstants.SEARCH_ADD_WILDCARD_BEFORE_AND_AFTER
KKConstants.SEARCH_USE_GLOBAL_CONFIG