diff --git a/admin/themes/default/template/controllers/addresses/helpers/form/form.tpl b/admin/themes/default/template/controllers/addresses/helpers/form/form.tpl index d416d2a07..ea72d4782 100644 --- a/admin/themes/default/template/controllers/addresses/helpers/form/form.tpl +++ b/admin/themes/default/template/controllers/addresses/helpers/form/form.tpl @@ -71,6 +71,7 @@ $('input[name=firstname]').val(infos[0]); $('input[name=lastname]').val(infos[1]); $('input[name=company]').val(infos[2]); + $('input[name=id_customer]').val(infos[3]); } }, error: function(msg) @@ -82,6 +83,7 @@
+
{/if} diff --git a/admin/themes/default/template/controllers/orders/form.tpl b/admin/themes/default/template/controllers/orders/form.tpl index 9bcf5985a..3f421b6df 100644 --- a/admin/themes/default/template/controllers/orders/form.tpl +++ b/admin/themes/default/template/controllers/orders/form.tpl @@ -1145,6 +1145,7 @@ { $('#addresses_err').show().html('{l s='You must add at least one address to process the order.'}'); $('#address_delivery, #address_invoice').hide(); + $("#new_address").show(); //by webkul (if there is no address then order can not be created) $("button[name=\"submitAddOrder\"]").attr("disabled", "disabled"); diff --git a/controllers/admin/AdminAddressesController.php b/controllers/admin/AdminAddressesController.php index 256c4cc90..296c9addc 100644 --- a/controllers/admin/AdminAddressesController.php +++ b/controllers/admin/AdminAddressesController.php @@ -500,7 +500,7 @@ class AdminAddressesControllerCore extends AdminController $customer = Customer::searchByName($email); if (!empty($customer)) { $customer = $customer['0']; - echo json_encode(array('infos' => pSQL($customer['firstname']).'_'.pSQL($customer['lastname']).'_'.pSQL($customer['company']))); + echo json_encode(array('infos' => pSQL($customer['firstname']).'_'.pSQL($customer['lastname']).'_'.pSQL($customer['company']).'_'.pSQL($customer['id_customer']))); } } die; diff --git a/install/fixtures/fashion/data/address.xml b/install/fixtures/fashion/data/address.xml index b37587575..d4cee69e2 100644 --- a/install/fixtures/fashion/data/address.xml +++ b/install/fixtures/fashion/data/address.xml @@ -30,12 +30,5 @@ Paris -
- My Company - 16, Main street - 2nd floor - Miami - -