Skip to main content

Redirect after purchase order

More
11 years 5 months ago - 11 years 5 months ago #200243 by saardvark
-- 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:
Code:
if(!empty($this->payment_params->return_url)){ $doc = JFactory::getDocument(); $doc->addScriptDeclaration("window.addEvent('domready', 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:
Code:
if(!empty($this->payment_params->return_url)){ header("Location: {$this->payment_params->return_url}"); }
Last edit: 11 years 5 months ago by Mohamed Thelji. Reason: Added the "code" tag

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

More
11 years 5 months ago #200280 by Mohamed Thelji
Hello,
Note that you can also use that kind of PHP code :
Code:
$app = JFactory::getApplication(); $app->redirect('YourLink');

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

Time to create page: 0.189 seconds
Powered by Kunena Forum