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

#   \[BUG\] Payment of unpaid orders renders the page incorrectly

##

- **[ghiamar](/forum/user/30361-ghiamar "View ghiamar's Profile")**
- [![ghiamar's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar30361.png)](/forum/user/30361-ghiamar "View ghiamar's Profile") Topic Author
- [ Offline](/forum/user/30361-ghiamar)

Less More

- Posts: 14
- Thank you received: 2
-
-
-
- [](http://www.mgscreativa.com/en/online-store)
-

9 years 3 months ago [\#273012](#273012) by [ghiamar](/forum/user/30361-ghiamar "View ghiamar's Profile")  *[\[BUG\] Payment of unpaid orders renders the page incorrectly](/forum/31-development/890944-bug-payment-of-unpaid-orders-renders-the-page-incorrectly#273012 "-- HikaShop version -- : 3.1.1 -- Joomla version -- : 3.7.2 -- PHP version -- : 5.6.30  Hi! I'm the developer of several HS payment plugins, you can check them here   www.mgscreativa.com/en/online-store/more-products/hikashop  A customer recently contacted me for a strange page render issue in our Blockchian payment plugin. The issue arises when an user wants to pay an unpaid order.  The issue basically renders the payment plugin HTML code on top of the rest of the page HTML code, including the HTML and BODY tags!. Please see attachment  After a complete review of the plugin code, I can't see any mistakes, and after reviewing the code of the order controller I see that the code gets echoed from the result of onAfterOrderConfirm which in my case returns the result fo calling the 'end' plugin template")* was created by *[ghiamar](/forum/user/30361-ghiamar "View ghiamar's Profile")*

-- HikaShop version -- : 3.1.1
-- Joomla version -- : 3.7.2
-- PHP version -- : 5.6.30

Hi! I'm the developer of several HS payment plugins, you can check them here [ www.mgscreativa.com/en/online-store/more-products/hikashop](http://www.mgscreativa.com/en/online-store/more-products/hikashop)

A customer recently contacted me for a strange page render issue in our **Blockchian** payment plugin. The issue arises when an user wants to pay an unpaid order.

The issue basically renders the payment plugin HTML code on top of the rest of the page HTML code, including the HTML and BODY tags!. Please see attachment

After a complete review of the plugin code, I can't see any mistakes, and after reviewing the code of the order controller I see that the code gets echoed from the result of **onAfterOrderConfirm** which in my case returns the result fo calling the 'end' plugin template
Code:

... $this-&gt;vars = $vars; return $this-&gt;showPage('end'); ...

- [ ![My&#95;Orders&#95;-&#95;2017-06-29&#95;15.16.25.jpg](/forum/attachment/38991) ](/forum/attachment/38991 "...9&#95;15.16.25.jpg") [ ](/forum/attachment/38991?download=1 "...9&#95;15.16.25.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg5MDk0NC1idWctcGF5bWVudC1vZi11bnBhaWQtb3JkZXJzLXJlbmRlcnMtdGhlLXBhZ2UtaW5jb3JyZWN0bHk/dG1wbD1tYXJrZG93bg==) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

9 years 3 months ago [\#273037](#273037) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[\[BUG\] Payment of unpaid orders renders the page incorrectly](/forum/31-development/890944-bug-payment-of-unpaid-orders-renders-the-page-incorrectly#273037 "-- HikaShop version -- : 3.1.1 -- Joomla version -- : 3.7.2 -- PHP version -- : 5.6.30  Hi! I'm the developer of several HS payment plugins, you can check them here   www.mgscreativa.com/en/online-store/more-products/hikashop  A customer recently contacted me for a strange page render issue in our Blockchian payment plugin. The issue arises when an user wants to pay an unpaid order.  The issue basically renders the payment plugin HTML code on top of the rest of the page HTML code, including the HTML and BODY tags!. Please see attachment  After a complete review of the plugin code, I can't see any mistakes, and after reviewing the code of the order controller I see that the code gets echoed from the result of onAfterOrderConfirm which in my case returns the result fo calling the 'end' plugin template")*

Hi,

Would it be possible to have the entire code of the blockchain.php file of your plugin ?
Also, what is the URL of the page of your screenshot ?
You can send the file through contact AT hikashop DOT com if you don't want to send it here.

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

- **[ghiamar](/forum/user/30361-ghiamar "View ghiamar's Profile")**
- [![ghiamar's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar30361.png)](/forum/user/30361-ghiamar "View ghiamar's Profile") Topic Author
- [ Offline](/forum/user/30361-ghiamar)

Less More

- Posts: 14
- Thank you received: 2
-
-
-
- [](http://www.mgscreativa.com/en/online-store)
-

9 years 3 months ago [\#273067](#273067) by [ghiamar](/forum/user/30361-ghiamar "View ghiamar's Profile")  Replied by *[ghiamar](/forum/user/30361-ghiamar "View ghiamar's Profile")* on topic *[\[BUG\] Payment of unpaid orders renders the page incorrectly](/forum/31-development/890944-bug-payment-of-unpaid-orders-renders-the-page-incorrectly#273067 "-- HikaShop version -- : 3.1.1 -- Joomla version -- : 3.7.2 -- PHP version -- : 5.6.30  Hi! I'm the developer of several HS payment plugins, you can check them here   www.mgscreativa.com/en/online-store/more-products/hikashop  A customer recently contacted me for a strange page render issue in our Blockchian payment plugin. The issue arises when an user wants to pay an unpaid order.  The issue basically renders the payment plugin HTML code on top of the rest of the page HTML code, including the HTML and BODY tags!. Please see attachment  After a complete review of the plugin code, I can't see any mistakes, and after reviewing the code of the order controller I see that the code gets echoed from the result of onAfterOrderConfirm which in my case returns the result fo calling the 'end' plugin template")*

Done!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg5MDk0NC1idWctcGF5bWVudC1vZi11bnBhaWQtb3JkZXJzLXJlbmRlcnMtdGhlLXBhZ2UtaW5jb3JyZWN0bHk/dG1wbD1tYXJrZG93bg==) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

9 years 3 months ago [\#273090](#273090) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[\[BUG\] Payment of unpaid orders renders the page incorrectly](/forum/31-development/890944-bug-payment-of-unpaid-orders-renders-the-page-incorrectly#273090 "-- HikaShop version -- : 3.1.1 -- Joomla version -- : 3.7.2 -- PHP version -- : 5.6.30  Hi! I'm the developer of several HS payment plugins, you can check them here   www.mgscreativa.com/en/online-store/more-products/hikashop  A customer recently contacted me for a strange page render issue in our Blockchian payment plugin. The issue arises when an user wants to pay an unpaid order.  The issue basically renders the payment plugin HTML code on top of the rest of the page HTML code, including the HTML and BODY tags!. Please see attachment  After a complete review of the plugin code, I can't see any mistakes, and after reviewing the code of the order controller I see that the code gets echoed from the result of onAfterOrderConfirm which in my case returns the result fo calling the 'end' plugin template")*

Hi,

Ok, I think that we're missing the line:
ob_start();

before the line:
if(method_exists($paymentPlugin, 'onAfterOrderConfirm'))
in the file components/com_hikashop/controllers/order.php

Can you add the modification on your end and try again ?
It should work fine after that.
Then we can add the modification in HikaShop so that it will display properly for that plugin and other plugins displaying stuff at the end of the checkout.

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

- **[ghiamar](/forum/user/30361-ghiamar "View ghiamar's Profile")**
- [![ghiamar's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar30361.png)](/forum/user/30361-ghiamar "View ghiamar's Profile") Topic Author
- [ Offline](/forum/user/30361-ghiamar)

Less More

- Posts: 14
- Thank you received: 2
-
-
-
- [](http://www.mgscreativa.com/en/online-store)
-

9 years 3 months ago [\#273100](#273100) by [ghiamar](/forum/user/30361-ghiamar "View ghiamar's Profile")  Replied by *[ghiamar](/forum/user/30361-ghiamar "View ghiamar's Profile")* on topic *[\[BUG\] Payment of unpaid orders renders the page incorrectly](/forum/31-development/890944-bug-payment-of-unpaid-orders-renders-the-page-incorrectly#273100 "-- HikaShop version -- : 3.1.1 -- Joomla version -- : 3.7.2 -- PHP version -- : 5.6.30  Hi! I'm the developer of several HS payment plugins, you can check them here   www.mgscreativa.com/en/online-store/more-products/hikashop  A customer recently contacted me for a strange page render issue in our Blockchian payment plugin. The issue arises when an user wants to pay an unpaid order.  The issue basically renders the payment plugin HTML code on top of the rest of the page HTML code, including the HTML and BODY tags!. Please see attachment  After a complete review of the plugin code, I can't see any mistakes, and after reviewing the code of the order controller I see that the code gets echoed from the result of onAfterOrderConfirm which in my case returns the result fo calling the 'end' plugin template")*

Done, it fixes the issue! Code:

ob_start(); if(method_exists($paymentPlugin, 'onAfterOrderConfirm')) $paymentPlugin-&gt;onAfterOrderConfirm($order, $paymentMethods, $order-&gt;order_payment_id); $html = ob_get_clean();

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

9 years 3 months ago [\#273117](#273117) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[\[BUG\] Payment of unpaid orders renders the page incorrectly](/forum/31-development/890944-bug-payment-of-unpaid-orders-renders-the-page-incorrectly#273117 "-- HikaShop version -- : 3.1.1 -- Joomla version -- : 3.7.2 -- PHP version -- : 5.6.30  Hi! I'm the developer of several HS payment plugins, you can check them here   www.mgscreativa.com/en/online-store/more-products/hikashop  A customer recently contacted me for a strange page render issue in our Blockchian payment plugin. The issue arises when an user wants to pay an unpaid order.  The issue basically renders the payment plugin HTML code on top of the rest of the page HTML code, including the HTML and BODY tags!. Please see attachment  After a complete review of the plugin code, I can't see any mistakes, and after reviewing the code of the order controller I see that the code gets echoed from the result of onAfterOrderConfirm which in my case returns the result fo calling the 'end' plugin template")*

Hello,

Thanks.
The patch will be added in the next release.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg5MDk0NC1idWctcGF5bWVudC1vZi11bnBhaWQtb3JkZXJzLXJlbmRlcnMtdGhlLXBhZ2UtaW5jb3JyZWN0bHk/dG1wbD1tYXJrZG93bg==) 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.220 seconds

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

[](#top)
