2012-09-26 18:51:49 - PHP Notice: Undefined index: last_order_id in ****/httpdocs/catalog/controller/checkout/success.php on line 68
This's the line:
$this->data['text_message'] = sprintf($this->language->get('text_guest'), $this->session->data['last_order_id'], $this->url->link('information/contact'));
Also my customers get SSL errors while virtual pos payment after checkout. What can be the problem?
Hi there,naz_eg wrote:Hi guys, i have many errors related success.php in logs:
2012-09-26 18:51:49 - PHP Notice: Undefined index: last_order_id in ****/httpdocs/catalog/controller/checkout/success.php on line 68
This's the line:
$this->data['text_message'] = sprintf($this->language->get('text_guest'), $this->session->data['last_order_id'], $this->url->link('information/contact'));
Also my customers get SSL errors while virtual pos payment after checkout. What can be the problem?
You said that you get many errors, is that the only error in that file?
Could you go back to that line in the success.php file and underneath that add:
Code: Select all
print_r($this->session->data);
die();
***UPDATE***
Could you also go to the catalog/controller/confirm.php file and double check this line exists:
Code: Select all
$this->session->data['order_id'] = $this->model_checkout_order->addOrder($data);
Peter
For OpenCart & PHP/MySQL support feel free to PM me
Click here for my extentions
Did I help you? Donate here to show support
Hipedro1993 wrote: Hi there,
You said that you get many errors, is that the only error in that file?
Could you go back to that line in the success.php file and underneath that add:When you make an order a line of data will appear instead of the success.php page. Can you post that line here. Be sure to remove it afterwards so people can order again.Code: Select all
print_r($this->session->data); die();
***UPDATE***
Could you also go to the catalog/controller/confirm.php file and double check this line exists:ThanksCode: Select all
$this->session->data['order_id'] = $this->model_checkout_order->addOrder($data);
Peter
Line below exists at least in my case (/controller/checkout/confirm.php):
Code: Select all
$this->session->data['order_id'] = $this->model_checkout_order->addOrder($data);
Br
Sysiz
For OpenCart & PHP/MySQL support feel free to PM me
Click here for my extentions
Did I help you? Donate here to show support
Same issue seems to be posted to comments of the extension, but no reply from author.
There seems to be something about this on this thread: http://forum.opencart.com/viewtopic.php ... hp#p359127
WIP Design Publicidade e Marketing Digital
Ed_Rolla wrote:Having the same problem over here...
Are you also using this module?:
http://www.opencart.com/index.php?route ... ion_id=726
There seems to be something about this on this thread: http://forum.opencart.com/viewtopic.php ... hp#p359127
For OpenCart & PHP/MySQL support feel free to PM me
Click here for my extentions
Did I help you? Donate here to show support
Open
/catalog/controller/checkout/success.php
Find this:
Code: Select all
if ( isset($this->session->data['order_id']) && ( ! empty($this->session->data['order_id'])) ) {
$this->session->data['last_order_id'] = $this->session->data['order_id'];
}
Code: Select all
else{
$this->session->data['last_order_id'] = $this->session->data['order_id'];
}
Good luck.
codex73 wrote:The problem lies because the variable "$this->session->data['last_order_id']" is not been set because it didn't matched the condition for some reason. I'm not going to go into why it didn't but instead give you the solution. This is used to generate the success message where it displays the order number for the client upon checkout.
Open
/catalog/controller/checkout/success.php
Find this:Add this right after:Code: Select all
if ( isset($this->session->data['order_id']) && ( ! empty($this->session->data['order_id'])) ) { $this->session->data['last_order_id'] = $this->session->data['order_id']; }
Save the file and upload to your server.Code: Select all
else{ $this->session->data['last_order_id'] = $this->session->data['order_id']; }
Good luck.
Can someone confirm that this works?
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.
Can someone confirm that this works?i2Paq wrote:codex73 wrote:The problem lies because the variable "$this->session->data['last_order_id']" is not been set because it didn't matched the condition for some reason. I'm not going to go into why it didn't but instead give you the solution. This is used to generate the success message where it displays the order number for the client upon checkout.
Open
/catalog/controller/checkout/success.php
Find this:Add this right after:Code: Select all
if ( isset($this->session->data['order_id']) && ( ! empty($this->session->data['order_id'])) ) { $this->session->data['last_order_id'] = $this->session->data['order_id']; }
Save the file and upload to your server.Code: Select all
else{ $this->session->data['last_order_id'] = $this->session->data['order_id']; }
Good luck.
Can someone confirm that this works?
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.
I have an update - the fix worked for me, v.1.5.4 and my other "new" error resolved itself when I placed a fresh order as a guest. I was refreshing the success page and the problem was because it was not referencing an order number anymore. When a new order was placed as a guest, the success page showed as it should with no errors. Great success!i2Paq wrote:codex73 wrote:The problem lies because the variable "$this->session->data['last_order_id']" is not been set because it didn't matched the condition for some reason. I'm not going to go into why it didn't but instead give you the solution. This is used to generate the success message where it displays the order number for the client upon checkout.
Open
/catalog/controller/checkout/success.php
Find this:Add this right after:Code: Select all
if ( isset($this->session->data['order_id']) && ( ! empty($this->session->data['order_id'])) ) { $this->session->data['last_order_id'] = $this->session->data['order_id']; }
Save the file and upload to your server.Code: Select all
else{ $this->session->data['last_order_id'] = $this->session->data['order_id']; }
Good luck.
Can someone confirm that this works?
Thank you for the fix!
Erin
I tried this fix but ended up with a new error.
2013-03-25 10:41:14 - PHP Notice: Undefined index: order_id in /catalog/controller/checkout/success.php on line 9
So i guess you could say it doesn´t work correctly.
PHP Notice: Undefined index: last_order_id in /data/catalog/controller/checkout/success.php on line 68
Is because people can direct access checkout/succes.
It has already been requested many times all over the site of Opencart but there are no answers or fix.
Also oc 1.5.5 / 1.5.5.1 still have it.
Also related topic:
http://forum.opencart.com/viewtopic.php ... &start=180
Live store Opencart 2.3.0.2 modified on https://webshopmarlin.nl
I am getting similor error at line 26, Below is the error log, Can you please advice the fix?
Warning: sprintf(): Too few arguments in /var/www/html/catalog/controller/account/success.php on line 26
-----------
print_r($this->session->data);
die();
After adding above command after line 26,I can see below message, Pl advice the fix. Thanks in advance
Warning: sprintf(): Too few arguments in /var/www/html/catalog/controller/account/success.php on line 26Array ( [language] => en-gb [currency] => INR [user_id] => 1 [user_token] => NhJxHYteL41Q8DFGwzQRkCPscZ1xqO1I [customer_id] => 8 )
The user_token key does not exist by default in v1.5x releases of Opencart, in fact, not before v3.x releases. Unless using an extension, I would not suggest the use of that key name since it could affect your platform's security session whenever an upgrade is involved by still using that extension due to key name conflicts.Warning: sprintf(): Too few arguments in /var/www/html/catalog/controller/account/success.php on line 26Array ( [language] => en-gb [currency] => INR [user_id] => 1 [user_token] => NhJxHYteL41Q8DFGwzQRkCPscZ1xqO1I [customer_id] => 8 )
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Users browsing this forum: No registered users and 200 guests