add delete delivery delay on shopping cart if no product

This commit is contained in:
Thibault UBUNTU 2016-03-09 16:44:00 +01:00
parent 06d5d227c8
commit 4a6ce8b8c1
2 changed files with 15 additions and 3 deletions

View File

@ -104,6 +104,7 @@ function deletProductFromSummary(id)
{
$('#product_'+ id).fadeOut('slow', function() {
$(this).remove();
updateLayerDelay();
});
var exist = false;
@ -130,6 +131,17 @@ function deletProductFromSummary(id)
});
}
function updateLayerDelay()
{
$('.delivery_delay_cart').each(function(index){
var line = $(this).next('tr').next('tr');
if (!$(line).hasClass('cart_item')) {
$(this).next('tr').hide();
$(this).hide();
}
});
}
function upQuantity(id, qty)
{
if(typeof(qty)=='undefined' || !qty)

View File

@ -217,7 +217,7 @@
<tr style="height:10px;">
<td colspan="5" style="border:none"></td>
</tr>
<tr style="background:#e1e1e1; ">
<tr style="background:#e1e1e1;" class="delivery_delay_cart">
<td colspan="5">
<h4>{$details.title}</h4>
</td>