Would you like to be notified for every new articles? Please click HERE to subscribe for newsletter.

Add Filter Criteria To Drupal Commerce Product Administration Page

  • Posted on: 2 January 2013
  • By: admin

The Drupal Commerce product administration page is a View which created using Views module. It means, we can customize that page with no code by using the Views administration page. Now we will see how to add a form with some filter criteria such as product Title and Price to that page so we can search the product list based on the product Title/Name and Price.

Please, follow the steps below to make that happen.

  1. First, we have to open the Views administration page (admin/structure/views). Then, edit the View with the name Products.
  2. Find the Filter Criteria section then click Add button.


  3. Choose the Commerce Product: Title as the filter criteria then click Add and configure filter criteria button.


  4. Now, this is the key. Check the Expose this filter to visitors, to allow them to change it option so the user can use it to filter the product list by product name. Then click the Apply (all displays) button.


  5. To add the price filter criteria, click the Add button once again. Choose the Commerce Product: Price (commerce_price:amount) option. Then click the Add and configure filter criteria button.
  6. Check the Expose this filter to visitors, to allow them to change it option.
  7. Choose is between as the operator, then click the Apply (all displays) button.


  8. Save your View.
  9. Now open the commerce product administration page (admin/commerce/products). You will see the filter form above the list.


Comments

How can we create Product listing view / block to show all users ( include anonymous ).
Just like a shopping sites.
email: ashwin.parmar2020@gmail.com

Add new comment

Limited HTML

  • Allowed HTML tags: <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.