It seems as if anonymous users are allowed to view the "products" tab on product nodes. I personally consider that being an administrative feature, since shop visitors have no reason to list the products from the node like that.

I initially thought this was just a permission issue, but there seem to be no related permissions that affect this.

Comments

Jason Ruyle’s picture

Not sure why, but there is an access argument set to a function, I just changed the function till I find out why they did it this way:

/**
 * Chekcks if the node is a products display node and that user has access to it.
 */
function commerce_pdm_access_products_tab($node) {
  // return user_access('access content') && _commerce_pdm_get_node_reference_field_name($node) !== FALSE;
  return user_access('access product display manager');
}
adamgerthel’s picture

Thanks! Hopefully the Nylin or Stalski can clarify this.

tyromind’s picture

+1

fonant’s picture

I've gone with:

/**
 * Chekcks if the node is a products display node and that user has access to it.
 */
function commerce_pdm_access_products_tab($node) {
  return user_access('access product display manager') && _commerce_pdm_get_node_reference_field_name($node) !== FALSE;
}

and this works fine for me.

Christopher Riley’s picture

+1 Can't see a reason why we need to confuse the users visiting the site with a clearly Administrative function.

minneapolisdan’s picture

subscribing

Jason Dean’s picture

Subscribing

anthonyjhall’s picture

subscribing

superstar’s picture

Status: Active » Needs review
StatusFileSize
new1.09 KB

Here is a patch for this issue:

- corrected permission in commerce_pdm_access_products_tab from "access content" to "access product display manager"
- typo in the comments for the above function
- corrected capitalisation of "Access product display manager" in hook_menu

Jason Dean’s picture

Patch works fine for me - thanks!

jaymallison’s picture

Status: Needs review » Reviewed & tested by the community

#9 is a winner! Lets get this committed.

tars16’s picture

#9 fixed the issue for me as well.

netsensei’s picture

vote +1 on #9!

jibize’s picture

Patch on #9 worked for me as well.

Thanks superstar!

summit’s picture

Hi,
I do not see commits from july 20. Is this module still maintained please?
I am looking for a module like this as add on to Commerce_BPC.
Thanks a lot in advance for your reply.
greetings, Martijn

thijsvdanker’s picture

+1 on #9

mariafromatoz’s picture

Yeap, #9 worked for me as well.

ollie222’s picture

Superstar's patch in #9 has worked for me too, thanks.

latulipeblanche’s picture

Tnx superstar , patch #9 worked.
Like@summit I would like to know if this module is still maintained please?

jaymallison’s picture

^ yeah that. It seems this project has been abandoned. It's a total shame considering how vital it is to commerce.

nylin’s picture

Hi guys, I'm looking for maintainers of this module just because I don't have any time for it myself ATM. If there is anyone that would like to become a co-maintainer of the module, please let me know.

latulipeblanche’s picture

I really would like to help you, but I'm not a developer :(

netsensei’s picture

Status: Reviewed & tested by the community » Fixed

Thanks! Committed this.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

jdln’s picture

Status: Closed (fixed) » Active

I have the latest version of core and all modules and im still getting this issue.

jdln’s picture

Could someone provide some instructions for the solution from #4? If I remove the php tags and add it to my template.php file i get a white screen for my site. thanks

globefox’s picture

Hi jdln the patch is applied to the module file not template. See the instructions here for how to apply patches manually. http://drupal.org/node/534548 Easy once they've been explained. Yes, this patch worked for me. I do hope this module gets maintained again.

bogeyman’s picture

There is a module named Commerce Auto Product Display which does similar thing like this module. You might want to use it because this module is no longer maintained.

summit’s picture

Hi,
I think now the http://drupal.org/project/inline_entity_form is the way to move forward!
Greetings, Martijn

millzee’s picture

Does anyone actually know how to fix this issue which only came about after we updated the core from drupal 7.14 to 7.18.

netsensei’s picture

This has been fixed in the 7.x-1.x-dev (development) version. It's waiting to be pushed with a formal stable release. If you really need this fix right now: apply the code in the patch in #9 to your stable module installation.

Closing this for now again.

On a related note: I'm going to take a bit of time to run through the issue queue and revisit bug reports.

netsensei’s picture

Status: Active » Fixed

Marking as fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.