[-] MO : #PSCFV-3274 - No links to remove discounts without code in module blockcart

This commit is contained in:
mDeflotte
2012-07-20 08:54:47 +00:00
parent bfc1b96be4
commit 25bdfefcbb
3 changed files with 10 additions and 2 deletions
+4 -1
View File
@@ -383,12 +383,15 @@ var ajaxCart = {
{
if (parseFloat(jsonData.discounts[i].price_float) > 0)
{
var delete_link = '';
if (jsonData.discounts[i].code.length)
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"><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></td>'
+' <td class="delete">' + delete_link + '</td>'
+'</tr>'
));
}
+1
View File
@@ -88,6 +88,7 @@
"name": "{$discount.name|cat:' : '|cat:$discount.description|truncate:18:'...'|addslashes|replace:'\\\'':'\''}",
"description": "{$discount.description|addslashes|replace:'\\\'':'\''}",
"nameDescription": "{$discount.name|cat:' : '|cat:$discount.description|truncate:18:'...'|addslashes|replace:'\\\'':'\''}",
"code": "{$discount.code}",
"link": "{$link->getPageLink("$order_process", true, NULL, "deleteDiscount={$discount.id_discount}")}",
"price": "{if $priceDisplay == 1}{convertPrice|html_entity_decode:2:'UTF-8' price=$discount.value_tax_exc}{else}{convertPrice|html_entity_decode:2:'UTF-8' price=$discount.value_real}{/if}",
"price_float": "{if $priceDisplay == 1}{$discount.value_tax_exc}{else}{$discount.value_real}{/if}"
+5 -1
View File
@@ -115,7 +115,11 @@ var img_dir = '{$img_dir}';
<td class="quantity">1x</td>
<td class="name" title="{$discount.description}">{$discount.name|cat:' : '|cat:$discount.description|truncate:18:'...'|escape:'htmlall':'UTF-8'}</td>
<td class="price">-{if $priceDisplay == 1}{convertPrice price=$discount.value_tax_exc}{else}{convertPrice price=$discount.value_real}{/if}</td>
<td class="delete"><a class="delete_voucher" href="{$link->getPageLink('$order_process.php', true)}?deleteDiscount={$discount.id_discount}" title="{l s='Delete' mod='blockcart'}"><img src="{$img_dir}icon/delete.gif" alt="{l s='Delete' mod='blockcart'}" class="icon" /></a></td>
<td class="delete">
{if strlen($discount.code)}
<a class="delete_voucher" href="{$link->getPageLink('$order_process.php', true)}?deleteDiscount={$discount.id_discount}" title="{l s='Delete' mod='blockcart'}"><img src="{$img_dir}icon/delete.gif" alt="{l s='Delete' mod='blockcart'}" class="icon" /></a>
{/if}
</td>
</tr>
{/if}
{/foreach}