[Skip to main content](#vessel-content)

#   Custom HTML on PayPal Thank You Page

##

- **[mojooutdoors-holden](/forum/user/12526-mojooutdoors-holden "View mojooutdoors-holden's Profile")**
- [![mojooutdoors-holden's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12526-mojooutdoors-holden "View mojooutdoors-holden's Profile") Topic Author
- [ Offline](/forum/user/12526-mojooutdoors-holden)

Less More

- Posts: 303
- Thank you received: 18
-
-

8 years 2 months ago [\#298503](#298503) by [mojooutdoors-holden](/forum/user/12526-mojooutdoors-holden "View mojooutdoors-holden's Profile")  *[Custom HTML on PayPal Thank You Page](/forum/29-payment-methods/895830-custom-html-on-paypal-thank-you-page#298503 "-- HikaShop version -- : 3.5.0 -- Joomla version -- : 3.8.12 -- PHP version -- : 7.1  How would I add custom html to the PayPal thank you page (i.e., &quot;/checkout/after&#95;end.php&quot;)? I've looked in the plugin and see where this can be changed, but my website is defaulting to displaying the info as a system message.  A few of the other payment plugins have their own dedicated thank you message that you can change inside the plugin files (.e.g, First Data). Ideally, I would like to do this without another redirect to a custom thank you page.")* was created by *[mojooutdoors-holden](/forum/user/12526-mojooutdoors-holden "View mojooutdoors-holden's Profile")*

-- HikaShop version -- : 3.5.0
-- Joomla version -- : 3.8.12
-- PHP version -- : 7.1

How would I add custom html to the PayPal thank you page (i.e., "/checkout/after_end.php")? I've looked in the plugin and see where this can be changed, but my website is defaulting to displaying the info as a system message.
Code:

$app = JFactory::getApplication(); $app-&gt;enqueueMessage( JText::_('THANK_YOU_FOR_PURCHASE') ); if(!empty($this-&gt;url)) $app-&gt;enqueueMessage(JText::sprintf('YOU_CAN_NOW_ACCESS_YOUR_ORDER_HERE',$this-&gt;url));

A few of the other payment plugins have their own dedicated thank you message that you can change inside the plugin files (.e.g, First Data). Ideally, I would like to do this without another redirect to a custom thank you page.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84OTU4MzAtY3VzdG9tLWh0bWwtb24tcGF5cGFsLXRoYW5rLXlvdS1wYWdlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86592
- Thank you received: 14334
-
-

8 years 2 months ago [\#298512](#298512) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom HTML on PayPal Thank You Page](/forum/29-payment-methods/895830-custom-html-on-paypal-thank-you-page#298512 "-- HikaShop version -- : 3.5.0 -- Joomla version -- : 3.8.12 -- PHP version -- : 7.1  How would I add custom html to the PayPal thank you page (i.e., &quot;/checkout/after&#95;end.php&quot;)? I've looked in the plugin and see where this can be changed, but my website is defaulting to displaying the info as a system message.  A few of the other payment plugins have their own dedicated thank you message that you can change inside the plugin files (.e.g, First Data). Ideally, I would like to do this without another redirect to a custom thank you page.")*

Hi,

PayPal also has its own end file: plugins/hikashoppayment/paypal/paypal_end.php
So you can add your HTML there.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84OTU4MzAtY3VzdG9tLWh0bWwtb24tcGF5cGFsLXRoYW5rLXlvdS1wYWdlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[mojooutdoors-holden](/forum/user/12526-mojooutdoors-holden "View mojooutdoors-holden's Profile")**
- [![mojooutdoors-holden's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12526-mojooutdoors-holden "View mojooutdoors-holden's Profile") Topic Author
- [ Offline](/forum/user/12526-mojooutdoors-holden)

Less More

- Posts: 303
- Thank you received: 18
-
-

8 years 2 months ago [\#298550](#298550) by [mojooutdoors-holden](/forum/user/12526-mojooutdoors-holden "View mojooutdoors-holden's Profile")  Replied by *[mojooutdoors-holden](/forum/user/12526-mojooutdoors-holden "View mojooutdoors-holden's Profile")* on topic *[Custom HTML on PayPal Thank You Page](/forum/29-payment-methods/895830-custom-html-on-paypal-thank-you-page#298550 "-- HikaShop version -- : 3.5.0 -- Joomla version -- : 3.8.12 -- PHP version -- : 7.1  How would I add custom html to the PayPal thank you page (i.e., &quot;/checkout/after&#95;end.php&quot;)? I've looked in the plugin and see where this can be changed, but my website is defaulting to displaying the info as a system message.  A few of the other payment plugins have their own dedicated thank you message that you can change inside the plugin files (.e.g, First Data). Ideally, I would like to do this without another redirect to a custom thank you page.")*

I found that file and figured it would need to go in there. However, I'm not sure where it needs to be added? I couldn't determine which block corresponds to the "thank you" message that is currently displaying at the end of checkout?
Code:

&lt;?php /** * @package HikaShop for Joomla! * @version 3.5.0 * @author hikashop.com * @copyright (C) 2010-2018 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?&gt;&lt;div class="hikashop_paypal_end" id="hikashop_paypal_end"&gt; &lt;span id="hikashop_paypal_end_message" class="hikashop_paypal_end_message"&gt; &lt;?php echo JText::sprintf('PLEASE_WAIT_BEFORE_REDIRECTION_TO_X', $this-&gt;payment_name).'&lt;br/&gt;&lt;span id="hikashop_paypal_button_message"&gt;'. JText::_('CLICK_ON_BUTTON_IF_NOT_REDIRECTED').'&lt;/span&gt;';?&gt; &lt;/span&gt; &lt;span id="hikashop_paypal_end_spinner" class="hikashop_paypal_end_spinner hikashop_checkout_end_spinner"&gt; &lt;/span&gt; &lt;br/&gt; &lt;form id="hikashop_paypal_form" name="hikashop_paypal_form" action="&lt;?php echo $this-&gt;payment_params-&gt;url;?&gt;" method="post"&gt; &lt;div id="hikashop_paypal_end_image" class="hikashop_paypal_end_image"&gt; &lt;input id="hikashop_paypal_button" type="submit" class="btn btn-primary" value="&lt;?php echo JText::_('PAY_NOW');?&gt;" name="" alt="&lt;?php echo JText::_('PAY_NOW');?&gt;" onclick="document.getElementById('hikashop_paypal_form').submit(); return false;"/&gt; &lt;/div&gt; &lt;?php foreach($this-&gt;vars as $name =&gt; $value ) { echo '&lt;input type="hidden" name="'.$name.'" value="'.htmlspecialchars((string)$value).'" /&gt;'; } hikaInput::get()-&gt;set('noform',1); ?&gt; &lt;/form&gt; &lt;script type="text/javascript"&gt; &lt;!-- function isIframe(){ try{ return window.self !== window.top; }catch(e){ return false; } } if(isIframe()){ document.getElementById('hikashop_paypal_form').target = '_blank'; } document.getElementById('hikashop_paypal_form').submit(); //--&gt; &lt;/script&gt; &lt;!--[if IE]&gt; &lt;script type="text/javascript"&gt; document.getElementById('hikashop_paypal_button').style.display = 'none'; document.getElementById('hikashop_paypal_button_message').innerHTML = ''; &lt;/script&gt; &lt;![endif]--&gt; &lt;/div&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84OTU4MzAtY3VzdG9tLWh0bWwtb24tcGF5cGFsLXRoYW5rLXlvdS1wYWdlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86592
- Thank you received: 14334
-
-

8 years 2 months ago [\#298557](#298557) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom HTML on PayPal Thank You Page](/forum/29-payment-methods/895830-custom-html-on-paypal-thank-you-page#298557 "-- HikaShop version -- : 3.5.0 -- Joomla version -- : 3.8.12 -- PHP version -- : 7.1  How would I add custom html to the PayPal thank you page (i.e., &quot;/checkout/after&#95;end.php&quot;)? I've looked in the plugin and see where this can be changed, but my website is defaulting to displaying the info as a system message.  A few of the other payment plugins have their own dedicated thank you message that you can change inside the plugin files (.e.g, First Data). Ideally, I would like to do this without another redirect to a custom thank you page.")*

Hi,

Sorry, I read your message too rapidly.
The paypal_end.php file is for the end of the chekout where the customer is redirected to PayPal, not for the page after the payment.
For the page after the payment, it's indeed the after_end view file.
There, you can enter your HTML before the &lt;?php tag. Note that it will appear for all the payment plugins that redirect back the customer to the website and for which you didn't specify a return URL.
If you want to display things only for some payment methods, you can use some PHP check on $this-&gt;order-&gt;order_payment_method

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84OTU4MzAtY3VzdG9tLWh0bWwtb24tcGF5cGFsLXRoYW5rLXlvdS1wYWdlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[mojooutdoors-holden](/forum/user/12526-mojooutdoors-holden "View mojooutdoors-holden's Profile")**
- [![mojooutdoors-holden's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12526-mojooutdoors-holden "View mojooutdoors-holden's Profile") Topic Author
- [ Offline](/forum/user/12526-mojooutdoors-holden)

Less More

- Posts: 303
- Thank you received: 18
-
-

8 years 2 months ago [\#298599](#298599) by [mojooutdoors-holden](/forum/user/12526-mojooutdoors-holden "View mojooutdoors-holden's Profile")  Replied by *[mojooutdoors-holden](/forum/user/12526-mojooutdoors-holden "View mojooutdoors-holden's Profile")* on topic *[Custom HTML on PayPal Thank You Page](/forum/29-payment-methods/895830-custom-html-on-paypal-thank-you-page#298599 "-- HikaShop version -- : 3.5.0 -- Joomla version -- : 3.8.12 -- PHP version -- : 7.1  How would I add custom html to the PayPal thank you page (i.e., &quot;/checkout/after&#95;end.php&quot;)? I've looked in the plugin and see where this can be changed, but my website is defaulting to displaying the info as a system message.  A few of the other payment plugins have their own dedicated thank you message that you can change inside the plugin files (.e.g, First Data). Ideally, I would like to do this without another redirect to a custom thank you page.")*

So would this addition override the system message that is displaying? Currently, I have:
Code:

&lt;?php /** * @package HikaShop for Joomla! * @version 3.5.0 * @author hikashop.com * @copyright (C) 2010-2018 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?&gt;&lt;?php $app = JFactory::getApplication(); $app-&gt;enqueueMessage( JText::_('THANK_YOU_FOR_PURCHASE') ); if(!empty($this-&gt;url)) $app-&gt;enqueueMessage(JText::sprintf('YOU_CAN_NOW_ACCESS_YOUR_ORDER_HERE',$this-&gt;url));

My guess is to replace this part:
Code:

$app = JFactory::getApplication(); $app-&gt;enqueueMessage( JText::_('THANK_YOU_FOR_PURCHASE') ); if(!empty($this-&gt;url)) $app-&gt;enqueueMessage(JText::sprintf('YOU_CAN_NOW_ACCESS_YOUR_ORDER_HERE',$this-&gt;url));

with my custom code?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84OTU4MzAtY3VzdG9tLWh0bWwtb24tcGF5cGFsLXRoYW5rLXlvdS1wYWdlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86592
- Thank you received: 14334
-
-

8 years 2 months ago [\#298605](#298605) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom HTML on PayPal Thank You Page](/forum/29-payment-methods/895830-custom-html-on-paypal-thank-you-page#298605 "-- HikaShop version -- : 3.5.0 -- Joomla version -- : 3.8.12 -- PHP version -- : 7.1  How would I add custom html to the PayPal thank you page (i.e., &quot;/checkout/after&#95;end.php&quot;)? I've looked in the plugin and see where this can be changed, but my website is defaulting to displaying the info as a system message.  A few of the other payment plugins have their own dedicated thank you message that you can change inside the plugin files (.e.g, First Data). Ideally, I would like to do this without another redirect to a custom thank you page.")*

Hi,

If you don't want these default texts to be displayed anymore, then yes, you can remove that code and add your code instead.

The following user(s) said Thank You: [mojooutdoors-holden](/forum/user/12526-mojooutdoors-holden "View mojooutdoors-holden's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84OTU4MzAtY3VzdG9tLWh0bWwtb24tcGF5cGFsLXRoYW5rLXlvdS1wYWdlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[mojooutdoors-holden](/forum/user/12526-mojooutdoors-holden "View mojooutdoors-holden's Profile")**
- [![mojooutdoors-holden's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12526-mojooutdoors-holden "View mojooutdoors-holden's Profile") Topic Author
- [ Offline](/forum/user/12526-mojooutdoors-holden)

Less More

- Posts: 303
- Thank you received: 18
-
-

8 years 1 month ago [\#299373](#299373) by [mojooutdoors-holden](/forum/user/12526-mojooutdoors-holden "View mojooutdoors-holden's Profile")  Replied by *[mojooutdoors-holden](/forum/user/12526-mojooutdoors-holden "View mojooutdoors-holden's Profile")* on topic *[Custom HTML on PayPal Thank You Page](/forum/29-payment-methods/895830-custom-html-on-paypal-thank-you-page#299373 "-- HikaShop version -- : 3.5.0 -- Joomla version -- : 3.8.12 -- PHP version -- : 7.1  How would I add custom html to the PayPal thank you page (i.e., &quot;/checkout/after&#95;end.php&quot;)? I've looked in the plugin and see where this can be changed, but my website is defaulting to displaying the info as a system message.  A few of the other payment plugins have their own dedicated thank you message that you can change inside the plugin files (.e.g, First Data). Ideally, I would like to do this without another redirect to a custom thank you page.")*

Thanks Nicolas!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84OTU4MzAtY3VzdG9tLWh0bWwtb24tcGF5cGFsLXRoYW5rLXlvdS1wYWdlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.064 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
