// Add "Allow seperated package" checkbox on the cart

This commit is contained in:
mDeflotte
2011-11-28 10:50:54 +00:00
parent e00d70b932
commit 26acff7c7b
4 changed files with 62 additions and 6 deletions
+16
View File
@@ -623,4 +623,20 @@ $(document).ready(function() {
$(this).parent().parent().find('.delivery_option_carrier').hide();
$(this).parent().find('.delivery_option_carrier').show();
});
$('#allow_seperated_package').live('click', function() {
$.ajax({
type: 'GET',
url: baseDir,
async: true,
cache: false,
data: 'controller=cart&ajax=true&allowSeperatedPackage&value='
+($(this).attr('checked') ? '1' : '0')
+'&token='+static_token,
success: function(jsonData)
{
getCarrierListAndUpdate();
}
});
});
});
+4
View File
@@ -312,6 +312,10 @@
{/foreach}
</ul>
{/if}
<p>
<input type="checkbox" name="allow_seperated_package" id="allow_seperated_package" {if $cart->allow_seperated_package}checked="checked"{/if} />
<label for="allow_seperated_package">{l s="allow seperated package"}</label>
</p>
<form action="{if $opc}{$link->getPageLink('order-opc', true)}{else}{$link->getPageLink('order', true)}{/if}" method="post" id="voucher">
<fieldset>
<h4>{l s='Vouchers'}</h4>