Redirect after purchase order

  • Posts: 33
  • Thank you received: 0
9 years 6 months ago #200243

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.3.29
-- Browser(s) name and version -- : Chrome latest
-- Error-message(debug-mod must be tuned on) -- : none

The template has code to do a redirect after a purchase order is used, but the option seems to be missing in the UI.

purchaseorder_end.php:

if(!empty($this->payment_params->return_url)){
        $doc = JFactory::getDocument();
        $doc->addScriptDeclaration("do_nothing( function() {window.location='".$this->payment_params->return_url."'});");

So I added the variable in, but this is a really slow redirect. Something like this might work better:
if(!empty($this->payment_params->return_url)){
    header("Location: {$this->payment_params->return_url}");
}

Last edit: 9 years 6 months ago by Mohamed Thelji. Reason: Added the "code" tag

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

  • Posts: 12953
  • Thank you received: 1778
9 years 6 months ago #200280

Hello,
Note that you can also use that kind of PHP code :

$app = JFactory::getApplication();
$app->redirect('YourLink');

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

Time to create page: 0.068 seconds
Powered by Kunena Forum