5 replies [Last post]
zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1192
Was this information Helpful?

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...

xerbutter's picture
Offline
Bug Finder
Joined: 09/07/2007
Juice: 146
use a pane

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

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1192
Re: use a pane

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 ?

xerbutter's picture
Offline
Bug Finder
Joined: 09/07/2007
Juice: 146
Re: Re: use a pane

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.

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1192
Re: Re: Re: use a pane

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.

popscythe's picture
Offline
Joined: 12/27/2007
Juice: 38
Re: Add text to the bottom of the cart page

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.