// Allow / Disallow multishipping
This commit is contained in:
@@ -109,7 +109,8 @@ function changeAddressDelivery(obj)
|
||||
updateHookShoppingCart(jsonData.HOOK_SHOPPING_CART);
|
||||
updateHookShoppingCartExtra(jsonData.HOOK_SHOPPING_CART_EXTRA);
|
||||
if (jsonData.carriers != null)
|
||||
getCarrierListAndUpdate();
|
||||
if (typeof(getCarrierListAndUpdate) != 'undefined')
|
||||
getCarrierListAndUpdate();
|
||||
|
||||
// @todo reverse the remove order
|
||||
// This effect remove the current line, but it's better to remove the other one, and refresshing this one
|
||||
@@ -299,7 +300,8 @@ function deleteProductFromSummary(id)
|
||||
updateHookShoppingCartExtra(jsonData.HOOK_SHOPPING_CART_EXTRA);
|
||||
updateCustomizedDatas(jsonData.customizedDatas);
|
||||
if (jsonData.carriers != null)
|
||||
getCarrierListAndUpdate();
|
||||
if (typeof(getCarrierListAndUpdate) != 'undefined')
|
||||
getCarrierListAndUpdate();
|
||||
}
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {alert("TECHNICAL ERROR: unable to save update quantity \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus);}
|
||||
@@ -349,7 +351,8 @@ function upQuantity(id, qty)
|
||||
updateHookShoppingCart(jsonData.HOOK_SHOPPING_CART);
|
||||
updateHookShoppingCartExtra(jsonData.HOOK_SHOPPING_CART_EXTRA);
|
||||
if (jsonData.carriers != null)
|
||||
getCarrierListAndUpdate();
|
||||
if (typeof(getCarrierListAndUpdate) != 'undefined')
|
||||
getCarrierListAndUpdate();
|
||||
}
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {alert("TECHNICAL ERROR: unable to save update quantity \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus);}
|
||||
@@ -408,7 +411,8 @@ function downQuantity(id, qty)
|
||||
updateHookShoppingCart(jsonData.HOOK_SHOPPING_CART);
|
||||
updateHookShoppingCartExtra(jsonData.HOOK_SHOPPING_CART_EXTRA);
|
||||
if (jsonData.carriers != null)
|
||||
getCarrierListAndUpdate();
|
||||
if (typeof(getCarrierListAndUpdate) != 'undefined')
|
||||
getCarrierListAndUpdate();
|
||||
}
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {alert("TECHNICAL ERROR: unable to save update quantity \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus);}
|
||||
@@ -635,7 +639,8 @@ $(document).ready(function() {
|
||||
+'&token='+static_token,
|
||||
success: function(jsonData)
|
||||
{
|
||||
getCarrierListAndUpdate();
|
||||
if (typeof(getCarrierListAndUpdate) != 'undefined')
|
||||
getCarrierListAndUpdate();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
{include file="$tpl_dir./order-steps.tpl"}
|
||||
{include file="$tpl_dir./errors.tpl"}
|
||||
|
||||
{if !$multi_shipping}
|
||||
{if !$multi_shipping && {Configuration::get('PS_ALLOW_MULTISHIPPING')}}
|
||||
<div class="button_multishipping_mode" id="multishipping_mode_box">
|
||||
<div class="title">{l s='Multi-shipping'}</div>
|
||||
<div class="description">
|
||||
@@ -176,26 +176,28 @@
|
||||
{/if}
|
||||
<form action="{$link->getPageLink($back_order_page, true)}" method="post">
|
||||
{else}
|
||||
<div class="address-form-multishipping">
|
||||
<div class="button_multishipping_mode" id="multishipping_mode_box">
|
||||
<div class="title">{l s='Multi-shipping'}</div>
|
||||
<div class="description">
|
||||
<input type="checkbox" id="multishipping_mode_checkbox" onchange="multishippingMode(this); return false;"/><label for="multishipping_mode_checkbox">{l s='I want to specify a delivery address for each products I order.'}</label>
|
||||
{if {Configuration::get('PS_ALLOW_MULTISHIPPING')}}
|
||||
<div class="address-form-multishipping">
|
||||
<div class="button_multishipping_mode" id="multishipping_mode_box">
|
||||
<div class="title">{l s='Multi-shipping'}</div>
|
||||
<div class="description">
|
||||
<input type="checkbox" id="multishipping_mode_checkbox" onchange="multishippingMode(this); return false;"/><label for="multishipping_mode_checkbox">{l s='I want to specify a delivery address for each products I order.'}</label>
|
||||
</div>
|
||||
<div class="description_off">
|
||||
<a href="{$link->getPageLink('order-opc', true, NULL, 'ajax=1&multi-shipping=1&method=multishipping')}" id="link_multishipping_form" title="{l s='Choose the delivery addresses'}">
|
||||
{l s='Specify a delivery address for each products.'}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
{if $is_multi_address_delivery}
|
||||
var multishipping_mode = true;
|
||||
{else}
|
||||
var multishipping_mode = false;
|
||||
{/if}
|
||||
</script>
|
||||
</div>
|
||||
<div class="description_off">
|
||||
<a href="{$link->getPageLink('order-opc', true, NULL, 'ajax=1&multi-shipping=1&method=multishipping')}" id="link_multishipping_form" title="{l s='Choose the delivery addresses'}">
|
||||
{l s='Specify a delivery address for each products.'}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
{if $is_multi_address_delivery}
|
||||
var multishipping_mode = true;
|
||||
{else}
|
||||
var multishipping_mode = false;
|
||||
{/if}
|
||||
</script>
|
||||
</div>
|
||||
{/if}
|
||||
<div id="opc_account" class="opc-main-block">
|
||||
<div id="opc_account-overlay" class="opc-overlay" style="display: none;"></div>
|
||||
{/if}
|
||||
|
||||
@@ -404,7 +404,9 @@
|
||||
<p class="cart_navigation">
|
||||
{if !$opc}
|
||||
<a href="{if $back}{$link->getPageLink('order', true, NULL, 'step=1&back={$back}')}{else}{$link->getPageLink('order', true, NULL, 'step=1')}{/if}" class="exclusive" title="{l s='Next'}">{l s='Next'} »</a>
|
||||
<a href="{if $back}{$link->getPageLink('order', true, NULL, 'step=1&back={$back}')}{else}{$link->getPageLink('order', true, NULL, 'step=1')}{/if}&multi-shipping=1" class="multishipping-button exclusive" title="{l s='Multi-shipping'}">{l s='Multi-shipping'} »</a>
|
||||
{if {Configuration::get('PS_ALLOW_MULTISHIPPING')}}
|
||||
<a href="{if $back}{$link->getPageLink('order', true, NULL, 'step=1&back={$back}')}{else}{$link->getPageLink('order', true, NULL, 'step=1')}{/if}&multi-shipping=1" class="multishipping-button exclusive" title="{l s='Multi-shipping'}">{l s='Multi-shipping'} »</a>
|
||||
{/if}
|
||||
{/if}
|
||||
<a href="{if (isset($smarty.server.HTTP_REFERER) && strstr($smarty.server.HTTP_REFERER, 'order.php')) || !isset($smarty.server.HTTP_REFERER)}{$link->getPageLink('index')}', {else}{$smarty.server.HTTP_REFERER|escape:'htmlall':'UTF-8'|secureReferrer}{/if}" class="button_large" title="{l s='Continue shopping'}">« {l s='Continue shopping'}</a>
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user