Cart Pane Link

Posts: 18
Joined: 12/27/2007

I finally figured out (to my own delight) how to make a cart pane. Having done so, I'm trying to make a link inside of the cart pane that goes to my contact node but says "click here".

Here's my pane code

/**
* Implementation of hook_cart_pane().
*/
function uc_cart_cart_pane($items) {
$panes[] = array(
'id' => 'cart_form',
'title' => t('Default cart form'),
'enabled' => TRUE,
'weight' => 0,
'body' => !is_null($items) ? ''. drupal_get_form('uc_cart_view_form', $items) .'': '',
);
$panes[] = array(
'id' => 'cart_form2',
'title' => t('Info pane'),
'enabled' => TRUE,
'weight' => 10,
'body' => 'Finished with your Order? Please contact us directly via phone. If you are a new customer click here.',
);
return $panes;
}

It's got the original pane and my new pane, and clearly, my link doesn't show up at all. What code do I use for the linkins?

Edit: I actually removed the "bool link" action I had going as the forum slurped it up in the format it was in I just put text "click here" where it was, so you can see where I'm attempting to have a link.

Posts: 18
Joined: 12/27/2007

So I fixed my own problem.

The script now has an html link in place. Remember, drupal will assume you mean a yourdomain.com/ link automatically, so unless you want to edit your domain name out of the script again, just set the link to "/node/134" for example instead of "mydomain.com/node/134"

Posts: 5269
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

You can also get a link with this function:

<?php
  $link
= l(t('click here'), 'node/134');
?>

This will be safe for any domain.