Add text to the bottom of the cart page

Posts: 534
Joined: 08/13/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer

Hi there,

I may be very tired, I'm just looking for a way to add some fixed text to the bottom of the cart page, and I jus't don't find a solution.

How could I do that ?

thanks

zmove

PS : I need to add some fix text to the bottom of the payment pane too in the checkout page...

Posts: 60
Joined: 09/07/2007
Bug Finder

I've done this by adding a shopping cart pane:

function yourmodule_cart_pane($items) {

$panes[] = array(
'id' => 'your_id',
'title' => t('Title'),
'enabled' => TRUE,
'weight' => 10,
'body' => 'YOUR TEXT HERE',
);

return $panes;
}

In my case, I used the $items variable to see what was in the shopping cart and suggest some other products the customer might want by inserting a view.

Hope that helps,
Xerxes

Posts: 534
Joined: 08/13/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer

Ok thank you, it perfectly work in the cart page.

Do you know the way to proceed in the checkout page, to add a text in the bottom of the payment pane ?

Posts: 60
Joined: 09/07/2007
Bug Finder

I haven't done that yet, but it looks similar:

http://www.ubercart.org/docs/api/hook_checkout_pane

I assume you would just have the callback function return the text you want displayed.

Posts: 534
Joined: 08/13/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer

Ok, I check already used this hook for some custom module. It create a new pane, but I would be able to alter an existing core pane.

Posts: 18
Joined: 12/27/2007

Where exactly does this code go? I tried putting it in uc_cart.module below where the original cart pane code is, and it just broke. Of course, I could have formatted it incorrectly.