Post by Suwanto » Fri Apr 15, 2016 11:16 am

please help me.
i can not open customer page in admin. it's only blank page. i dont know why.. n there is no error message in error log.
here's the pictureshttps://www.dropbox.com/s/lpub4y7ldrsu5 ... 0.png?dl=0
https://www.dropbox.com/s/kehhbrd83w1xn ... 1.png?dl=0

Newbie

Posts

Joined
Thu Mar 08, 2012 2:43 pm

Post by Suwanto » Sat Apr 16, 2016 10:29 am

anybody can help me please..??

Newbie

Posts

Joined
Thu Mar 08, 2012 2:43 pm

Post by Suwanto » Sat Apr 16, 2016 11:20 am

found error in the page.

Parse error: syntax error, unexpected T_BOOLEAN_AND, expecting ')' in /home/ypcomput/public_html/admin/controller/customer/customer.php on line 1105

i don't change anything in that file.

the script is
foreach ($custom_fields as $custom_field) {
if (($custom_field['location'] == 'address') && $custom_field['required'] && empty($value['custom_field'][$custom_field['custom_field_id']])) {
$this->error['address'][$key]['custom_field'][$custom_field['custom_field_id']] = sprintf($this->language->get('error_custom_field'), $custom_field['name']);
} elseif (($custom_field['type'] == 'text' && !empty($custom_field['validation'] && $custom_field['location'] == 'address')) && !filter_var($value['custom_field'][$custom_field['custom_field_id']], FILTER_VALIDATE_REGEXP, array('options' => array('regexp' => $custom_field['validation'])))) {
$this->error['address'][$key]['custom_field'][$custom_field['custom_field_id']] = sprintf($this->language->get('error_custom_field_validate'), $custom_field['name']);
}
is there anything wrong?
please help me how to fix this problem..

Newbie

Posts

Joined
Thu Mar 08, 2012 2:43 pm

Post by Suwanto » Sat Apr 16, 2016 4:26 pm

Solution:
} elseif (($custom_field['type'] == 'text' &&
!empty($custom_field['validation']) &&
$custom_field['location'] == 'address') &&
!filter_var($value['custom_field'][$custom_field['custom_field_id']], FILTER_VALIDATE_REGEXP, array('options' => array('regexp' => $custom_field['validation'])))) {
SOLVED

Newbie

Posts

Joined
Thu Mar 08, 2012 2:43 pm

Post by jouvylee » Sat Apr 16, 2016 7:46 pm

how to solve this problem?
to day i install opencart 2.2
click the admin customer have problem

HTTP 500 error

That's odd... Microsoft Edge can’t find this page

This page can’t be displayed, because this site’s server might be under maintenance or there could be a programming error.

New member

Posts

Joined
Sun Apr 03, 2016 2:40 pm

Post by one2012 » Tue Apr 26, 2016 10:01 pm

Suwanto wrote:Solution:
} elseif (($custom_field['type'] == 'text' &&
!empty($custom_field['validation']) &&
$custom_field['location'] == 'address') &&
!filter_var($value['custom_field'][$custom_field['custom_field_id']], FILTER_VALIDATE_REGEXP, array('options' => array('regexp' => $custom_field['validation'])))) {
SOLVED
Yes, it solve me to.

New member

Posts

Joined
Wed Feb 06, 2013 11:22 pm

Post by justballoons » Wed Apr 27, 2016 12:59 pm

Please tell me where I install the fix..

Newbie

Posts

Joined
Wed Apr 27, 2016 12:46 pm

Post by jaysmodels » Wed Apr 27, 2016 8:22 pm

Do I need to reduce the code down to just those lines? Remove these other lines?
foreach ($custom_fields as $custom_field) {
if (($custom_field['location'] == 'address') && $custom_field['required'] && empty($value['custom_field'][$custom_field['custom_field_id']])) {
$this->error['address'][$key]['custom_field'][$custom_field['custom_field_id']] = sprintf($this->language->get('error_custom_field'), $custom_field['name']);

$this->error['address'][$key]['custom_field'][$custom_field['custom_field_id']] = sprintf($this->language->get('error_custom_field_validate'), $custom_field['name']);
}

Newbie

Posts

Joined
Wed Apr 20, 2016 5:25 pm

Post by one2012 » Fri Apr 29, 2016 10:52 pm

Open:
/admin/controller/customer/customer.php
On line 1105 found this code:
} elseif (($custom_field['type'] == 'text' && !empty($custom_field['validation'] && $custom_field['location'] == 'address')) && !filter_var($value['custom_field'][$custom_field['custom_field_id']], FILTER_VALIDATE_REGEXP, array('options' => array('regexp' => $custom_field['validation'])))) {
Replace it by this code:
} elseif (($custom_field['type'] == 'text' && !empty($custom_field['validation']) && $custom_field['location'] == 'address') && !filter_var($value['custom_field'][$custom_field['custom_field_id']], FILTER_VALIDATE_REGEXP, array('options' => array('regexp' => $custom_field['validation'])))) {

New member

Posts

Joined
Wed Feb 06, 2013 11:22 pm

Post by jaysmodels » Sat Apr 30, 2016 6:29 pm

Thank you, all good now.

Newbie

Posts

Joined
Wed Apr 20, 2016 5:25 pm

Post by Gensen » Fri May 06, 2016 7:28 pm

Thanks solved it for me to!

Newbie

Posts

Joined
Fri May 06, 2016 7:25 pm

Post by one2012 » Fri May 06, 2016 10:57 pm

You are welcome guys! :)

New member

Posts

Joined
Wed Feb 06, 2013 11:22 pm

Post by soniczpank » Thu May 26, 2016 9:00 pm

thanks, work it for me too, but whats is the fix, please explain to know

regards

Newbie

Posts

Joined
Thu May 26, 2016 8:24 pm

Post by one2012 » Thu May 26, 2016 10:38 pm

I think it will be fixed in next OC release.

New member

Posts

Joined
Wed Feb 06, 2013 11:22 pm

Post by soniczpank » Fri Jun 03, 2016 8:54 pm

now i having the same issue in address in coustomer module

Newbie

Posts

Joined
Thu May 26, 2016 8:24 pm

Post by i2Paq » Fri Jun 03, 2016 9:05 pm


Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by kumaresan » Fri Jul 01, 2016 9:17 pm

Thanks friends but can't find any difference in code.
Can anyone explain this issuse...

Newbie

Posts

Joined
Thu Jun 30, 2016 6:49 pm

Post by straightlight » Fri Jul 01, 2016 9:37 pm

kumaresan wrote:Thanks friends but can't find any difference in code.
Can anyone explain this issuse...
Have you tried this modification on the topic?

http://forum.opencart.com/viewtopic.php ... 10#p616544

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: Semrush [Bot] and 25 guests