Here's what I'm trying to do:

I'm trying to make a button on the product page that checks if a user has access to the referenced node, or not. Basically, if you already purchased access, the button will show saying "View this Document".

I know more or less how I can do it in PHP, I just need to know what variables I can use to check it?

Comments

danielb’s picture

Well if you were going to do it in the product teaser it would be something like this

<?php

if (node_access('view', $the_node_in_question)) {
  // show the button
}

?>
danielb’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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