View order online link when guest checkout

  • Posts: 13
  • Thank you received: 0
11 years 1 day ago #133717

Hi,

In my shop I have the option enabled to checkout as guest.

In the order creation notification email, there is a link to view the status of the order online. However, if the user checked out as guest (which usually means the person has no account on the website) the page redirects to the standard login form, and the person cannot see anything about the order.

I have two questions regarding this:
1) is it possible for someone that checked out as guest to see the order online?
2) if not, is there a way to hide that message from the email in case it concerns a guest checkout?

Shop: www.kvcv.be/index.php/webshop

Using Hikashop essential 2.2.2

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
11 years 1 day ago #133750

Hi,

1. That's not possible.

2. Yes, you can edit the email files under media/com_hikashop/mail and change the line:
if($config->get('simplified_registration',0)!=2) {
to:
if(!empty($customer->user_cms_id)) {

in the preload files of the emails.

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

  • Posts: 13
  • Thank you received: 0
11 years 20 hours ago #133772

Hi

I changed that in the file order_creation_notification.preload.php, but when I do a checkout as guest, the email to the customer is still showing the link.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 11 months ago #133863

Hi,

Maybe you're not looking at the correct email.
There are two emails that are sent by HikaShop to the user:
the order creation notification (at the end of the checkout) and the order status notification (once the payment is done).
So make sure that you do the modification to both.

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

  • Posts: 13
  • Thank you received: 0
10 years 11 months ago #133882

I made the change to the following three files:

/media/com_hikashop/mail/order_notification.preload.php
/media/com_hikashop/mail/order_creation_notification.preload.php
/media/com_hikashop/mail/order_status_notification.preload.php

When I do a checkout as guest, the email that follows immediately after placing the order is still showing the link.

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

  • Posts: 13201
  • Thank you received: 2322
10 years 11 months ago #134095

Thanks to try with:

if(!empty($customer->user_cms_id) && (int)$customer->user_cms_id != 0)

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

  • Posts: 13
  • Thank you received: 0
10 years 11 months ago #134152

Hi

Now I realize that we are probably looking at different things.

In the order number there is a link to see the order online, and I was able to disable that link for guest checkout using the code replacement you suggested.
At the very top of the message there is a sentence "If you can't read this message, click here to view your order online" (or similar, I translated from Dutch). This sentence also links to the order detail page, and thus redirects to the standard login page in case of guest checkout.

How can I completely hide this sentence in case of guest checkout?

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

  • Posts: 13201
  • Thank you received: 2322
10 years 11 months ago #134278

Hi,

Ok to remove this link, you can edit the files:

/media/com_hikashop/mail/order_notification.php
/media/com_hikashop/mail/order_creation_notification.php
/media/com_hikashop/mail/order_status_notification.php


And at the top of the files remove:
	<div class="hikashop_online" style="font-family:Arial, Helvetica,sans-serif;font-size:11px;line-height:18px;color:#6a5c6b;text-decoration:none;margin:10px;text-align:center;">
		<a style="cursor:pointer;color:#2d9cbb;text-decoration:none;border:none;" href="{VAR:URL}">
			<span class="hikashop_online" style="color:#6a5c6b;text-decoration:none;font-size:11px;margin-top:10px;margin-bottom:10px;text-align:center;">
				{TXT:MAIL_HEADER}
			</span>
		</a>
	</div>

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

Time to create page: 0.069 seconds
Powered by Kunena Forum