Lyle,
I'm replacing the "Add to cart" button on my product page with text for anonymous users using:
<?php
function buy_memberships_nodeapi(&$node, $op, $arg3, $arg4){
global $user;
if ($user->uid == 0 && $op = 'view') {
$node->content['add_to_cart']['#value'] = t('You must <a href="login">log in</a> or <a href="user/register">create an account</a> to purchase family memberships.');
}
}
?>Works OK, except the text 'You must log in...' appears on many, but not all pages. Can't seem to limit it to just the product page.



Joined: 05/23/2008