Jump to content

Thank you page after payment (non digital orders)


Recommended Posts


I process all my payments of non digital products on the Worldpay platform not on Cubecart. If I remember well, once the payment has gone through, the customer is sent back to my website. I am therefore wondering whether there is a "Thank you" page somehwhere I could use. At the moment, I am pretty sure they are redirected to the homepage but I would like a dedicated Thank you page where I would ask them to add our email address to their white list as so many times, email softwares are isolating our address thinking we are spam and customers are getting annoyed that we do not communicate on the status of their order while in fact it is all in their spam folder....

Thanks for your help.


Link to comment
Share on other sites

When the order goes to Processing via a payment module, CubeCart should send the customer the _a=complete page.

The question I have is, does Worldpay force sending the customer back to the store, or is it just a link inviting the cistomer back to the store.

Regardless, by using that link, the order is moved to Processing and the customer's web browser is told to go to _a=complete. This will show a page that acts like a receipt. The data is gathered for this template in CubeCart->_complete().

This function has a hook we can use to add messages to the page. One can create a message to say what you suggested above.



Link to comment
Share on other sites

Thanks for the explanation. It has been years since I checked where the shopper is sent back once completion of the order to be honest.

I went into my Worldpay set up and I can see that I have a Payment Response URL which is linking back to my homepage. I also have a Shopper Redirect URL  which is empty.

I don't know if this info is helping you smither ?

As far as the hook is concerned, very sorry but I am lost now, I can do with css, html  and copy and paste php instructions but hooks, snippets & all this jargon, is now beyond me, sorry but if you have a great idea, please go ahead. Basically as long as  I have a page dedicated to after the payment completed where I can add whatever text that would be fantastic.

Link to comment
Share on other sites

For the Payment Response URL, what would that be?

The URL that is given to WorldPay is: $GLOBALS['storeURL'].'/modules/gateway/WorldPay/return.php, which may be what is used for the Shopper Redirect URL.

In admin, Manage Hooks, Code Snippets tab, click Add Snippet. Fill in the form with:

Enabled: checked
Unique ID: post_sale_thanks@CC600+
Execution Order: 1
Description: Preloads a message thanking customer for shopping with us.
Trigger: class.cubecart.order_summary
Version: 1.0
Author: https://forums.cubecart.com/topic/53717-thank-you-page-after-payment-non-digital-orders/
  $GLOBALS['gui']->setNotify("Thank you for shopping with us. The results of your transaction follows. Please whitelist us so as not to miss further emails from us.");


Now, when CubeCart creates the Order Completed page (_a=complete), this message appears in a notification bar, along with the results of the transaction, above the order details.

Edited by bsmither
Link to comment
Share on other sites


This morning before implementing your suggestion I decided to do 2 live test purchases on tiny amounts. As soon as my purchase was accepted on the Worldpay platform, I was automatically transferred back to Cubecart processing status page with a detailed invoice of my purchase. At the top was a green row with the text from the languages admin section for " order_processing " under Confirm-Phrases used after payment.  So basically I just amended the text at this point and that was it. Did another test purchase and all looking fine.

This is definitely very different to my old Cubecart V4 and I should have redone that test before posting that request.

Apologies for wasting your time & much grateful for your assistance again.


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...