We created a store with Drupal 7 Commerce. Because we wanted to let specific users create new products on our store, a user role Seller was also created with the following permissions:

  • Create, edit, delete own product display
  • Create, edit, delete own products

We have also created a block with views that allows those users to access their own product listing and edit the products with the following settings in views:

  • Contextual filters: (Node referencing products from field_product) Content: Author uid
  • Relationships: Commerce Product: Referencing Content

A link to Add new product has also been created in that block, although I'm not sure this is the safest way to do it: /admin/commerce/products/add/product

We also use the following modules to make life easier:

  • Auto product display
  • Commerce AutoSKU
  • Automatic Entity Labels

Everything works as should. When a Seller wants to add a new product, the add product form is shown in the front end (not admin overlay). But once the ADD PRODUCT button is clicked, it shows Access denied page - probably because it wants to redirect to the admin products list.

Is there a way to redirect those users to their own listing or any other page on our website once they add a product, so they don't get that error?

  • /admin/commerce/products/add/product since you added the admin access , they will definitely get a 'access denied' you must create a access by there login interface. like /user/commerce/products/add/product instead of using admin. – dean Nov 6 '19 at 15:50
  • I have been trying to do that with no luck. Can you give me more specific instructions? – prima Nov 27 '19 at 8:57

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.