Page 1 of 1
Undefined index: payment_address in payment_address.php
Posted: Thu Dec 06, 2012 6:30 pm
by ABD81
Hi,
My opencart site has been live for three weeks now, and has been working fine with the odd exception. I've had a couple of customers that were registered on the old site (presta-shop) of which i imported the old customer data successfuly encounter the following error:
Code: Select all
SyntaxError: JSON.parse
OK
<b>Notice</b>: Undefined index: payment_address in
<b>/[web path]/catalog/controller/checkout/payment_address.php</b> on line <b>125></b>:Undefined index: payment_address in <b>/[web path]/catalog/controller/checkout/payment_address.php</b> on line <b>171></b>
I've told them the old 'update your details through the my account' trick which seems to work - but was just wondering if there was any way i could fix the issue?
[edit - sorry - i was typing that out in a hurry - should of mentioned that the site is running OC 1.5.4.1]
Cheers!
Re: Undefined index: payment_address in payment_address.php
Posted: Thu Dec 06, 2012 11:07 pm
by anung
Open payment_address.tpl in catalog/view/theme/yourtheme/template/checkout
put this code
Code: Select all
<?php } else { ?>
<input type="hidden" name="payment_address" value="new" id="payment-address-new" checked="checked" />
after this code
Code: Select all
<p>
<input type="radio" name="payment_address" value="new" id="payment-address-new" />
<label for="payment-address-new"><?php echo $text_address_new; ?></label>
</p>
Re: Undefined index: payment_address in payment_address.php
Posted: Fri Dec 07, 2012 7:54 pm
by ABD81
Thanks for your reply - i've managed to recreate the customers issue, and your solution did the trick! Many thanks

Re: Undefined index: payment_address in payment_address.php
Posted: Wed Dec 12, 2012 10:51 pm
by rfollett
I have getting this message in my error log:
PHP Notice: Undefined index: shipping_address in /homepages/29/d169973226/htdocs/emmamartin/catalog/controller/checkout/shipping_address.php on line 136
Does the fix you suggested apply here?
Re: Undefined index: payment_address in payment_address.php
Posted: Thu Jan 31, 2013 11:44 pm
by musicart
Hello,
In the error log, I have also the same message :
PHP Notice: Undefined index: payment_address in /catalog/controller/checkout/payment_address.php on line 125
PHP Notice: Undefined index: payment_address in /catalog/controller/checkout/payment_address.php on line 171
But your solution don't fix it.
Another idea ?
Thanks for your help !
Re: Undefined index: payment_address in payment_address.php
Posted: Thu Jan 31, 2013 11:49 pm
by musicart
Hello,
In the error log, I have the same thing:
PHP Notice: Undefined index: payment_address in /catalog/controller/checkout/payment_address.php on line 125
PHP Notice: Undefined index: payment_address in /catalog/controller/checkout/payment_address.php on line 171
So, the order process is blocked.
But your solution don't fix it.
Another idea ?
Thanks !
Re: Undefined index: payment_address in payment_address.php
Posted: Fri Feb 01, 2013 8:10 am
by musicart
I also noticed this ...
1 / If I do an order for example in French, there is no error message.
2 / If I redo this order, an error message occurs, blocking any possibility to achieve the order. It's always: "Error: You must select a payment method!"
3 / By various tests, I noticed that changing the language (in store front) solves the problem ... temporarily. So, when I pass in English, the command may succeed.
4 / But when I try a new command in English, the same message appears.
5 / I choose again the French and the command succeeds.
I thought it was a problem with the French translation but it also occurs in English. So the problem is probably elsewhere.
I think it happens more systematically when I click Bank Transfer. But sometimes, I leave the default choice (paypal) and it does too.
And always these two messages in the error log:
2013-01-31 23:49:55 - PHP Notice: Undefined index: payment_address in /catalog/controller/checkout/payment_address.php on line 125
2013-01-31 23:49:55 - PHP Notice: Undefined index: payment_address in /catalog/controller/checkout/payment_address.php on line 171
If someone has an idea, it becomes urgent!
Re: Undefined index: payment_address in payment_address.php
Posted: Fri Feb 01, 2013 8:32 pm
by anung
I think on OpenCart latest version(1.5.5.1) already fix.
Copy payment_address.php on catalog/controller/checkout/ from OpenCart v.1.5.5.1 to your OpenCart (v.1.5.4.1).
Do not forget to backup old your file before copy the file.

Re: Undefined index: payment_address in payment_address.php
Posted: Fri May 17, 2013 8:10 am
by discostu
anung wrote:I think on OpenCart latest version(1.5.5.1) already fix.
Copy payment_address.php on catalog/controller/checkout/ from OpenCart v.1.5.5.1 to your OpenCart (v.1.5.4.1).
Do not forget to backup old your file before copy the file.

+1 Thanks for that!!