Custom Thank You Page

Phoca Cart - complex e-commerce extension
clausy
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 13 Aug 2017, 03:56

Custom Thank You Page

Post by clausy » 12 Oct 2018, 16:20

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


User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 40534
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Custom Thank You Page

Post by Jan » 12 Oct 2018, 18:20

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
If you find Phoca extensions useful, please support the project

clausy
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 13 Aug 2017, 03:56

Re: Custom Thank You Page

Post by clausy » 13 Oct 2018, 21:48

Thanks but which page need to be customized for getting the information about the order...
Thanks

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 40534
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Custom Thank You Page

Post by Jan » 15 Oct 2018, 12:16

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
If you find Phoca extensions useful, please support the project

Post Reply