Payment Address Error 1.0.8.14

Open to all! Ask other shopowners for help.
radhavallabh
Senior Contributor
Posts: 466
Joined: Tue Oct 27, 2020 4:09 am
Phoenix Version: 1.1.0.6
Has thanked: 29 times
Been thanked: 3 times

Payment Address Error 1.0.8.14

Post by radhavallabh »

Hi dear all;
When a customer tries to change the address on payment page below address is thrown-

Notice: Undefined index: company in xx/includes/modules/customer_data/cd_company.php on line 102

Fatal error: Uncaught TypeError: Argument 1 passed to Text::input() must be of the type string, null given, called in /xx/includes/modules/customer_data/cd_company.php on line 102 and defined in /xx/includes/system/versioned/1.0.8.2/text.php:34 Stack trace: #0 /xx/includes/modules/customer_data/cd_company.php(102): Text::input(NULL) #1 /xx/includes/system/versioned/1.0.5.6/requirements_manager.php(37): cd_company->process(Array) #2 /xx/includes/system/versioned/1.0.5.6/requirements_manager.php(65): requirements_manager->act_on(Object(cd_company), 'process', Array) #3 /xx/checkout_payment_address.php(29): requirements_manager->process(Array) #4 {main} thrown in /xx/includes/system/versioned/1.0.8.2/text.php on line 34

Please can you help me determine the issue to fix it??

Thanking you in advance;
Very Warm Regds./
radhavallabh


Join The Code Co-op to get access to your library in the Code Co-op Forum
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Payment Address Error 1.0.8.14

Post by ecartz »

You could hide it by changing line 102 to

Code: Select all

      $customer_details['company'] = Text::input($_POST['company'] ?? '');
But the default version doesn't do this. So I'm guessing that the actual problem is in the configuration. Some things to check:

1. Is company installed?
2. Is it enabled?
3. Is it assigned to the checkout_new_address under Pages?
radhavallabh
Senior Contributor
Posts: 466
Joined: Tue Oct 27, 2020 4:09 am
Phoenix Version: 1.1.0.6
Has thanked: 29 times
Been thanked: 3 times

Re: Payment Address Error 1.0.8.14

Post by radhavallabh »

ecartz wrote: Tue May 10, 2022 6:08 am You could hide it by changing line 102 to

Code: Select all

      $customer_details['company'] = Text::input($_POST['company'] ?? '');
But the default version doesn't do this. So I'm guessing that the actual problem is in the configuration. Some things to check:

1. Is company installed?
2. Is it enabled?
3. Is it assigned to the checkout_new_address under Pages?
Yes dear
1. Company is installed
2. It is enabled
3. Yes Checkout_new_address assigned

To be more precise there is no error when I change the delivery address on checkout, but error occurs when I change billing address on checkout.

Regds./
radhavallabh
radhavallabh
Senior Contributor
Posts: 466
Joined: Tue Oct 27, 2020 4:09 am
Phoenix Version: 1.1.0.6
Has thanked: 29 times
Been thanked: 3 times

Re: Payment Address Error 1.0.8.14

Post by radhavallabh »

radhavallabh wrote: Tue May 10, 2022 6:38 am
ecartz wrote: Tue May 10, 2022 6:08 am You could hide it by changing line 102 to

Code: Select all

      $customer_details['company'] = Text::input($_POST['company'] ?? '');
But the default version doesn't do this. So I'm guessing that the actual problem is in the configuration. Some things to check:

1. Is company installed?
2. Is it enabled?
3. Is it assigned to the checkout_new_address under Pages?
Yes dear
1. Company is installed
2. It is enabled
3. Yes Checkout_new_address assigned

To be more precise there is no error when I change the delivery address on checkout, but error occurs when I change billing address on checkout.

Regds./
radhavallabh
The fix did not work as it should dear @ecartz as now it is highlighting the same error for country_id so there seems an issue with the checkout_payment_address.php
I also tested on 1.0.8.14 default install dear yet same issue persists....
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Payment Address Error 1.0.8.14

Post by ecartz »

radhavallabh wrote: Tue May 10, 2022 8:24 am I also tested on 1.0.8.14 default install dear yet same issue persists....
It doesn't when I test. So why are you getting different results?
radhavallabh
Senior Contributor
Posts: 466
Joined: Tue Oct 27, 2020 4:09 am
Phoenix Version: 1.1.0.6
Has thanked: 29 times
Been thanked: 3 times

Re: Payment Address Error 1.0.8.14

Post by radhavallabh »

ecartz wrote: Wed May 11, 2022 3:54 pm
radhavallabh wrote: Tue May 10, 2022 8:24 am I also tested on 1.0.8.14 default install dear yet same issue persists....
It doesn't when I test. So why are you getting different results?
Even I am failing to understand this... :(
How to debug this issue dear as not able to find from where to start....could you please elaborate so I could starting looking in it more deeply

I just checked in browser console of checkout_payment_address.php dear this error is thrown
Uncaught TypeError: $(...).val() is undefined jQuery 13.........
The below is the highlighted script for the error.....

Code: Select all

<script>$(document).ready(function () { $('#inputState').next('span').hide();  $("#inputCountry").val("99");  var selected_state = $('#inputState').val().length; var selected_country = $('#inputCountry').val(); if ( (selected_country > 0) && (selected_state == 0) ) { change_state(selected_country); } $('#inputCountry').on('change', function() { var selected_country = $('#inputCountry').val(); change_state(selected_country); }); }); function change_state(country) { $.ajax({ url: 'ext/scripts/stateSelector.php', data: {'country' : country}, success: function(data) { if(data) { $('#inputState').hide(); $('#inputState').after( data ).remove(); } else { $('#inputState').replaceWith('<input type="text" name="state" id="inputState" required aria-required="true" data-required="True" placeholder="State/Province" class="form-control" />');  } } }); }</script>
Thank you in advance;
Very Warm Regds./
radhavallabh
radhavallabh
Senior Contributor
Posts: 466
Joined: Tue Oct 27, 2020 4:09 am
Phoenix Version: 1.1.0.6
Has thanked: 29 times
Been thanked: 3 times

Re: Payment Address Error 1.0.8.14

Post by radhavallabh »

ecartz wrote: Wed May 11, 2022 3:54 pm
radhavallabh wrote: Tue May 10, 2022 8:24 am I also tested on 1.0.8.14 default install dear yet same issue persists....
It doesn't when I test. So why are you getting different results?
Hi dear @ecartz the same issue is there on the 1.0.8.14 demo site I just tested it....
https://phoenixcart.org/demo/checkout_p ... ddress.php

Please help with a fix....
Thank you in advance
Very Warm Regds./
radhavallabh
You do not have the required permissions to view the files attached to this post.
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Payment Address Error 1.0.8.14

Post by ecartz »

Which version of Firefox are you using? And what extensions?
radhavallabh
Senior Contributor
Posts: 466
Joined: Tue Oct 27, 2020 4:09 am
Phoenix Version: 1.1.0.6
Has thanked: 29 times
Been thanked: 3 times

Re: Payment Address Error 1.0.8.14

Post by radhavallabh »

ecartz wrote: Thu May 12, 2022 3:26 am Which version of Firefox are you using? And what extensions?
Firefox 100.0 (64-bit) dear no extensions used dear.
User avatar
Kofod95
Senior Contributor
Posts: 748
Joined: Sat Feb 06, 2021 7:38 pm
Phoenix Version: 1.0.8.20
Has thanked: 99 times
Been thanked: 179 times

Re: Payment Address Error 1.0.8.14

Post by Kofod95 »

Works fine on Chrome 100.0.4896.127, Edge 101.0.1210.39, Internet Explorer 21H2 and Firefox 100.0 (64 bit) for me. Not that it helps you, @radhavallabh :?

//Daniel
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply