Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
I don't know if this module has a specific rule for that, but in drupal you can do a lot of things to prevent that.
Try creating a view for watching products, with an edit link, and in the pane configuration set visibility to the user who has created items.
Or, in the product template add php code in order to prevent other sellers from seeing that product in ALL the pages (RECOMMENDED but i don't know if products are seen like a teaser too).
I wish i could help you more, but I can't explain things very well in english.
You will find a lot of ways of doing it when you know php and drupal.
Thanx so far. I was searching for a ready solution in order to prevent to have to write a new module. I need a more variable solution, where no seller can see the products of any other seller. And only certain customers sorted in groups for example group1, group2 or group3 can see and purchase those products.
If there is no such solution maybe I have to write a module for that. But I hoped to get around that somehow.
That's a good a idea, using roles for viewing products.
GeorgX you can try this.
Open node.tpl.php. (or product.node.tpl.php if exists something like that)
Use php to determine if the logged-in user is the author of the product (or a user with a role that can see the product), if not: use drupal_goto() -redirect function- to prevent the user seeing the product.
$user is the variable to use for the author of the content
$user_obj is the user logged in.
Use this function to determine the role of the user and make redirect
$user_obj = user_load(arg(1));
if (in_array('ROLE1', $user_obj->roles)) {
drupal_goto("page");}
I used the taxonomy term permissions module to make some terms viewable only by admins. Then I apply those terms to some products and filter views on those terms. (I sell memberships, the admin owns those, and I don't want them showing up in some views.)
Comments
Comment #1
rafinskipg commentedI don't know if this module has a specific rule for that, but in drupal you can do a lot of things to prevent that.
Try creating a view for watching products, with an edit link, and in the pane configuration set visibility to the user who has created items.
Or, in the product template add php code in order to prevent other sellers from seeing that product in ALL the pages (RECOMMENDED but i don't know if products are seen like a teaser too).
I wish i could help you more, but I can't explain things very well in english.
You will find a lot of ways of doing it when you know php and drupal.
Comment #2
georg_nordhausenThanx so far. I was searching for a ready solution in order to prevent to have to write a new module. I need a more variable solution, where no seller can see the products of any other seller. And only certain customers sorted in groups for example group1, group2 or group3 can see and purchase those products.
If there is no such solution maybe I have to write a module for that. But I hoped to get around that somehow.
Comment #3
j9 commentedI dont think rafinskipg was saying you have to write a module for this. I think with the views module, what you want can be accomplished.
For your customer groups, I think you can just set up different roles and then use views to limit what categories/etc each can see.
Comment #4
rafinskipg commentedThat's a good a idea, using roles for viewing products.
GeorgX you can try this.
Open node.tpl.php. (or product.node.tpl.php if exists something like that)
Use php to determine if the logged-in user is the author of the product (or a user with a role that can see the product), if not: use drupal_goto() -redirect function- to prevent the user seeing the product.
$user is the variable to use for the author of the content
$user_obj is the user logged in.
Use this function to determine the role of the user and make redirect
$user_obj = user_load(arg(1));
if (in_array('ROLE1', $user_obj->roles)) {
drupal_goto("page");}
Comment #5
shunting commentedI used the taxonomy term permissions module to make some terms viewable only by admins. Then I apply those terms to some products and filter views on those terms. (I sell memberships, the admin owns those, and I don't want them showing up in some views.)
Comment #6
Anonymous (not verified) commentedDo not other way?
Products uploaded to a private folder, you want to be seen other sellers
Thank you.