[-] FO : #PSTEST-869 - Billing address not refreshed on multi-shipping
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13611 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -49,11 +49,24 @@ ul.address li.address_delete {
|
|||||||
padding:20px 0
|
padding:20px 0
|
||||||
}
|
}
|
||||||
|
|
||||||
.address_delivery select {
|
.address_select {
|
||||||
border:1px solid #ccc;
|
border:1px solid #ccc;
|
||||||
width:200px
|
width: 200px;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
label[for=id_address_delivery], label[for=id_address_invoice] {
|
||||||
|
float: left;
|
||||||
|
width: 225px;
|
||||||
|
}
|
||||||
|
.addressesAreEquals label {
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
.addressesAreEquals input {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
p.address_delivery, p.addressesAreEquals {
|
||||||
|
padding-bottom: 14px
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* PAGE ADRESSES ******************************************************************************* */
|
/* PAGE ADRESSES ******************************************************************************* */
|
||||||
.addresses ul.address {
|
.addresses ul.address {
|
||||||
|
|||||||
@@ -50,8 +50,7 @@ function updateAddressesDisplay(first_view)
|
|||||||
|
|
||||||
// update content of invoice address
|
// update content of invoice address
|
||||||
//if addresses have to be equals...
|
//if addresses have to be equals...
|
||||||
|
if ($('input[type=checkbox]#addressesAreEquals:checked').length == 1 && ($('#multishipping_mode_checkbox:checked').length == 0))
|
||||||
if ($('input[type=checkbox]#addressesAreEquals:checked').length == 1)
|
|
||||||
{
|
{
|
||||||
if ($('#multishipping_mode_checkbox:checked').length == 0) {
|
if ($('#multishipping_mode_checkbox:checked').length == 0) {
|
||||||
$('#address_invoice_form:visible').hide('fast');
|
$('#address_invoice_form:visible').hide('fast');
|
||||||
@@ -95,33 +94,33 @@ function updateAddressDisplay(addressType)
|
|||||||
link = link.replace(expression, 'id_address='+idAddress);
|
link = link.replace(expression, 'id_address='+idAddress);
|
||||||
$('ul#address_' + addressType + ' li.address_update a').attr('href', link);
|
$('ul#address_' + addressType + ' li.address_update a').attr('href', link);
|
||||||
}
|
}
|
||||||
|
resizeAddressesBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateAddresses()
|
function updateAddresses()
|
||||||
{
|
{
|
||||||
var idAddress_delivery = $('#id_address_delivery').val();
|
var idAddress_delivery = $('#id_address_delivery').val();
|
||||||
var idAddress_invoice = $('input[type=checkbox]#addressesAreEquals:checked').length == 1 ? idAddress_delivery : $('#id_address_invoice').val();
|
var idAddress_invoice = $('input[type=checkbox]#addressesAreEquals:checked').length == 1 ? idAddress_delivery : $('#id_address_invoice').val();
|
||||||
|
$.ajax({
|
||||||
$.ajax({
|
type: 'POST',
|
||||||
type: 'POST',
|
url: baseDir + 'order.php',
|
||||||
url: baseDir + 'order.php',
|
async: true,
|
||||||
async: true,
|
cache: false,
|
||||||
cache: false,
|
dataType : "json",
|
||||||
dataType : "json",
|
data: 'processAddress=true&step=2&ajax=true&id_address_delivery=' + idAddress_delivery + '&id_address_invoice=' + idAddress_invoice+ '&token=' + static_token ,
|
||||||
data: 'processAddress=true&step=2&ajax=true&id_address_delivery=' + idAddress_delivery + '&id_address_invoice=' + idAddress_invoice+ '&token=' + static_token ,
|
success: function(jsonData)
|
||||||
success: function(jsonData)
|
{
|
||||||
{
|
if (jsonData.hasError)
|
||||||
if (jsonData.hasError)
|
{
|
||||||
{
|
var errors = '';
|
||||||
var errors = '';
|
for(error in jsonData.errors)
|
||||||
for(error in jsonData.errors)
|
//IE6 bug fix
|
||||||
//IE6 bug fix
|
if(error != 'indexOf')
|
||||||
if(error != 'indexOf')
|
errors += jsonData.errors[error] + "\n";
|
||||||
errors += jsonData.errors[error] + "\n";
|
alert(errors);
|
||||||
alert(errors);
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
error: function(XMLHttpRequest, textStatus, errorThrown) {alert("TECHNICAL ERROR: unable to save adresses \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus);}
|
error: function(XMLHttpRequest, textStatus, errorThrown) {alert("TECHNICAL ERROR: unable to save adresses \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus);}
|
||||||
});
|
});
|
||||||
resizeAddressesBox();
|
resizeAddressesBox();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user