Returning to the shop after payment

  • Posts: 106
  • Thank you received: 5
  • Hikaserial Standard Hikashop Business
10 years 2 weeks ago #202723

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.4.39

Is there a reason that customers are not sent directly to the after_end page after a successful credit card transaction (Authorize.Net SIM)? Instead they get to a rather sparse intermediary page and have to click on a link to get back to the shop. If there isn't a way around that, how about at least putting an auto redirect back to the shop into that sparse page?

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

  • Posts: 83933
  • Thank you received: 13588
  • MODERATOR
10 years 1 week ago #202730

Hi,

There is already an auto redirect back to the shop into that "sparse page":
take.ms/18OmZ
(it's the file plugins/hikashoppayment/authorize/authorize_thankyou.php)
That intermediate page is necessary as we can't send directly the content of your thank you page when authorize.net requests it (it would require doing a cURL to your thank you page to then send the content to authorize.net, but it would be a problem with the head of the page, etc). It is much better to simply send it that intermediary page which then automatically redirects to the normal return page.

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

  • Posts: 106
  • Thank you received: 5
  • Hikaserial Standard Hikashop Business
10 years 1 week ago #202997

An auto redirect should at least be added to that intermediary page. It would also be nice if it was a valid html page. There is no html, head or body tags to it. Just this:

<div class="hikashop_authorize_thankyou" id="hikashop_authorize_thankyou">
	<span id="hikashop_authorize_thankyou_message" class="hikashop_authorize_thankyou_message">
		Thank you for your purchase.<br/><a href="http://mysite.com/index.php?option=com_hikashop&ctrl=checkout&task=after_end&order_id=25483">You can go back to the shop by clicking on this link</a>	</span>
</div>

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

  • Posts: 83933
  • Thank you received: 13588
  • MODERATOR
10 years 1 week ago #203001

Hi,

Please reread my message. There is already an auto redirect on that intermediary page.

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

  • Posts: 106
  • Thank you received: 5
  • Hikaserial Standard Hikashop Business
10 years 1 week ago #203041

nicolas wrote: Please reread my message. There is already an auto redirect on that intermediary page.

I read it just fine. It doesn't seem like you understood mine. There is no auto redirect. The code that I posted is all that page has to it. You can get to that page and it will just sit there until you click on the link to return to the site.

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

  • Posts: 83933
  • Thank you received: 13588
  • MODERATOR
10 years 1 week ago #203044

Mmmm. That should not be the case. Normally, all the page header should be there, including the auto redirect.
I think it could come from the hikashop notification plugin that we added in the last release.
Could you try disabling it via the Joomla plugin manager ?

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

  • Posts: 106
  • Thank you received: 5
  • Hikaserial Standard Hikashop Business
10 years 1 week ago #203095

That's better, but it is still out of whack and no auto redirect.

<div class="hikashop_authorize_thankyou" id="hikashop_authorize_thankyou">
	<span id="hikashop_authorize_thankyou_message" class="hikashop_authorize_thankyou_message">
		Thank you for your purchase.<br/><a href="http://mysite.com/index.php?option=com_hikashop&ctrl=checkout&task=after_end&order_id=25484&Itemid=326">You can go back to the shop by clicking on this link</a>	</span>
</div>
	<!doctype html>
	<html xml:lang="en-gb" lang="en-gb" >
		<head>
						<meta name="viewport" content="width=device-width, initial-scale=1.0">
						  <base href="http://mysite.com/index.php" />
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <meta name="keywords" content="..." />
  <meta name="rights" content="..." />
  <meta name="description" content="...." />
  <meta name="generator" content="Joomla! - Open Source Content Management" />
  <title>Shop</title>
  <link href="http://mysite.com/index.php/shopping/checkout/notify/notif_payment-authorize/tmpl-component?lang=en" rel="canonical" />
  <link href="/templates/gantry/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />
  <link rel="stylesheet" href="/media/com_hikashop/css/frontend_default.css?t=1432765682" type="text/css" />
  <link rel="stylesheet" href="/templates/gantry/css-compiled/bootstrap.css" type="text/css" />
  <link rel="stylesheet" href="/templates/gantry/css-compiled/master-a31b55a8185ef76ab8f839ab5a9feaf3.css" type="text/css" />
  <link rel="stylesheet" href="/templates/gantry/css-compiled/mediaqueries.css" type="text/css" />
  <link rel="stylesheet" href="/templates/gantry/css/gantry-custom.css" type="text/css" />
  <style type="text/css">
#rt-logo {background: url(/images/header/gpsc_logo.png) 50% 0 no-repeat !important;}
#rt-logo {width: 192px;height: 73px;}

  </style>
  <script src="/media/com_hikashop/js/hikashop.js?v=240" type="text/javascript"></script>
  <script src="/media/system/js/mootools-core.js" type="text/javascript"></script>
  <script src="/media/system/js/core.js" type="text/javascript"></script>
  <script src="/media/jui/js/jquery.min.js" type="text/javascript"></script>
  <script src="/media/jui/js/jquery-noconflict.js" type="text/javascript"></script>
  <script src="/media/jui/js/jquery-migrate.min.js" type="text/javascript"></script>
  <script src="/media/jui/js/bootstrap.min.js" type="text/javascript"></script>
  <script src="/media/system/js/mootools-more.js" type="text/javascript"></script>
  <script src="/libraries/gantry/js/gantry-totop.js" type="text/javascript"></script>
  <script src="/libraries/gantry/js/browser-engines.js" type="text/javascript"></script>
  <script type="text/javascript">
window.hikashop.ready(function(){window.location='http://mysite.com/index.php?option=com_hikashop&ctrl=checkout&task=after_end&order_id=25484&Itemid=326'});
</script>
		</head>
		<body class="component-body">
			<div class="component-content">
		    	<div id="system-message-container">
	</div>

				
			</div>
		</body>
	</html>

Last edit: 10 years 1 week ago by gpraceman.

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

  • Posts: 13201
  • Thank you received: 2322
10 years 1 week ago #203111

Hi,

As a temporary solution, you could publish back the plugin and replace the content of the file "plugins/hikashoppayment/authorize/\authorize_thankyou.php" by:

<!doctype html>
	<html xml:lang="en-gb" lang="en-gb" >
		<head>
			<meta name="viewport" content="width=device-width, initial-scale=1.0">
			<base href="http://mysite.com/index.php" />
			<meta http-equiv="content-type" content="text/html; charset=utf-8" />
			<meta name="keywords" content="..." />
			<meta name="rights" content="..." />
			<meta name="description" content="...." />
			<meta name="generator" content="Joomla! - Open Source Content Management" />
			<title>Shop</title>
			<link href="http://mysite.com/index.php/shopping/checkout/notify/notif_payment-authorize/tmpl-component?lang=en" rel="canonical" />
			<link href="/templates/gantry/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />
			<link rel="stylesheet" href="/media/com_hikashop/css/frontend_default.css?t=1432765682" type="text/css" />
			<link rel="stylesheet" href="/templates/gantry/css-compiled/bootstrap.css" type="text/css" />
			<link rel="stylesheet" href="/templates/gantry/css-compiled/master-a31b55a8185ef76ab8f839ab5a9feaf3.css" type="text/css" />
			<link rel="stylesheet" href="/templates/gantry/css-compiled/mediaqueries.css" type="text/css" />
			<link rel="stylesheet" href="/templates/gantry/css/gantry-custom.css" type="text/css" />
			<style type="text/css">
				#rt-logo {background: url(/images/header/gpsc_logo.png) 50% 0 no-repeat !important;}
				#rt-logo {width: 192px;height: 73px;}
			</style>
			<script src="/media/com_hikashop/js/hikashop.js?v=240" type="text/javascript"></script>
			<script src="/media/system/js/mootools-core.js" type="text/javascript"></script>
			<script src="/media/system/js/core.js" type="text/javascript"></script>
			<script src="/media/jui/js/jquery.min.js" type="text/javascript"></script>
			<script src="/media/jui/js/jquery-noconflict.js" type="text/javascript"></script>
			<script src="/media/jui/js/jquery-migrate.min.js" type="text/javascript"></script>
			<script src="/media/jui/js/bootstrap.min.js" type="text/javascript"></script>
			<script src="/media/system/js/mootools-more.js" type="text/javascript"></script>
			<script src="/libraries/gantry/js/gantry-totop.js" type="text/javascript"></script>
			<script src="/libraries/gantry/js/browser-engines.js" type="text/javascript"></script>
			<script type="text/javascript">
				window.hikashop.ready(function(){window.location='<?php echo $this->payment_params->return_url; ?>'});
			</script>
		</head>
		<body class="component-body">
			<div class="component-content">
		    	<div id="system-message-container">
				</div>
				<div class="hikashop_authorize_thankyou" id="hikashop_authorize_thankyou">
					<span id="hikashop_authorize_thankyou_message" class="hikashop_authorize_thankyou_message">
						<?php echo JText::_('THANK_YOU_FOR_PURCHASE');
						if(!empty($this->payment_params->return_url)){
							echo '<br/><a href="'.$this->payment_params->return_url.'">'.JText::_('GO_BACK_TO_SHOP').'</a>';
						}?>
				</div>
			</div>
		</body>
	</html>

This way all the header will be present and correct, so the Javascript should owork properly and do the redirect.

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

  • Posts: 106
  • Thank you received: 5
  • Hikaserial Standard Hikashop Business
10 years 1 week ago #203250

I tried that but still no auto redirect.

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

  • Posts: 26251
  • Thank you received: 4040
  • MODERATOR
10 years 1 week ago #203281

Hi,

Are you sure that you do not have any javascript error in your page ?
Why does not use simply a "Joomla application redirect" ? Something like

<?php
$app = JFactory::getApplication();
$app->redirect( $this->payment_params->return_url );

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 106
  • Thank you received: 5
  • Hikaserial Standard Hikashop Business
10 years 1 week ago #203346

I'll wait until you guys publish a fix for this, as I have spent too much of my time on this issue already. Until then my customers will just have to click on the link to return to the site.

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

  • Posts: 83933
  • Thank you received: 13588
  • MODERATOR
10 years 1 week ago #203356

What Jerome is proposing is not possible.
It's authorize.net which is getting the HTML of the thank you page during the payment notification process and it doesn't accept 300 redirects. It has to be done as a javascript redirect.

I'm modified the code of the authorize_thankyou.php file to this:

<div class="hikashop_authorize_thankyou" id="hikashop_authorize_thankyou">
	<span id="hikashop_authorize_thankyou_message" class="hikashop_authorize_thankyou_message">
		<?php echo JText::_('THANK_YOU_FOR_PURCHASE');
		if(!empty($this->payment_params->return_url)){
			echo '<br/><a href="'.$this->payment_params->return_url.'">'.JText::_('GO_BACK_TO_SHOP').'</a>';
		}?>
	</span>
</div>
<?php if(!empty($this->payment_params->return_url)){ ?>
<!--[if IE]>
<script type="text/javascript">
	window.location='<?php echo $this->payment_params->return_url; ?>';
</script>
<![endif]-->
<?php } ?>
That should definitely work for you too, even with the payment notification plugin turned on.

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

Time to create page: 0.103 seconds
Powered by Kunena Forum