Post by waynealexsteiner » Thu Jan 12, 2017 12:57 am

Im having a problem with customers editing their addresses they can't get in from the customer side.

they go to there "My Account" and can't access the address book page

is this a known people with a fix available ?


Posts

Joined
Thu Jan 12, 2017 12:52 am

Post by rjcalifornia » Thu Jan 12, 2017 5:03 am

What is the error you get? What does the page show? Check the error log as well.

Image
A2 Hosting features: Shared Turbo Boost, Managed Warp 1, Unmanaged Hyper 1, and Warp 2 Turbo


Active Member

Posts

Joined
Fri Sep 02, 2011 1:19 pm
Location - Worldwide

Post by waynealexsteiner » Thu Jan 12, 2017 4:12 pm

nothing comes up on the error long, i think its a bad bit of script, as it only comes up with a blank page.

go from the customer account page to the "address book" and nothing loads hence my thinking that its bad code.


Posts

Joined
Thu Jan 12, 2017 12:52 am

Post by waynealexsteiner » Thu Jan 12, 2017 4:49 pm

on safari it comes up with a blank page on chrome it comes up with a "HTTP ERROR 500"


Posts

Joined
Thu Jan 12, 2017 12:52 am

Post by uksitebuilder » Thu Jan 12, 2017 7:18 pm

Then you should check your server error logs (Apache error log) or (Nginx error log)

There is always a log of a real error behind a 500 error

User avatar
Guru Member

Posts

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

Post by waynealexsteiner » Thu Jan 12, 2017 7:49 pm

it says "mod_fcgid: stderr: PHP Parse error: syntax error, unexpected T_BOOLEAN_AND, expecting ')' in /var/www/vhosts/hiddenattire.co.uk/httpdocs/catalog/controller/account/address.php on line 522, referer: http://hiddenattire.co.uk/index.php?rou ... t/password"


im not massive on coding and can't see an error?


519 foreach ($custom_fields as $custom_field) {
520 if (($custom_field['location'] == 'address') && $custom_field['required'] && empty($this->request->post['custom_field'][$custom_field['custom_field_id']])) {
521 $this->error['custom_field'][$custom_field['custom_field_id']] = sprintf($this->language->get('error_custom_field'), $custom_field['name']);
522 } elseif (($custom_field['type'] == 'text' && !empty($custom_field['validation'] && $custom_field['location'] == 'address')) && !filter_var($this->request->post['custom_field'][$custom_field['custom_field_id']], FILTER_VALIDATE_REGEXP, array('options' => array('regexp' => $custom_field['validation'])))) {
523 $this->error['custom_field'][$custom_field['custom_field_id']] = sprintf($this->language->get('error_custom_field_validate'), $custom_field['name']);
}
}

Attachments

Screen Shot 2017-01-12 at 11.44.45.png

Screen Shot 2017-01-12 at 11.44.45.png (47.22 KiB) Viewed 1261 times



Posts

Joined
Thu Jan 12, 2017 12:52 am

Post by uksitebuilder » Fri Jan 13, 2017 1:47 am

Please try replacing that line with the following:

Code: Select all

if (($custom_field['location'] == 'address') && ($custom_field['type'] == 'text') && !empty($custom_field['validation']) && !filter_var($this->request->post['custom_field'][$custom_field['custom_field_id']], FILTER_VALIDATE_REGEXP, array('options' => array('regexp' => $custom_field['validation'])))) {
Make a backup of the file before editing, just in case

User avatar
Guru Member

Posts

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

Post by waynealexsteiner » Fri Jan 13, 2017 2:46 am

Thats worked thank you :)


Posts

Joined
Thu Jan 12, 2017 12:52 am
Who is online

Users browsing this forum: No registered users and 127 guests