Page 1 of 1

Custom Thank You Page

Posted: 12 Oct 2018, 16:20
by clausy
Hi, anyway to customize the (info) / thank you page...
I need to include some info:
order number , date, total, and print/or view order.

thanks

Re: Custom Thank You Page

Posted: 12 Oct 2018, 18:20
by Jan
Hi, you can override the info page by your template:
components\com_phocacart\views\info\tmpl\default.php

Even the messages can be changed in language strings:

Code: Select all

;[USER SPECIFIC STRINGS IN INFO VIEW - SEE DOCUMENTATION]
COM_PHOCACART_ORDER_PROCESSED_ADDITIONAL_INFO=""
COM_PHOCACART_ORDER_PROCESSED_DOWNLOADABLE_ITEMS_ADDITIONAL_INFO=""
COM_PHOCACART_ORDER_PAYMENT_PROCESSED_ADDITIONAL_INFO=""
COM_PHOCACART_ORDER_PAYMENT_PROCESSED_DOWNLOADABLE_ITEMS_ADDITIONAL_INFO=""
COM_PHOCACART_ORDER_PAYMENT_CANCELED_ADDITIONAL_INFO=""
There there is no feature to add something as info there, so this needs to be customized directly in the code - get the information about the order and set it to the message which will be sent to the info view :idea:

Jan

Re: Custom Thank You Page

Posted: 13 Oct 2018, 21:48
by clausy
Thanks but which page need to be customized for getting the information about the order...
Thanks

Re: Custom Thank You Page

Posted: 15 Oct 2018, 12:16
by Jan
Hi, there are more possible ways:

directly in the controller:
components\com_phocacart\controllers\checkout.php (method order() - you can get the infos from model)
or in the payment plugin:
$message = $order->getMessageAfterOrder(); // event in plugin used in the controller checkout
...

Or see e.g.:
plugins\pcp\paypal_standard\paypal_standard.php
function PCPbeforeProceedToPayment(&$proceed, &$message) {

The message can be edited here, so then this message is set before going to payment gateway and returned back to the thank you page.
Jan

Re: Custom Thank You Page

Posted: 24 Nov 2019, 16:35
by simonctl
Hi there,
I am sorry, but I do not get it...
I tried to do so in the controller (checkout.php) as well as in the payment-plugin (CashOnDelivery). I understand how I can change the message that is displayed. But how can I include the infos like order number, date and total?
Has someone an example like $odernumber = *** ?
Thanks, Stefan

Re: Custom Thank You Page

Posted: 24 Nov 2019, 17:47
by Jan
Hi, you need to check the plugin event methods and test the parameters they are sent to them. If the parameters do not include such info you need, you just need to upload them from database completely from scratch :idea:

Jan

Re: Custom Thank You Page

Posted: 25 Nov 2019, 19:58
by simonctl
Perfect. I found the order-ID and everything else can just be found in the database. Thanks!!

Re: Custom Thank You Page

Posted: 02 Dec 2019, 18:23
by Jan
Ok, great to hear it.

Jan

Re: Custom Thank You Page

Posted: 29 May 2024, 11:03
by Webguy
In most shops I've been using there is an option to set the thank you page to an url of your choosing in the options.

I see this post is quite old, is there already any built in option that can be used or custom solution that won't be overwritten by an update.

Re: Custom Thank You Page

Posted: 29 May 2024, 16:33
by Jan
Hi, there is an info view, you can set own description there, even this can be changed by different methods like payment methods. And you can override this view with template override, so the changes will be not lost when updating. :idea:

Jan