[BUG] Payment of unpaid orders renders the page incorrectly

  • Posts: 14
  • Thank you received: 2
  • Hikamarket Multivendor Hikashop Business
6 years 9 months ago #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

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

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
6 years 9 months ago #273037

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 or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 2
  • Hikamarket Multivendor Hikashop Business
6 years 9 months ago #273067

Done!

Please Log in or Create an account to join the conversation.

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
6 years 9 months ago #273090

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 or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 2
  • Hikamarket Multivendor Hikashop Business
6 years 9 months ago #273100

Done, it fixes the issue!

			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.

  • Posts: 26007
  • Thank you received: 4004
  • MODERATOR
6 years 9 months ago #273117

Hello,

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.064 seconds
Powered by Kunena Forum