0

In Ubercart, the uc_order view (admin/structure/views/view/uc_orders) uses exposed filters for status and order ID.

I can add another filter, for example username, email and so on by clicking on Add filter criteria and selecting the criteria (user:username, user:email).

I need to add a filter to filter orders by the roles assigned to customers. There is no option such as user:roles in the filter criteria list to select.

How can I achieve this?

2 Answers 2

0

By configuring the Access: section on the Page settings, we can manage Page: Access restrictions.

Choose the Roles and assign the required user role.

2
  • No, I don't want to restrict access to this page. I want to allow the administrator to filter orders by the selected customer roles. I need to add an exposed filter.
    – Axel Stone
    Commented Mar 15, 2017 at 8:14
  • Using hooks you can alter the views.
    – developer
    Commented Mar 15, 2017 at 8:21
0

The solution is to open "advanced" section, add new "relationship" marked as "order:customer". After this new options in "add filter" will be available. So click at "add filter" and select "user:role" and set it as "exposed to users".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.