Post by 1991x » Mon Jan 01, 2018 4:51 pm

Hi,
I use version 2.2.0.0 opencart and I'm trying to make dropdown select for city form (not input). In admin side I edit admin/view/.../sale/order_form.tpl. To make it works I should change validation script for "city" variable. In my case I changed into "city_id". But "protected function validateForm() {" in admin/controller/sale/order.php is not exist. So, I need to find this but I don't know where is it.

Code: Select all

if ((utf8_strlen($value['city']) < 2) || (utf8_strlen($value['city']) > 128)) {
					$this->error['address'][$key]['city'] = $this->language->get('error_city');
				}

Anybody can help?
Image
Last edited by 1991x on Sat Jan 06, 2018 5:31 pm, edited 2 times in total.

Tempatnya Tas Keren Backpack Slingbag


User avatar
Newbie

Posts

Joined
Thu Oct 26, 2017 8:07 pm


Post by cyclops12 » Mon Jan 01, 2018 6:18 pm

Try looking in admin/controller/customer/customer.php around line 1082

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by 1991x » Mon Jan 01, 2018 8:43 pm

cyclops12 wrote:
Mon Jan 01, 2018 6:18 pm
Try looking in admin/controller/customer/customer.php around line 1082
I'm not sure it's customer.php. There'e no setOutput for order_form. :(

Tempatnya Tas Keren Backpack Slingbag


User avatar
Newbie

Posts

Joined
Thu Oct 26, 2017 8:07 pm


Post by straightlight » Mon Jan 01, 2018 10:50 pm

The getForm() method needs to be modified. API required to assemble / recruit the created variables into your catalog/controller/api/order.php file.

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

Post by 1991x » Tue Jan 02, 2018 8:13 am

straightlight wrote:
Mon Jan 01, 2018 10:50 pm
The getForm() method needs to be modified. API required to assemble / recruit the created variables into your catalog/controller/api/order.php file.
I don't really get this. Can you tell me more detail step by step?

Tempatnya Tas Keren Backpack Slingbag


User avatar
Newbie

Posts

Joined
Thu Oct 26, 2017 8:07 pm


Post by straightlight » Tue Jan 02, 2018 8:55 am

If you'd like to get an API developed, it would rather be suggested to look on the marketplace or to post a request in the Commercial Support section of the forum to get this developed as a custom job.

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

Post by 1991x » Sat Jan 06, 2018 5:30 pm

straightlight wrote:
Tue Jan 02, 2018 8:55 am
If you'd like to get an API developed, it would rather be suggested to look on the marketplace or to post a request in the Commercial Support section of the forum to get this developed as a custom job.
I see. So it's more complicated than I thought.

Tempatnya Tas Keren Backpack Slingbag


User avatar
Newbie

Posts

Joined
Thu Oct 26, 2017 8:07 pm

Who is online

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