Post by carolina » Tue Nov 29, 2011 7:04 am

Hi, I'm running opencart 1.5.x, and finding that when I try to access an order page, for example:
If the user is not logged in, I get the error:

Notice: Undefined index: order_d in /www/catalog/controller/account/order.php on line 110Warning: Cannot modify header information - headers already sent by (output started at /www/index.php:104) [...etc...]

Any ideas why?

Newbie

Posts

Joined
Thu Nov 24, 2011 8:17 am

Post by carolina » Tue Nov 29, 2011 7:12 am

Sorry that was the wrong error. The error above is from one of my tests to fix it. Here's the real error:

Notice: Undefined variable: order_id in /www/catalog/controller/account/order.php on line 110Warning: Cannot modify header information - headers already sent by (output started at /www/index.php:104)

Newbie

Posts

Joined
Thu Nov 24, 2011 8:17 am

Post by carolina » Tue Nov 29, 2011 7:14 am

And what I did to fix it is change the following line (it's the second line) in the info() function of catalog/controller/account/order.php from this:

Code: Select all

$this->session->data['redirect'] = $this->url->link('account/order/info', 'order_id=' . $order_id, 'SSL');
to this:

Code: Select all

$this->session->data['redirect'] = $this->url->link('account/order/info', 'order_id=' . $this->request->get['order_id'], 'SSL');
Somebody may want to patch this problem (if it hasn't been done already, I don't really know).

Newbie

Posts

Joined
Thu Nov 24, 2011 8:17 am

Post by carolina » Tue Nov 29, 2011 7:20 am

And for those with vqmod installed, this modification XML file will fix the problem entirely. Enjoy. :)

Code: Select all

<modification>
	<id>Opencart core file modifications to fix a problem where if the customer is not logged in the receipt page totally breaks.</id>
	<version>1.5.1.1</version>
	<vqmver>1.2.3</vqmver>
	<author>Carolina</author>
	<file name="catalog/controller/account/order.php">
		<operation>
			<search position="replace"><![CDATA[$this->session->data['redirect'] = $this->url->link('account/order/info', 'order_id=' . $order_id, 'SSL');]]></search>
			<add><![CDATA[$this->session->data['redirect'] = $this->url->link('account/order/info', 'order_id=' . $this->request->get['order_id'], 'SSL'); // Changed by Carolina.]]></add>
		</operation>
	</file>
</modification>

Newbie

Posts

Joined
Thu Nov 24, 2011 8:17 am

Post by uksitebuilder » Tue Nov 29, 2011 6:31 pm

This has been fixed in new releases of OC.

Please search the bug forum for 'order_id' and you will find the topics/fixes for this

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by edavis » Thu Feb 16, 2012 4:24 am

I have the same in issue but I am logged in as a user. I am running 1.5.1.3.1. Any idea on how i can fix this? I also do not see the user in the backend under users..but i see the order and user under the order.

Thanks for your help

Newbie

Posts

Joined
Wed Feb 15, 2012 8:26 am
Who is online

Users browsing this forum: Amazon [Bot] and 28 guests