Post by montanaflynn » Thu Dec 17, 2009 8:54 am

I just tried using testing with guest checkout and then manually updating the status from pending to shipped and I got an email that has a link but it redirects to the sign in page, how could a guest buyer see his invoice?

User avatar
New member

Posts

Joined
Fri Oct 09, 2009 5:19 am

Post by i2Paq » Thu Dec 17, 2009 11:27 pm

Not.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by christopherdarling » Mon Jan 04, 2010 10:12 pm

I don't think this is possible really, as the person has used the checkout without an account. I think the best way around this is perhaps for Opencart to implement two email templates, one for a Guest and one for a Member. Or, perhaps just have a standard email with no link, but attach a PDF copy of the invoice.

Christopher Darling - Web Design Bristol


New member

Posts

Joined
Sat Jan 02, 2010 12:26 am

Post by Qphoria » Tue Jan 05, 2010 12:10 am

its a simple fix.

1. EDIT: catalog/model/checkout/order.php

2. FIND:

Code: Select all

$message .= $language->get('mail_new_order_invoice') . "\n";
3. REPLACE WITH:

Code: Select all

if (!isset($this->session->data['guest'])) {
	$message .= $language->get('mail_new_order_invoice') . "\n";
}

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Seven » Wed Sep 22, 2010 11:55 am

What is the same fix for 1.4.9.1? I don't find that snippet there.

Newbie

Posts

Joined
Thu Sep 16, 2010 10:46 am

Post by Qphoria » Wed Sep 22, 2010 12:04 pm

there should be no need since 1.4.6

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Seven » Wed Sep 22, 2010 12:06 pm

I just this minute noticed that. The guest email I was looking at was when the order status changed. It still provides a link.

Newbie

Posts

Joined
Thu Sep 16, 2010 10:46 am

Post by Qphoria » Wed Sep 22, 2010 12:32 pm

ah ok.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Seven » Wed Sep 22, 2010 1:44 pm

If I preferred to not send an unusable link to an unregistered customer during order status changes, would it be better to change the verbiage in catalog/language/english/mail/order_update.php to something like "If you registered when you made your purchase, you can use the following link to view the details...blah, blah, blah" or change something in the update function in catalog/model/checkout/order.php to keep the link from showing up for unregistered customers, but still let them know of the status update?

Or, is there a solution already out there that I totally missed somehow?

Newbie

Posts

Joined
Thu Sep 16, 2010 10:46 am

Post by Seven » Thu Sep 23, 2010 2:05 am

My eyeballs hurt from looking at this. I'm no developer and don't really read php. I'm pretty sure the area I need to be looking at is in catalog/language/english/mail/order_update.php, but I'm not sure how to tell it to omit the text_invoice and store_url IF the order was from a guest checkout. Does the system even store that they were a guest after the initial order confirmation?

Thanks in advance for any help (especially you Obi-Wan Q-Nobi).

Newbie

Posts

Joined
Thu Sep 16, 2010 10:46 am

Post by Seven » Thu Sep 23, 2010 11:48 am

I finally found it. I just changed the verbiage a little in admin/language/english/mail/order.php.

Newbie

Posts

Joined
Thu Sep 16, 2010 10:46 am

Post by i2Paq » Fri Sep 24, 2010 2:09 am

Seven wrote:I finally found it. I just changed the verbiage a little in admin/language/english/mail/order.php.
What did you change?

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by Seven » Fri Sep 24, 2010 3:54 am

I just changed the verbiage a little bit. I know it may seem like such a small detail to even worry about, but if a small bit of text like this potentially fields calls or emails about a provided link not working then it's served it's purpose as far as I'm concerned.

Before:

Code: Select all

$_['text_invoice']      = 'To view your order click on the link below:';
After:

Code: Select all

$_['text_invoice']      = 'If you registered with us when you made your purchase, you may view your order by clicking on the link below:';

Newbie

Posts

Joined
Thu Sep 16, 2010 10:46 am

Post by fourgood » Thu Dec 15, 2011 5:21 pm

is there a more elegant way than just change the wording but still provide a not working link?

Active Member

Posts

Joined
Wed Oct 20, 2010 9:49 pm

Post by straightlight » Fri Dec 16, 2011 1:10 am

fourgood wrote:is there a more elegant way than just change the wording but still provide a not working link?
There might be a way of keeping the link if the order ID may be assigned to the customer's session array so that when the guest either registers an account or login into his account at the completion of checkout to re-gather the current order ID and to show the invoice based on this ID before the actual order ID gets unset when successful.

The only problem is when the customer would close the browser and clear all cookies and cache and would like to see the invoice from email, this obviously won't work since all sessionized data will be cleared as well.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by fourgood » Fri Dec 16, 2011 5:02 pm

and maybe something like input fields for guests where they can enter their order_id + their e-mail to see the invoice?

or the possibilitie to create an account afterwards and then see the orders that were made before with the same e-mail address?

Active Member

Posts

Joined
Wed Oct 20, 2010 9:49 pm

Post by straightlight » Fri Dec 16, 2011 10:20 pm

I already sent that suggestion yesterday here: http://forum.opencart.com/viewtopic.php?f=110&t=48597 ;)

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by faustgertz » Fri Feb 10, 2012 1:35 am

Hi,

Here is a vqmod I used that I believe takes care of this problem.

Code: Select all

<modification>
	<id>Prevent guests from receiving links to invoices upon order updates in admin interface</id>
	<version>1.0.0</version>
	<vqmver>1.0.2</vqmver>
	<author>Faust Gertz</author>
	<file name="admin/model/sale/order.php">
		<operation>
			<search position="before"><![CDATA[$message .= $language->get('text_invoice') . "\n";]]></search>
			<add><![CDATA[if ($order_query->row['customer_id']) {]]></add>
		</operation>
		<operation>
			<search position="after"><![CDATA[$message .= html_entity_decode($order_query->row['store_url'] . 'index.php?route=account/invoice&order_id=' . $order_id, ENT_QUOTES, 'UTF-8') . "\n\n";]]></search>
			<add><![CDATA[}]]></add>
		</operation>	
	</file>
</modification>
Hope this helps someone.

Newbie

Posts

Joined
Tue Apr 27, 2010 12:35 am

Post by straightlight » Fri Feb 10, 2012 7:21 am

Would it be possible to clarify this XML file regarding the <id> line and the subject of this topic ?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by straightlight » Thu Mar 08, 2012 12:33 am


Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 48 guests