A2 Hosting
Template support & advice for OpenCart v2.x
8 posts Page 1 of 1
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 ?
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
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.
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"
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
ImageImageImageImageImage
ImageImageImageImageImageImageImageImageImageImage
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

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
ImageImageImageImageImage
ImageImageImageImageImageImageImageImageImageImage
by waynealexsteiner » Fri Jan 13, 2017 2:46 am
Thats worked thank you :)
8 posts Page 1 of 1
Who is online

Users browsing this forum: acidrs and 6 guests

A2 Hosting