- Posts: 33
- Thank you received: 0
Redirect after purchase order
11 years 5 months ago - 11 years 5 months ago #200243
by saardvark
Redirect after purchase order was created 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:
So I added the variable in, but this is a really slow redirect. Something like this might work better:
-- 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.
Less
More
- Posts: 12953
- Thank you received: 1778
11 years 5 months ago #200280
by Mohamed Thelji
Replied by Mohamed Thelji on topic Redirect after purchase order
Hello,
Note that you can also use that kind of PHP code :
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