-- 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:
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.
<?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.
<?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
<?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