11 replies [Last post]
opa001's picture
Offline
Joined: 12/07/2007
Juice: 55
Was this information Helpful?

How can I add a page between the order review and order complete page on checkout?And how can I do this without hacking the cart.module?

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1192
Re: Page between order review and order complete

By themint the theme_uc_cart_checkout_review function, you should be able to add a link to the page you want to put between checkout and order complete page. The problem is that I'm not sure you will have no conflict with the payment gateway etc...

opa001's picture
Offline
Joined: 12/07/2007
Juice: 55
Re: Page between order review and order complete

Ok understand because I was also for looking something like that. But then you must hack the cart.module and that's something that I don't want to.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Page between order review and order complete

Hmm... well, without hacking any module you can add a submit handler to the checkout form using hook_form_alter() and return from that function the page you want the form to go to. The current order in progress is stored in the variable $_SESSION['cart_order'] and can be used to load up whatever info you need. Now, it's my hunch that you should be able to submit a form from that page to the order review page and the access variable (I think it's $_SESSION['do_review']) will still be set... but I make no promises on that. Eye-wink

opa001's picture
Offline
Joined: 12/07/2007
Juice: 55
Re: Page between order review and order complete

Ok thanks, but when I add a function hook_alter_form() then I get the following error: Cannot redeclare uc_cart_form_alter() (previously declared in uc_cart.module:417)

How can I override this function?

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Page between order review and order complete

You should do it in a custom module for your site. You shouldn't add/alter any code in the core modules, otherwise it may get lost when you update your Ubercart version.

(I decided to add an FAQ about this.)

opa001's picture
Offline
Joined: 12/07/2007
Juice: 55
Re: Page between order review and order complete

Ok thank you, I will give it a new try.

opa001's picture
Offline
Joined: 12/07/2007
Juice: 55
Re: Page between order review and order complete

I have given it a try, but I had already made a custom module where I put the following function in: function uc_cart_form_alter() in uc_ideal.module. Then when I go to my shoppingcart I get the following error:

Fatal error: Cannot redeclare uc_cart_form_alter() (previously declared in D:\xampplite\htdocs\koi3\modules\ubercart\payment\uc_ideal\uc_ideal.module:160) in D:\xampplite\htdocs\koi3\modules\ubercart\uc_cart\uc_cart.module on line 431

The function uc_cart_form_alter() is already defined in the core cart module.

What can I do now? I hope you help me, because I want to make a module which makes it possible to pay dutch transactions by IDEAL.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Page between order review and order complete

Rename that function to uc_ideal_form_alter().

opa001's picture
Offline
Joined: 12/07/2007
Juice: 55
I got stuck

Hello everybody,

I don't know what to do! I want a page between the order review and order complete pages by a new module called uc_ideal. This page has a form to pay the order by the dutchpayment system Ideal.

I added the module as an attachment. Can someone help me to get a page between those two pages?

Thanks a lot

AttachmentSize
uc_ideal.zip 2.98 KB
opa001's picture
Offline
Joined: 12/07/2007
Juice: 55
Re: Re: Page between order review and order complete

anybody?

qrios's picture
Offline
Cool profile pic award.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 554
iDEAL

Dono what you want exactly, try latest version of iDEAL module:
http://drupal.org/project/uc_ideal_pro

Kees

Ubercart iDEAL Webshop