Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I trust your and value your corrections.
I mean, the errors coming up catalog/model/account... files include completely different coding at the lines listed, compared to the ones we have fixed.
ERROR MESSAGE :
line 4 is below and I don't know how to code this to fix it<b>Notice</b>: Undefined index: company in <b>/home/.../catalog/model/account/address.php</b> on line <b>4</b>
<b>Notice</b>: Undefined index: address_2 in <b>/home/.../catalog/model/account/address.php</b> on line <b>4</b>[]
Code: Select all
$this->db->query("INSERT INTO " . DB_PREFIX . "address SET customer_id = '" . (int)$this->customer->getId() . "', firstname = '" . $this->db->escape($data['firstname']) . "', lastname = '" . $this->db->escape($data['lastname']) . "', company = '" . $this->db->escape($data['company']) . "', address_1 = '" . $this->db->escape($data['address_1']) . "', address_2 = '" . $this->db->escape($data['address_2']) . "', postcode = '" . $this->db->escape($data['postcode']) . "', city = '" . $this->db->escape($data['city']) . "', zone_id = '" . (int)$data['zone_id'] . "', country_id = '" . (int)$data['country_id'] . "', custom_field = '" . $this->db->escape(isset($data['custom_field']) ? json_encode($data['custom_field']) : '') . "'");
Reason: Added quote tags.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Thanks so much
So, I've made the changes to the catalog/controller/checkout/guest_shipping.php and /guest.php
So to make the errors go away for this same error, when a customer goes through 'registration' or áccount', I just need to make the same changes in these corresponding catalog/controller/checkout/[insertfilename].php
Is that right?
That type of questioning cannot be accurate but the best methodology is always to read the lines on what the error handler provides with the filename and the line number either from the browser or from the error logs.platypuspuzzles wrote:Ah, I see!
Thanks so much
So, I've made the changes to the catalog/controller/checkout/guest_shipping.php and /guest.php
So to make the errors go away for this same error, when a customer goes through 'registration' or áccount', I just need to make the same changes in these corresponding catalog/controller/checkout/[insertfilename].php
Is that right?
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I've updated the guest.php and guest_shipping.php controller files, but don't know what controller files to edit to fix the following errors
Below are my only errors that remain, that are triggered when a customer checkouts out through registering an account or logging in with an account and creating a new address.
Undefined index: company in <b>/home/.../catalog/model/account/address.php</b> on line <b>4</b>
Undefined index: address_2 in <b>/home/.../catalog/model/account/address.php</b> on line <b>4</b>[]
Undefined index: fax in <b>/home/.../catalog/model/account/customer.php</b> on line <b>14</b>
Undefined index: company in <b>/home/.../catalog/model/account/customer.php</b> on line <b>18</b>
Undefined index: address_2 in <b>/home/.../catalog/model/account/customer.php</b> on line <b>18</b>[]
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
In catalog/controller/checkout/payment_address.php file,
find:
Code: Select all
$address_id = $this->model_account_address->addAddress($this->request->post);
Code: Select all
if (empty($this->request->post['company'])) {
$this->request->post['company'] = '';
}
if (empty($this->request->post['address_2'])) {
$this->request->post['address_2'] = '';
}
if (empty($this->request->post['fax'])) {
$this->request->post['fax'] = '';
}
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I've made the changes to the catalog/controller/checkout/payment_address.php and shipping_address.php files but continue to get the following errors
**checkout - register new account**
<b>Notice</b>: Undefined index: fax in <b>/home/.../catalog/model/account/customer.php</b> on line <b>14</b>
<b>Notice</b>: Undefined index: company in <b>/home/.../catalog/model/account/customer.php</b> on line <b>18</b>
<b>Notice</b>: Undefined index: address_2 in <b>/home/.../catalog/model/account/customer.php</b> on line <b>18</b>[]
**checkout - log in to account - change of address**
This is the code at 170<b>Notice</b>: Undefined variable: address_id in <b>/home/.../catalog/controller/checkout/payment_address.php</b> on line <b>170</b>[]
Code: Select all
$this->session->data['payment_address'] = $this->model_account_address->getAddress($address_id);
Reason: Added quote tags.
find:
Code: Select all
$customer_id = $this->model_account_customer->addCustomer($this->request->post);
As for this one:
What does your error log states regarding new added address that tries to get added on the database? A database error message would be needed on this one.**checkout - log in to account - change of address**
<b>Notice</b>: Undefined variable: address_id in <b>/home/.../catalog/controller/checkout/payment_address.php</b> on line <b>170</b>[]
This is the code at 170
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
add above each instances of:
Code: Select all
$address_id = $this->model_account_address->addAddress($this->request->post);
Code: Select all
$this->log->write(__FILE__ . ': ' . print_r($this->request->post));
If so, without full server path, please paste the results on your next reply.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Thank you so much!!! The continued errors were because I didn't read your last guidance post properly and instead of adding the code ABOVE the line, I replaced it.
I've just tested all the different checkout options and they all work 100%
Thank you so much!
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Couldn't have done it without you. Thanks again.straightlight wrote:Here we go, problem solved.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I am getting same error "admin_controller_sale_order.php on line 2313"
Can somebody please help
Users browsing this forum: No registered users and 195 guests