[BUG] Payment of unpaid orders renders the page incorrectly
9 years 2 months ago #273012
by ghiamar
-- 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
-- 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
Code:
...
$this->vars = $vars;
return $this->showPage('end');
...
Please Log in or Create an account to join the conversation.
9 years 2 months ago #273037
by nicolas
Replied by nicolas on topic [BUG] Payment of unpaid orders renders the page incorrectly
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.
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 or Create an account to join the conversation.
9 years 2 months ago #273067
by ghiamar
Replied by ghiamar on topic [BUG] Payment of unpaid orders renders the page incorrectly
Done!
Please Log in or Create an account to join the conversation.
9 years 2 months ago #273090
by nicolas
Replied by nicolas on topic [BUG] Payment of unpaid orders renders the page incorrectly
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.
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 or Create an account to join the conversation.
9 years 2 months ago #273100
by ghiamar
Replied by ghiamar on topic [BUG] Payment of unpaid orders renders the page incorrectly
Done, it fixes the issue!
Code:
ob_start();
if(method_exists($paymentPlugin, 'onAfterOrderConfirm'))
$paymentPlugin->onAfterOrderConfirm($order, $paymentMethods, $order->order_payment_id);
$html = ob_get_clean();
Please Log in or Create an account to join the conversation.
9 years 2 months ago #273117
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic [BUG] Payment of unpaid orders renders the page incorrectly
Hello,
Thanks.
The patch will be added in the next release.
Regards,
Thanks.
The patch will be added in the next release.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
Time to create page: 0.196 seconds