- Posts: 12
- Thank you received: 1
Redirect After Payment Complete
10 years 6 months ago #240067
by KelsoUSMC
Redirect After Payment Complete was created by KelsoUSMC
-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.4.8
-- PHP version -- : 5.4.43
-- Error-message(debug-mod must be tuned on) -- : Call to a member function redirect() on a non-object
Open: /xxxx/xxxx/public_html/templates/g5_hydrogen/html/com_hikashop/checkout/end.php
* @license GNU/GPLv3 www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?>html)){
$app->redirect(' www.mywebsitename.com/registration-form ');
echo JText::_('THANK_YOU_FOR_PURCHASE');
}else{
echo $this->html;
}
$this->nextButton = false;
I was searching and now reference this post from a couple years ago.
Redirect After Payment
While following the instructions, like the OP, I didn't succeed in changing the after_end modification.
I then modified the 'end' file and now receive the error message:
1st: If i enter the url directly AND the user is logged in, the form/url displays correctly without error.
Here are my modifications that I tried:
after_end Did not redirect. Using g5_hydrogen template.
Then I changed the end file as noted on the referenced link. After making this modification is when I get an error message.
If I place the redirect in the if statement where the Thank You message is, I get this error:
end file g5_hydrogen template
Thank you,
Kelso
-- Joomla version -- : 3.4.8
-- PHP version -- : 5.4.43
-- Error-message(debug-mod must be tuned on) -- : Call to a member function redirect() on a non-object
Open: /xxxx/xxxx/public_html/templates/g5_hydrogen/html/com_hikashop/checkout/end.php
* @license GNU/GPLv3 www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?>html)){
$app->redirect(' www.mywebsitename.com/registration-form ');
echo JText::_('THANK_YOU_FOR_PURCHASE');
}else{
echo $this->html;
}
$this->nextButton = false;
I was searching and now reference this post from a couple years ago.
Redirect After Payment
While following the instructions, like the OP, I didn't succeed in changing the after_end modification.
I then modified the 'end' file and now receive the error message:
Call to a member function redirect() on a non-object
1st: If i enter the url directly AND the user is logged in, the form/url displays correctly without error.
Here are my modifications that I tried:
after_end Did not redirect. Using g5_hydrogen template.
Code:
<?php
/**
* @package HikaShop for Joomla!
* @version 2.6.3
* @author hikashop.com
* @copyright (C) 2010-2016 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?><?php
$app = JFactory::getApplication();
$app->redirect('http://www.gravitydancecenter.com/registration-form');
//$app->enqueueMessage( JText::_('THANK_YOU_FOR_PURCHASE') );
Then I changed the end file as noted on the referenced link. After making this modification is when I get an error message.
Code:
<?php
/**
* @package HikaShop for Joomla!
* @version 2.6.3
* @author hikashop.com
* @copyright (C) 2010-2016 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?><?php
if(empty($this->html)){
echo JText::_('THANK_YOU_FOR_PURCHASE');
}else{
echo $this->html;
}
$app->redirect('http://www.mywebsitename.com/registration-form');
$this->nextButton = false;
If I place the redirect in the if statement where the Thank You message is, I get this error:
Call to a member function redirect() on a non-object
end file g5_hydrogen template
Code:
<?php
/**
* @package HikaShop for Joomla!
* @version 2.6.3
* @author hikashop.com
* @copyright (C) 2010-2016 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?><?php
if(empty($this->html)){
$app->redirect('http://www.mywebsitename.com/registration-form');
echo JText::_('THANK_YOU_FOR_PURCHASE');
}else{
echo $this->html;
}
$this->nextButton = false;
Thank you,
Kelso
Please Log in or Create an account to join the conversation.
10 years 6 months ago #240103
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Redirect After Payment Complete
Hi,
If you delete the definition of the variable "$app" ; the error you got is logical.
The official "after_end" view content is :
Regards,
If you delete the definition of the variable "$app" ; the error you got is logical.
The official "after_end" view content is :
Code:
<?php
$app = JFactory::getApplication();
$app->enqueueMessage( JText::_('THANK_YOU_FOR_PURCHASE') );
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
10 years 6 months ago #240142
by KelsoUSMC
I see.... but, I didn't. I didn't delete the assignment . It is still there as you can see in my original message:
It's right there in the app_end (first section of code).
Regards,
Kelso
Replied by KelsoUSMC on topic Redirect After Payment Complete
Jerome wrote: If you delete the definition of the variable "$app" ; the error you got is logical.
The official "after_end" view content is :Code:<?php $app = JFactory::getApplication(); $app->enqueueMessage( JText::_('THANK_YOU_FOR_PURCHASE') );
I see.... but, I didn't. I didn't delete the assignment . It is still there as you can see in my original message:
It's right there in the app_end (first section of code).
Code:
$app = JFactory::getApplication();
Regards,
Kelso
Please Log in or Create an account to join the conversation.
10 years 6 months ago #240147
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Redirect After Payment Complete
Hi,
Please look at your PHP error message, what content you pasted for your different "versions" of the view and my message.
There is no more that assignations in your views ; otherwise you won't have the error message.
Regards,
Please look at your PHP error message, what content you pasted for your different "versions" of the view and my message.
There is no more that assignations in your views ; otherwise you won't have the error message.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
Time to create page: 0.048 seconds