I hope this is the right place for this question. I've tried searching, posting in the forums, and group, but haven't gotten any responses! Not sure if it's how I'm asking or where.

When using the Paypal payment method with eCommerce 5.x-3.4 you have the option to redirect the user to a confirmation page after payment is complete. I've used this to redirect the user to a page that completes a sign up process once the transaction is complete, but found that when a user uses a coupon for the entire purchase I am unable to redirect them to my confirmation page to complete the sign up process. Is there a way for me to set this up using a hook(which I no very little about) or some other method? Any guidance would be much appreciated, hell I'd be happy if someone just said they didn't know but was at least reading :o)

Thanks,
Justin

Comments

Krythis’s picture

I added the drupal_goto to this code under checkout_review_form_submit() and seems to have done the trick. Not sure if there is a right way to do this w/o requesting the feature in a future release. If someone could explain to me how to use a hook that indicates the transaction is complete that would be ideal, until then I guess I'll have to go with this redirect and do my processing on that page.

    // If the transaction is done, tell them and send them home
    if ($txn->gross <= 0) {
      store_send_invoice_email($txn->txnid);
      drupal_set_message(t('Your order has been submitted.'));
      drupal_goto('confirmation');
      return '';
    }
mybinaryromance’s picture

Category: support » feature

this is quite an old issue, i see, and it is the only one to deal with a customized 'checkout-thankyou'-page in drupal e-commerce i could find. seems like people are not interested in such things...

however, i am. i have tried the idea above, but it doesn't work, after cart submission my users are taken to the front page despite any drupal_goto();
i also tried simply setting the return 'checkout-thankyou'; which according to forms api is supposed to redirect to the returned path. this doesn't work either.

so, before i return to some more hours of trying to let my customers get a thankyou-page, i turn this thread into a feature request.

PLEASE add a textfield to ecommerce configuration options where one can simply enter a drupal path for redirection after cart submission. i think ecommerce is the only store system i ever came across that does not have this important feature.

peace, bonzo