From ab0e00e7d8e27a3fb387a77390632cd49d44f2d9 Mon Sep 17 00:00:00 2001 From: rGaillard Date: Wed, 10 Oct 2012 14:09:33 +0000 Subject: [PATCH] [-] FO: Fix #PSCFV-4720 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17825 b9a71923-0436-4b27-9f14-aed3839534dd --- .../template/controllers/addresses/helpers/form/form.tpl | 1 + controllers/admin/AdminAddressesController.php | 2 +- controllers/front/AddressController.php | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/admin-dev/themes/default/template/controllers/addresses/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/addresses/helpers/form/form.tpl index 17ec54a67..12f05aa0c 100644 --- a/admin-dev/themes/default/template/controllers/addresses/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/controllers/addresses/helpers/form/form.tpl @@ -76,6 +76,7 @@ var infos = msg.infos.split('_'); $('input[name=firstname]').val(infos[0]); $('input[name=lastname]').val(infos[1]); + $('input[name=company]').val(infos[2]); } }, error: function(msg) diff --git a/controllers/admin/AdminAddressesController.php b/controllers/admin/AdminAddressesController.php index 8dd99f828..d64fa0670 100644 --- a/controllers/admin/AdminAddressesController.php +++ b/controllers/admin/AdminAddressesController.php @@ -444,7 +444,7 @@ class AdminAddressesControllerCore extends AdminController if (!empty($customer)) { $customer = $customer['0']; - echo Tools::jsonEncode(array('infos' => pSQL($customer['firstname']).'_'.pSQL($customer['lastname']))); + echo Tools::jsonEncode(array('infos' => pSQL($customer['firstname']).'_'.pSQL($customer['lastname']).'_'.pSQL($customer['company']))); } } die; diff --git a/controllers/front/AddressController.php b/controllers/front/AddressController.php index 029625ed4..a5a0b4573 100644 --- a/controllers/front/AddressController.php +++ b/controllers/front/AddressController.php @@ -109,6 +109,7 @@ class AddressControllerCore extends FrontController { $_POST['firstname'] = $this->context->customer->firstname; $_POST['lastname'] = $this->context->customer->lastname; + $_POST['company'] = $this->context->customer->company; } }