Webcandy- after three tests this morning, I can say that we are close, but not there yet.
Test 1
<?php
/**
* @package HikaShop for Joomla!
* @version 2.3.4
* @author hikashop.com
* @copyright (C) 2010-2014 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->enqueueMessage( JText::_('THANK_YOU_FOR_PURCHASE') );
/*
Added custom code below to force a user logout when a purchase is complete.
Find problem solving here:
http://www.hikashop.com/forum/customers/873174-force-a-logout-out-at-end-of-a-purchase.html
*/
$app = JFactory::getApplication();
$app->logout();
/*
sleep(8);
header( "Location: http://www.domain.com/" );
exit;*/
Result: End up back with phantom cart, still logged in. I tried commenting out your code in hopes that the other issue I was having was the cause of that problem. Turns out it was not.
Test 2<?php
/**
* @package HikaShop for Joomla!
* @version 2.3.4
* @author hikashop.com
* @copyright (C) 2010-2014 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->enqueueMessage( JText::_('THANK_YOU_FOR_PURCHASE') );
/*
Added custom code below to force a user logout when a purchase is complete.
Find problem solving here:
http://www.hikashop.com/forum/customers/873174-force-a-logout-out-at-end-of-a-purchase.html
*/
$app = JFactory::getApplication();
$app->logout();
sleep(8);
header( "Location: http://www.domain.com/" );
exit;
Result: I never see the "Thank you for purchase" message. It looks to "process" with a blank page after the purchase, then it loads on to the home page with no message, logged out.
Nicolas, I really appreciate all the help webcandy and you are giving me, but I am starting to feel like this is something the software should do. At least, based on your first repose to this and the following suggestions related to settings in Joomla and Hikashop. All of which I have already had set to your recommendations. I am literally at a standstill and cannot test the clients real bank money transfers. I can type fake credit card numbers in all day, but this is a serious problem now.
I am happy to admit if I made a mistake, and I think I have shown that. Please help in any way you have the time to.