// Retrocompatibility with carriers modules
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12614 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -615,7 +615,15 @@ function refreshDeliveryOptions()
|
||||
{
|
||||
$.each($('.delivery_option_radio'), function() {
|
||||
if ($(this).attr('checked'))
|
||||
{
|
||||
$(this).parent().find('.delivery_option_carrier').show();
|
||||
var carrier_id_list = $(this).val().split(',');
|
||||
carrier_id_list.pop();
|
||||
var it = this;
|
||||
$(carrier_id_list).each(function() {
|
||||
$(it).parent().find('input[value="'+this.toString()+'"]').change();
|
||||
});
|
||||
}
|
||||
else
|
||||
$(this).parent().find('.delivery_option_carrier').hide();
|
||||
});
|
||||
@@ -658,3 +666,25 @@ $(document).ready(function() {
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
function updateExtraCarrier(id_delivery_option, id_address)
|
||||
{
|
||||
if(typeof(orderOpcUrl) != 'undefined')
|
||||
var url = orderOpcUrl;
|
||||
else
|
||||
var url = orderUrl;
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: url,
|
||||
async: true,
|
||||
cache: false,
|
||||
dataType : "json",
|
||||
data: 'ajax=true&method=updateExtraCarrier&id_address='+id_address+'&id_delivery_option='+id_delivery_option+'&token=' + static_token,
|
||||
success: function(jsonData)
|
||||
{
|
||||
console.log(jsonData);
|
||||
$('#HOOK_EXTRACARRIER_'+id_address).html(jsonData['content']);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -28,8 +28,9 @@ function updateCarrierList(json)
|
||||
{
|
||||
var html = json.carrier_block;
|
||||
|
||||
if (json.HOOK_EXTRACARRIER !== null && json.HOOK_EXTRACARRIER != undefined)
|
||||
html += json.HOOK_EXTRACARRIER;
|
||||
// @todo check with theme 1.4
|
||||
//if ($('#HOOK_EXTRACARRIER').length == 0 && json.HOOK_EXTRACARRIER !== null && json.HOOK_EXTRACARRIER != undefined)
|
||||
// html += json.HOOK_EXTRACARRIER;
|
||||
|
||||
$('#carrier_area').replaceWith(html);
|
||||
|
||||
@@ -181,7 +182,7 @@ function updateCarrierSelectionAndGift()
|
||||
$('#opc_payment_methods-overlay').fadeOut('slow');
|
||||
$('#opc_delivery_methods-overlay').fadeOut('slow');
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function confirmFreeOrder()
|
||||
|
||||
Reference in New Issue
Block a user