[-] FO : Fix bug #PSCFV-10478 could not see auto added cart rule voucher on product page

This commit is contained in:
gRoussac
2013-09-23 16:08:44 +02:00
parent dedc59f1db
commit 92382e347c
2 changed files with 26 additions and 34 deletions
+6 -8
View File
@@ -398,8 +398,7 @@ var ajaxCart = {
else
{
$('#vouchers tbody').html('');
for (i=0;i<jsonData.discounts.length;i++)
for (i=0; i < jsonData.discounts.length; i++)
{
if (parseFloat(jsonData.discounts[i].price_float) > 0)
{
@@ -408,15 +407,14 @@ var ajaxCart = {
delete_link = '<a class="delete_voucher" href="'+jsonData.discounts[i].link+'" title="'+delete_txt+'"><img src="'+img_dir+'icon/delete.gif" alt="'+delete_txt+'" class="icon" /></a>';
$('#vouchers tbody').append($(
'<tr class="bloc_cart_voucher" id="bloc_cart_voucher_'+jsonData.discounts[i].id+'">'
+' <td class="quantity">1x</td>'
+' <td class="name" title="'+jsonData.discounts[i].description+'">'+jsonData.discounts[i].name+'</td>'
+' <td class="price">-'+jsonData.discounts[i].price+'</td>'
+' <td class="delete">' + delete_link + '</td>'
+'</tr>'
+ '<td class="quantity">1x</td>'
+ '<td class="name" title="'+jsonData.discounts[i].description+'">'+jsonData.discounts[i].name+'</td>'
+ '<td class="price">-'+jsonData.discounts[i].price+'</td>'
+ '<td class="delete">' + delete_link + '</td>'
+ '</tr>'
));
}
}
$('#vouchers').show();
}