I am using Drupal 8 Commerce v2.19. I am trying to create a view that shows all the store products. I have created the Search API index of the products, indexed the store field as in this screenshot.


This is the contextual view filter. Nothing happens after placing the block in www.example.com/store page. It displays all the products of the website.


  • You're missing the store ID in the URL, should be in /store/{sid} Ex: /store/1. To find the ID go to /admin/commerce/config/stores click on "edit" and then click on "view". – No Sssweat Jun 19 at 11:00
  • or alternatively, use the URL alias that you defined in your store settings, if you did set one. – No Sssweat Jun 19 at 11:14
  • Hi @NoSssweat, this is what exactly I have done. Created two new stores. In my view I have selected the contextual filter product datasource>>product default value>>store id from the current store. After than placed the block in the store page section /store*. While I have tested it in the views contectual filter preview for the different store ids it worked well. But, after placing the block on the page it doesnt show anything related to the store. You may check it at dhruva.webfactional.com/store/1/ – Dhruva Tripathi Jun 19 at 19:03
  • Even I have copied the admin store>> views >>product page using contextual filter to render the all store product. But as a page it is visible while not showing as a contextual block. – Dhruva Tripathi Jun 23 at 17:29
  • I have found the bug with the commerce store where views contextual filter not working for the store id while the page links are working. Please help me to solve the issue. – Dhruva Tripathi Jun 23 at 18:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.