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
Custom Thank You Page
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Custom Thank You Page
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:
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
Jan
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=""
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 20
- Joined: 13 Aug 2017, 03:56
Re: Custom Thank You Page
Thanks but which page need to be customized for getting the information about the order...
Thanks
Thanks
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Custom Thank You Page
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
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
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 2
- Joined: 24 Nov 2019, 15:12
Re: Custom Thank You Page
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
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
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Custom Thank You Page
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
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 2
- Joined: 24 Nov 2019, 15:12
Re: Custom Thank You Page
Perfect. I found the order-ID and everything else can just be found in the database. Thanks!!
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Custom Thank You Page
Ok, great to hear it.
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Enthusiast
- Posts: 68
- Joined: 16 May 2024, 15:59
Re: Custom Thank You Page
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.
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.
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Custom Thank You Page
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.
Jan
Jan
If you find Phoca extensions useful, please support the project