// Merging multishipping branche on 1.5
This commit is contained in:
@@ -361,6 +361,8 @@ table.std {
|
||||
.std tr.alternate_item td,
|
||||
.std tr.alternate_item th { background-color: #f1f2f4 }
|
||||
.std tbody td,.std tfoot td { border-top: 1px solid #bdc2c9 }
|
||||
.std tbody tr.shipping-address td,.std tfoot tr.shipping-address td { border-top: none }
|
||||
.std tbody tr.shipping-address td.label,.std tfoot tr.shipping-address td.label { text-align: right; }
|
||||
.std thead th {
|
||||
background-color: transparent;
|
||||
background-image: url('../img/table_header.gif');
|
||||
@@ -1024,10 +1026,13 @@ p.cart_navigation .button,
|
||||
p.cart_navigation .exclusive,
|
||||
p.cart_navigation .exclusive_large,
|
||||
p.cart_navigation .exclusive_large_disabled { float: right }
|
||||
p.cart_navigation .multishipping-button { margin-right: 10px }
|
||||
p.cart_navigation_extra {
|
||||
text-align: center;
|
||||
width: auto
|
||||
}
|
||||
.address-form-multishipping { padding: 10px; }
|
||||
.address-form-multishipping a { float: none; margin-left: 210px; }
|
||||
form.std p.cart_navigation span {
|
||||
float: none;
|
||||
text-align: left;
|
||||
@@ -1044,6 +1049,7 @@ form.std p.cart_navigation span {
|
||||
font-size: 1em;
|
||||
text-decoration: none
|
||||
}
|
||||
tr.cart_item td .cart_address_delivery { width: 100px; margin-right: 10px; }
|
||||
tr.cart_item td { padding: 0.5em 0 }
|
||||
td.cart_product a { margin: 0 0.6em }
|
||||
td.cart_product a img {
|
||||
@@ -1099,23 +1105,13 @@ tr.cart_total_price { font-weight: bold }
|
||||
cursor:pointer;
|
||||
}
|
||||
#order form#voucher h4,
|
||||
#order form#voucher p,
|
||||
#order form#voucher .button { display: inline }
|
||||
#order form#voucher p,
|
||||
#order form#voucher .button { display: inline }
|
||||
#order form#voucher h4 {
|
||||
float: left;
|
||||
line-height: 1.5em;
|
||||
margin-right: 6em
|
||||
}
|
||||
#order #order_carrier {
|
||||
clear: both;
|
||||
margin-top: 1em;
|
||||
border: 1px solid #bdc2c9;
|
||||
padding: 0.5em
|
||||
}
|
||||
#order #order_carrier h4 {
|
||||
width: 50%;
|
||||
display: inline
|
||||
}
|
||||
#order #order_carrier img { vertical-align: middle }
|
||||
#order #order_carrier span { margin: 0 0.2em }
|
||||
#order #gift_div { display: none }
|
||||
@@ -1124,6 +1120,65 @@ tr.cart_total_price { font-weight: bold }
|
||||
width: 100%;
|
||||
margin: 1em 0
|
||||
}
|
||||
#order .delivery_options_address {
|
||||
width: 541px;
|
||||
margin-left: 7px;
|
||||
}
|
||||
#order .delivery_options_address h3 {
|
||||
background: url("../img/table_header.gif") no-repeat;
|
||||
background: url("http://prestashop15.localhost/themes/prestashop/css/../img/table_header.gif") no-repeat;
|
||||
color: #374853;
|
||||
font-weight: bold;
|
||||
height: 14px;
|
||||
padding: 5px 10px;
|
||||
margin: 10px 0 0 0;
|
||||
}
|
||||
#order .delivery_option_radio {
|
||||
float: left;
|
||||
margin-top: 12px;
|
||||
}
|
||||
#order .delivery_option label {
|
||||
display: block;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
#order .delivery_option label > table.resume {
|
||||
width: 522px;
|
||||
height: 40px;
|
||||
}
|
||||
#order .delivery_option.item {
|
||||
background: #FAFAFA;
|
||||
}
|
||||
#order .delivery_option.alternate_item {
|
||||
background: #F1F2F4;
|
||||
border-top: 1px solid #BDC2C9;
|
||||
}
|
||||
#order .delivery_option label > table.resume td {
|
||||
padding: 0 8px;
|
||||
}
|
||||
#order .delivery_option label > table.resume td + td {
|
||||
text-align: left;
|
||||
width: 380px;
|
||||
}
|
||||
#order .delivery_option label > table.resume td + td + td {
|
||||
text-align: right;
|
||||
width: 100px;
|
||||
}
|
||||
#order .delivery_options_address .delivery_option_logo {
|
||||
text-align: center;
|
||||
width: 100px;
|
||||
}
|
||||
#order .delivery_option_icon {
|
||||
}
|
||||
#order .delivery_option_price {
|
||||
}
|
||||
#order .delivery_options_address .delivery_option_logo img { height: 40px; }
|
||||
#order .delivery_option_carrier {
|
||||
border: 1px solid #BDC2C9;
|
||||
background: white;
|
||||
margin: 5px 20px;
|
||||
padding: 5px;
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
#order-opc tfoot p {
|
||||
margin: 0;
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
<a class="color-myaccount" href="javascript:showOrder(1, {$order.id_order|intval}, 'order-detail');">{l s='#'}{$order.id_order|string_format:"%06d"}</a>
|
||||
</td>
|
||||
<td class="history_date bold">{dateFormat date=$order.date_add full=0}</td>
|
||||
<td class="history_price"><span class="price">{displayPrice price=$order.total_paid_real currency=$order.id_currency no_utf8=false convert=false}</span></td>
|
||||
<td class="history_price"><span class="price">{displayPrice price=$order.total_paid currency=$order.id_currency no_utf8=false convert=false}</span></td>
|
||||
<td class="history_method">{$order.payment|escape:'htmlall':'UTF-8'}</td>
|
||||
<td class="history_state">{if isset($order.order_state)}{$order.order_state|escape:'htmlall':'UTF-8'}{/if}</td>
|
||||
<td class="history_invoice">
|
||||
|
||||
@@ -29,13 +29,186 @@ $(document).ready(function()
|
||||
// If block cart isn't used, we don't bind the handle actions
|
||||
if (window.ajaxCart !== undefined)
|
||||
{
|
||||
$('.cart_quantity_up').unbind('click').click(function(){ upQuantity($(this).attr('id').replace('cart_quantity_up_', '')); return false; });
|
||||
$('.cart_quantity_down').unbind('click').click(function(){ downQuantity($(this).attr('id').replace('cart_quantity_down_', '')); return false; });
|
||||
$('.cart_quantity_delete' ).unbind('click').click(function(){ deletProductFromSummary($(this).attr('id')); return false; });
|
||||
$('.cart_quantity_up').unbind('click').live('click', function(){ upQuantity($(this).attr('id').replace('cart_quantity_up_', '')); return false; });
|
||||
$('.cart_quantity_down').unbind('click').live('click', function(){ downQuantity($(this).attr('id').replace('cart_quantity_down_', '')); return false; });
|
||||
$('.cart_quantity_delete' ).unbind('click').live('click', function(){ deleteProductFromSummary($(this).attr('id')); return false; });
|
||||
$('.cart_quantity_input').typeWatch({ highlight: true, wait: 600, captureLength: 0, callback: updateQty });
|
||||
|
||||
$('.cart_address_delivery').live('change', function(){ changeAddressDelivery($(this)); });
|
||||
}
|
||||
else
|
||||
{
|
||||
$('.cart_address_delivery').change(function(){ submit(); });
|
||||
}
|
||||
cleanSelectAddressDelivery();
|
||||
});
|
||||
|
||||
function cleanSelectAddressDelivery()
|
||||
{
|
||||
if (window.ajaxCart !== undefined)
|
||||
{
|
||||
//Removing "Ship to an other address" from the address delivery select option if there is not enought address
|
||||
$.each($('.cart_address_delivery'), function(it, item)
|
||||
{
|
||||
var options = $(item).find('option');
|
||||
var address_count = 0;
|
||||
|
||||
var ids = $(item).attr('id').split('_');
|
||||
var id_product = ids[3];
|
||||
var id_product_attribute = ids[4];
|
||||
var id_address_delivery = ids[5];
|
||||
|
||||
$.each(options, function(i) {
|
||||
if ($(options[i]).val() > 0
|
||||
&& ($('#product_' + id_product + '_' + id_product_attribute + '_0_' + $(options[i]).val()).length == 0 // Check the address is not already used for a similare products
|
||||
|| id_address_delivery == $(options[i]).val()
|
||||
)
|
||||
)
|
||||
address_count++;
|
||||
});
|
||||
|
||||
if (address_count < 2) // Need at least two address to allow skipping products to multiple address
|
||||
$($(item).find('option[value=-2]')).remove();
|
||||
else if($($(item).find('option[value=-2]')).length == 0)
|
||||
$(item).append($('<option value="-2">Ship to an other address</option>')); // @todo add translation
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function changeAddressDelivery(obj)
|
||||
{
|
||||
var ids = obj.attr('id').split('_');
|
||||
var id_product = ids[3];
|
||||
var id_product_attribute = ids[4];
|
||||
var old_id_address_delivery = ids[5];
|
||||
var new_id_address_delivery = obj.val();
|
||||
|
||||
if (new_id_address_delivery == old_id_address_delivery)
|
||||
return;
|
||||
|
||||
if (new_id_address_delivery > 0) // Change the delivery address
|
||||
{
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: baseDir,
|
||||
async: true,
|
||||
cache: false,
|
||||
dataType: 'json',
|
||||
data: 'controller=cart&ajax=true&changeAddressDelivery&summary&id_product='+id_product
|
||||
+'&id_product_attribute='+id_product_attribute
|
||||
+'&old_id_address_delivery='+old_id_address_delivery
|
||||
+'&new_id_address_delivery='+new_id_address_delivery
|
||||
+'&token='+static_token,
|
||||
success: function(jsonData)
|
||||
{
|
||||
// The product exist
|
||||
if ($('#product_'+id_product+'_'+id_product_attribute+'_0_'+new_id_address_delivery).length)
|
||||
{
|
||||
updateCustomizedDatas(jsonData.customizedDatas);
|
||||
updateCartSummary(jsonData.summary);
|
||||
updateHookShoppingCart(jsonData.HOOK_SHOPPING_CART);
|
||||
updateHookShoppingCartExtra(jsonData.HOOK_SHOPPING_CART_EXTRA);
|
||||
if (jsonData.carriers != null)
|
||||
updateCarrierList(jsonData);
|
||||
|
||||
// @todo reverse the remove order
|
||||
// This effect remove the current line, but it's better to remove the other one, and refresshing this one
|
||||
$('#product_'+id_product+'_'+id_product_attribute+'_0_'+old_id_address_delivery).remove();
|
||||
|
||||
// @todo improve customization upgrading
|
||||
$('.product_'+id_product+'_'+id_product_attribute+'_0_'+old_id_address_delivery).remove();
|
||||
}
|
||||
|
||||
if (window.ajaxCart !== undefined)
|
||||
ajaxCart.refresh();
|
||||
updateAddressId(id_product, id_product_attribute, old_id_address_delivery, new_id_address_delivery);
|
||||
cleanSelectAddressDelivery();
|
||||
}
|
||||
});
|
||||
}
|
||||
else if (new_id_address_delivery == -1) // Adding a new address
|
||||
window.location = $($('.address_add a')[0]).attr('href');
|
||||
else if (new_id_address_delivery == -2) // Add a new line for this product
|
||||
{
|
||||
// This test is will not usefull in the future
|
||||
if (old_id_address_delivery == 0)
|
||||
{
|
||||
alert('Please select first an address'); // @todo translate
|
||||
return false;
|
||||
}
|
||||
|
||||
// Get new address to deliver
|
||||
var id_address_delivery = 0;
|
||||
var options = $('#select_address_delivery_'+id_product+'_'+id_product_attribute+'_'+old_id_address_delivery+' option');
|
||||
$.each(options, function(i) {
|
||||
if ($(options[i]).val() > 0 && $(options[i]).val() != old_id_address_delivery
|
||||
&& $('#product_' + id_product + '_' + id_product_attribute + '_0_' + $(options[i]).val()).length == 0 // Check the address is not already used for a similare products
|
||||
)
|
||||
{
|
||||
id_address_delivery = $(options[i]).val();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: baseDir,
|
||||
async: true,
|
||||
cache: false,
|
||||
dataType: 'json',
|
||||
context: obj,
|
||||
data: 'controller=cart&ajax=true&duplicate&summary&id_product='+id_product+'&id_product_attribute='+id_product_attribute+'&id_address_delivery='+old_id_address_delivery+'&new_id_address_delivery='+id_address_delivery+'&token='+static_token ,
|
||||
success: function(jsonData)
|
||||
{
|
||||
if (jsonData.error)
|
||||
{
|
||||
alert(jsonData.reason);
|
||||
return;
|
||||
}
|
||||
|
||||
var line = $('#product_' + id_product+'_' + id_product_attribute + '_0_' + old_id_address_delivery);
|
||||
var new_line = line.clone();
|
||||
updateAddressId(id_product, id_product_attribute, old_id_address_delivery, id_address_delivery, new_line);
|
||||
line.after(new_line);
|
||||
new_line.find('input[name=quantity_' + id_product+'_' + id_product_attribute + '_0_' + old_id_address_delivery + '_hidden]')
|
||||
.val(1);
|
||||
new_line.find('.cart_quantity_input')
|
||||
.val(1);
|
||||
$('#select_address_delivery_' + id_product+'_' + id_product_attribute + '_' + old_id_address_delivery).val(old_id_address_delivery);
|
||||
$('#select_address_delivery_' + id_product+'_' + id_product_attribute + '_' + id_address_delivery).val(id_address_delivery);
|
||||
|
||||
|
||||
cleanSelectAddressDelivery();
|
||||
|
||||
updateCartSummary(jsonData.summary);
|
||||
|
||||
if (window.ajaxCart !== undefined)
|
||||
ajaxCart.refresh();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function updateAddressId(id_product, id_product_attribute, old_id_address_delivery, id_address_delivery, line)
|
||||
{
|
||||
if (typeof(line) == 'undefined')
|
||||
var line = $('#product_' + id_product+'_' + id_product_attribute + '_0_' + old_id_address_delivery);
|
||||
|
||||
line.attr('id', 'product_' + id_product+'_' + id_product_attribute + '_0_' + id_address_delivery);
|
||||
line.find('.cart_quantity_input')
|
||||
.attr('name', 'quantity_' + id_product+'_' + id_product_attribute + '_0_' + id_address_delivery);
|
||||
line.find('input[name=quantity_' + id_product+'_' + id_product_attribute + '_0_' + old_id_address_delivery + '_hidden]')
|
||||
.attr('name', 'quantity_' + id_product+'_' + id_product_attribute + '_0_' + id_address_delivery + '_hidden');
|
||||
line.find('#cart_quantity_down_' + id_product+'_' + id_product_attribute + '_0_' + old_id_address_delivery)
|
||||
.attr('id', 'cart_quantity_down_' + id_product+'_' + id_product_attribute + '_0_' + id_address_delivery);
|
||||
line.find('#cart_quantity_up_' + id_product+'_' + id_product_attribute + '_0_' + old_id_address_delivery)
|
||||
.attr('id', 'cart_quantity_up_' + id_product+'_' + id_product_attribute + '_0_' + id_address_delivery);
|
||||
line.find('#' + id_product+'_' + id_product_attribute + '_0_' + old_id_address_delivery)
|
||||
.attr('id', id_product+'_' + id_product_attribute + '_0_' + id_address_delivery);
|
||||
line.find('#select_address_delivery_' + id_product+'_' + id_product_attribute + '_' + old_id_address_delivery)
|
||||
.attr('id', 'select_address_delivery_' + id_product+'_' + id_product_attribute + '_' + id_address_delivery);
|
||||
}
|
||||
|
||||
function updateQty(val)
|
||||
{
|
||||
var id = $(this.el).attr('name');
|
||||
@@ -48,19 +221,20 @@ function updateQty(val)
|
||||
var QtyToUp = parseInt(input) - parseInt(hidden);
|
||||
|
||||
if (parseInt(QtyToUp) > 0)
|
||||
upQuantity(id.replace('quantity_', ''),QtyToUp);
|
||||
upQuantity(id.replace('quantity_', ''), QtyToUp);
|
||||
else if(parseInt(QtyToUp) < 0)
|
||||
downQuantity(id.replace('quantity_', ''),QtyToUp);
|
||||
downQuantity(id.replace('quantity_', ''), QtyToUp);
|
||||
}
|
||||
else
|
||||
$('input[name='+ id +']').val($('input[name='+ id +'_hidden]').val());
|
||||
}
|
||||
|
||||
function deletProductFromSummary(id)
|
||||
function deleteProductFromSummary(id)
|
||||
{
|
||||
var customizationId = 0;
|
||||
var productId = 0;
|
||||
var productAttributeId = 0;
|
||||
var id_address_delivery = 0;
|
||||
var ids = 0;
|
||||
ids = id.split('_');
|
||||
productId = parseInt(ids[0]);
|
||||
@@ -68,34 +242,36 @@ function deletProductFromSummary(id)
|
||||
productAttributeId = parseInt(ids[1]);
|
||||
if (typeof(ids[2]) != 'undefined')
|
||||
customizationId = parseInt(ids[2]);
|
||||
if (typeof(ids[3]) != 'undefined')
|
||||
id_address_delivery = parseInt(ids[3]);
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: baseDir + 'cart.php',
|
||||
async: true,
|
||||
cache: false,
|
||||
dataType: 'json',
|
||||
data: 'ajax=true&delete&summary&id_product='+productId+'&ipa='+productAttributeId+ ( (customizationId != 0) ? '&id_customization='+customizationId : '') + '&token=' + static_token ,
|
||||
success: function(jsonData)
|
||||
{
|
||||
if (jsonData.hasError)
|
||||
{
|
||||
var errors = '';
|
||||
for(error in jsonData.errors)
|
||||
//IE6 bug fix
|
||||
if(error != 'indexOf')
|
||||
errors += jsonData.errors[error] + "\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (parseInt(jsonData.summary.products.length) == 0)
|
||||
{
|
||||
$('#center_column').children().each(function() {
|
||||
if ($(this).attr('id') != 'emptyCartWarning' && $(this).attr('class') != 'breadcrumb' && $(this).attr('id') != 'cart_title')
|
||||
{
|
||||
$(this).fadeOut('slow', function () {
|
||||
$(this).remove();
|
||||
});
|
||||
}
|
||||
type: 'GET',
|
||||
url: baseDir,
|
||||
async: true,
|
||||
cache: false,
|
||||
dataType: 'json',
|
||||
data: 'controller=cart&ajax=true&delete&summary&id_product='+productId+'&ipa='+productAttributeId+'&id_address_delivery='+id_address_delivery+ ( (customizationId != 0) ? '&id_customization='+customizationId : '') + '&token=' + static_token ,
|
||||
success: function(jsonData)
|
||||
{
|
||||
if (jsonData.hasError)
|
||||
{
|
||||
var errors = '';
|
||||
for(error in jsonData.errors)
|
||||
//IE6 bug fix
|
||||
if(error != 'indexOf')
|
||||
errors += jsonData.errors[error] + "\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (parseInt(jsonData.summary.products.length) == 0)
|
||||
{
|
||||
$('#center_column').children().each(function() {
|
||||
if ($(this).attr('id') != 'emptyCartWarning' && $(this).attr('class') != 'breadcrumb' && $(this).attr('id') != 'cart_title')
|
||||
{
|
||||
$(this).fadeOut('slow', function () {
|
||||
$(this).remove();
|
||||
});
|
||||
}
|
||||
});
|
||||
$('#summary_products_label').remove();
|
||||
$('#emptyCartWarning').fadeIn('slow');
|
||||
@@ -104,6 +280,7 @@ function deletProductFromSummary(id)
|
||||
{
|
||||
$('#product_'+ id).fadeOut('slow', function() {
|
||||
$(this).remove();
|
||||
cleanSelectAddressDelivery();
|
||||
});
|
||||
|
||||
var exist = false;
|
||||
@@ -123,11 +300,10 @@ function deletProductFromSummary(id)
|
||||
updateCustomizedDatas(jsonData.customizedDatas);
|
||||
if (jsonData.carriers != null)
|
||||
updateCarrierList(jsonData);
|
||||
|
||||
}
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {alert("TECHNICAL ERROR: unable to save update quantity \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus);}
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {alert("TECHNICAL ERROR: unable to save update quantity \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus);}
|
||||
});
|
||||
}
|
||||
|
||||
function upQuantity(id, qty)
|
||||
@@ -137,6 +313,7 @@ function upQuantity(id, qty)
|
||||
var customizationId = 0;
|
||||
var productId = 0;
|
||||
var productAttributeId = 0;
|
||||
var id_address_delivery = 0;
|
||||
var ids = 0;
|
||||
ids = id.split('_');
|
||||
productId = parseInt(ids[0]);
|
||||
@@ -144,37 +321,39 @@ function upQuantity(id, qty)
|
||||
productAttributeId = parseInt(ids[1]);
|
||||
if (typeof(ids[2]) != 'undefined')
|
||||
customizationId = parseInt(ids[2]);
|
||||
if (typeof(ids[3]) != 'undefined')
|
||||
id_address_delivery = parseInt(ids[3]);
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: baseDir + 'cart.php',
|
||||
async: true,
|
||||
cache: false,
|
||||
dataType: 'json',
|
||||
data: 'ajax=true&add&getproductprice&summary&id_product='+productId+'&ipa='+productAttributeId + ( (customizationId != 0) ? '&id_customization='+customizationId : '') + '&qty='+qty+'&token=' + static_token ,
|
||||
success: function(jsonData)
|
||||
{
|
||||
if (jsonData.hasError)
|
||||
{
|
||||
var errors = '';
|
||||
for(error in jsonData.errors)
|
||||
//IE6 bug fix
|
||||
if(error != 'indexOf')
|
||||
errors += jsonData.errors[error] + "\n";
|
||||
alert(errors);
|
||||
$('input[name=quantity_'+ id +']').val($('input[name=quantity_'+ id +'_hidden]').val());
|
||||
}
|
||||
else
|
||||
{
|
||||
updateCustomizedDatas(jsonData.customizedDatas);
|
||||
updateCartSummary(jsonData.summary);
|
||||
updateHookShoppingCart(jsonData.HOOK_SHOPPING_CART);
|
||||
type: 'GET',
|
||||
url: baseDir,
|
||||
async: true,
|
||||
cache: false,
|
||||
dataType: 'json',
|
||||
data: 'controller=cart&ajax=true&add&getproductprice&summary&id_product='+productId+'&ipa='+productAttributeId+'&id_address_delivery='+id_address_delivery + ( (customizationId != 0) ? '&id_customization='+customizationId : '') + '&qty='+qty+'&token=' + static_token ,
|
||||
success: function(jsonData)
|
||||
{
|
||||
if (jsonData.hasError)
|
||||
{
|
||||
var errors = '';
|
||||
for(error in jsonData.errors)
|
||||
//IE6 bug fix
|
||||
if(error != 'indexOf')
|
||||
errors += jsonData.errors[error] + "\n";
|
||||
alert(errors);
|
||||
$('input[name=quantity_'+ id +']').val($('input[name=quantity_'+ id +'_hidden]').val());
|
||||
}
|
||||
else
|
||||
{
|
||||
updateCustomizedDatas(jsonData.customizedDatas);
|
||||
updateCartSummary(jsonData.summary);
|
||||
updateHookShoppingCart(jsonData.HOOK_SHOPPING_CART);
|
||||
updateHookShoppingCartExtra(jsonData.HOOK_SHOPPING_CART_EXTRA);
|
||||
if (jsonData.carriers != null)
|
||||
if (jsonData.carriers != null)
|
||||
updateCarrierList(jsonData);
|
||||
}
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {alert("TECHNICAL ERROR: unable to save update quantity \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus);}
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {alert("TECHNICAL ERROR: unable to save update quantity \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus);}
|
||||
});
|
||||
}
|
||||
|
||||
function downQuantity(id, qty)
|
||||
@@ -187,10 +366,11 @@ function downQuantity(id, qty)
|
||||
newVal = val - 1;
|
||||
}
|
||||
else if (qty < 0)
|
||||
qty = -qty;
|
||||
qty = -qty;
|
||||
var customizationId = 0;
|
||||
var productId = 0;
|
||||
var productAttributeId = 0;
|
||||
var id_address_delivery = 0;
|
||||
var ids = 0;
|
||||
if (newVal > 0)
|
||||
{
|
||||
@@ -200,42 +380,44 @@ function downQuantity(id, qty)
|
||||
productAttributeId = parseInt(ids[1]);
|
||||
if (typeof(ids[2]) != 'undefined')
|
||||
customizationId = parseInt(ids[2]);
|
||||
if (typeof(ids[3]) != 'undefined')
|
||||
id_address_delivery = parseInt(ids[3]);
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: baseDir + 'cart.php',
|
||||
async: true,
|
||||
cache: false,
|
||||
dataType: 'json',
|
||||
data: 'ajax=true&add&getproductprice&summary&id_product='+productId+'&ipa='+productAttributeId+'&op=down' + ( (customizationId != 0) ? '&id_customization='+customizationId : '') + '&qty='+qty+'&token=' + static_token ,
|
||||
success: function(jsonData)
|
||||
{
|
||||
if (jsonData.hasError)
|
||||
{
|
||||
var errors = '';
|
||||
for(error in jsonData.errors)
|
||||
//IE6 bug fix
|
||||
if(error != 'indexOf')
|
||||
errors += jsonData.errors[error] + "\n";
|
||||
alert(errors);
|
||||
$('input[name=quantity_'+ id +']').val($('input[name=quantity_'+ id +'_hidden]').val());
|
||||
}
|
||||
else
|
||||
{
|
||||
updateCustomizedDatas(jsonData.customizedDatas);
|
||||
updateCartSummary(jsonData.summary);
|
||||
updateHookShoppingCart(jsonData.HOOK_SHOPPING_CART);
|
||||
type: 'GET',
|
||||
url: baseDir,
|
||||
async: true,
|
||||
cache: false,
|
||||
dataType: 'json',
|
||||
data: 'controller=cart&ajax=true&add&getproductprice&summary&id_product='+productId+'&ipa='+productAttributeId+'&id_address_delivery='+id_address_delivery+'&op=down' + ( (customizationId != 0) ? '&id_customization='+customizationId : '') + '&qty='+qty+'&token=' + static_token ,
|
||||
success: function(jsonData)
|
||||
{
|
||||
if (jsonData.hasError)
|
||||
{
|
||||
var errors = '';
|
||||
for(error in jsonData.errors)
|
||||
//IE6 bug fix
|
||||
if(error != 'indexOf')
|
||||
errors += jsonData.errors[error] + "\n";
|
||||
alert(errors);
|
||||
$('input[name=quantity_'+ id +']').val($('input[name=quantity_'+ id +'_hidden]').val());
|
||||
}
|
||||
else
|
||||
{
|
||||
updateCustomizedDatas(jsonData.customizedDatas);
|
||||
updateCartSummary(jsonData.summary);
|
||||
updateHookShoppingCart(jsonData.HOOK_SHOPPING_CART);
|
||||
updateHookShoppingCartExtra(jsonData.HOOK_SHOPPING_CART_EXTRA);
|
||||
if (jsonData.carriers != null)
|
||||
if (jsonData.carriers != null)
|
||||
updateCarrierList(jsonData);
|
||||
}
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {alert("TECHNICAL ERROR: unable to save update quantity \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus);}
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {alert("TECHNICAL ERROR: unable to save update quantity \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus);}
|
||||
});
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
deletProductFromSummary(id);
|
||||
deleteProductFromSummary(id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -253,7 +435,9 @@ function updateCartSummary(json)
|
||||
// if reduction, we need to show it in the cart by showing the initial price above the current one
|
||||
var reduction = json.products[i].reduction_applies;
|
||||
var initial_price_text = '';
|
||||
initial_price = formatCurrency(json.products[i].price_without_quantity_discount, currencyFormat, currencySign, currencyBlank);
|
||||
initial_price = '';
|
||||
if (typeof(json.products[i].price_without_quantity_discount) != 'undefined')
|
||||
initial_price = formatCurrency(json.products[i].price_without_quantity_discount, currencyFormat, currencySign, currencyBlank);
|
||||
var current_price = '';
|
||||
if (priceDisplayMethod != 0)
|
||||
current_price = formatCurrency(json.products[i].price, currencyFormat, currencySign, currencyBlank);
|
||||
@@ -273,34 +457,37 @@ function updateCartSummary(json)
|
||||
|
||||
if (priceDisplayMethod != 0)
|
||||
{
|
||||
$('#cart_block_product_'+key_for_blockcart+' span.price').html(formatCurrency(json.products[i].total, currencyFormat, currencySign, currencyBlank));
|
||||
$('#product_price_'+json.products[i].id_product+'_'+json.products[i].id_product_attribute).html(initial_price_text+current_price);
|
||||
$('#total_product_price_'+json.products[i].id_product+'_'+json.products[i].id_product_attribute).html(formatCurrency(json.products[i].total, currencyFormat, currencySign, currencyBlank));
|
||||
$('#cart_block_product_'+key_for_blockcart+' span.price').html(formatCurrency(json.products[i].total, currencyFormat, currencySign, currencyBlank));
|
||||
$('#product_price_'+json.products[i].id_product+'_'+json.products[i].id_product_attribute+'_'+json.products[i].id_address_delivery).html(initial_price_text+current_price);
|
||||
$('#total_product_price_'+json.products[i].id_product+'_'+json.products[i].id_product_attribute+'_'+json.products[i].id_address_delivery).html(formatCurrency(json.products[i].total, currencyFormat, currencySign, currencyBlank));
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#cart_block_product_'+key_for_blockcart+' span.price').html(formatCurrency(json.products[i].total_wt, currencyFormat, currencySign, currencyBlank));
|
||||
$('#product_price_'+json.products[i].id_product+'_'+json.products[i].id_product_attribute).html(initial_price_text+current_price);
|
||||
$('#total_product_price_'+json.products[i].id_product+'_'+json.products[i].id_product_attribute).html(formatCurrency(json.products[i].total_wt, currencyFormat, currencySign, currencyBlank));
|
||||
$('#cart_block_product_'+key_for_blockcart+' span.price').html(formatCurrency(json.products[i].total_wt, currencyFormat, currencySign, currencyBlank));
|
||||
$('#product_price_'+json.products[i].id_product+'_'+json.products[i].id_product_attribute+'_'+json.products[i].id_address_delivery).html(initial_price_text+current_price);
|
||||
$('#total_product_price_'+json.products[i].id_product+'_'+json.products[i].id_product_attribute+'_'+json.products[i].id_address_delivery).html(formatCurrency(json.products[i].total_wt, currencyFormat, currencySign, currencyBlank));
|
||||
}
|
||||
|
||||
nbrProducts += parseInt(json.products[i].cart_quantity);
|
||||
|
||||
if(json.products[i].id_customization == null)
|
||||
{
|
||||
$('input[name=quantity_'+json.products[i].id_product+'_'+json.products[i].id_product_attribute+(json.products[i].id_customization != null ? '_'+json.products[i].id_customization : '')+']').val(json.products[i].cart_quantity);
|
||||
$('input[name=quantity_'+json.products[i].id_product+'_'+json.products[i].id_product_attribute+(json.products[i].id_customization != null ? '_'+json.products[i].id_customization : '')+'_hidden]').val(json.products[i].cart_quantity);
|
||||
$('input[name=quantity_'+json.products[i].id_product+'_'+json.products[i].id_product_attribute+'_0_'+json.products[i].id_address_delivery+']').val(json.products[i].cart_quantity);
|
||||
$('input[name=quantity_'+json.products[i].id_product+'_'+json.products[i].id_product_attribute+'_0_'+json.products[i].id_address_delivery+'_hidden]').val(json.products[i].cart_quantity);
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#cart_quantity_custom_'+json.products[i].id_product+'_'+json.products[i].id_product_attribute).html(json.products[i].cart_quantity);
|
||||
//$('input[name=quantity_'+json.products[i].id_product+'_'+json.products[i].id_product_attribute+'_'+json.products[i].id_customization+'_'+json.products[i].id_address_delivery+']')
|
||||
// .val(json.products[i].cart_quantity);
|
||||
$('#cart_quantity_custom_'+json.products[i].id_product+'_'+json.products[i].id_product_attribute+'_'+json.products[i].id_address_delivery)
|
||||
.html(json.products[i].cart_quantity);
|
||||
}
|
||||
|
||||
// Show / hide quantity button if minimal quantity
|
||||
if (parseInt(json.products[i].minimal_quantity) == parseInt(json.products[i].cart_quantity) && json.products[i].minimal_quantity != 1)
|
||||
$('#cart_quantity_down_'+json.products[i].id_product+'_'+json.products[i].id_product_attribute+(json.products[i].id_customization != null ? '_'+json.products[i].id_customization : '')).fadeTo('slow',0.3);
|
||||
$('#cart_quantity_down_'+json.products[i].id_product+'_'+json.products[i].id_product_attribute+Number(json.products[i].id_customization)+'_'+json.products[i].id_address_delivery).fadeTo('slow',0.3);
|
||||
else
|
||||
$('#cart_quantity_down_'+json.products[i].id_product+'_'+json.products[i].id_product_attribute+(json.products[i].id_customization != null ? '_'+json.products[i].id_customization : '')).fadeTo('slow',1);
|
||||
$('#cart_quantity_down_'+json.products[i].id_product+'_'+json.products[i].id_product_attribute+Number(json.products[i].id_customization)+'_'+json.products[i].id_address_delivery).fadeTo('slow',1);
|
||||
|
||||
}
|
||||
|
||||
@@ -342,16 +529,16 @@ function updateCartSummary(json)
|
||||
}
|
||||
|
||||
// Block cart
|
||||
if (priceDisplayMethod != 0)
|
||||
if (priceDisplayMethod != 0)
|
||||
{
|
||||
$('#cart_block_shipping_cost').html(formatCurrency(json.total_shipping_tax_exc, currencyFormat, currencySign, currencyBlank));
|
||||
$('#cart_block_wrapping_cost').html(formatCurrency(json.total_wrapping_tax_exc, currencyFormat, currencySign, currencyBlank));
|
||||
$('#cart_block_total').html(formatCurrency(json.total_price_without_tax, currencyFormat, currencySign, currencyBlank));
|
||||
} else {
|
||||
$('#cart_block_shipping_cost').html(formatCurrency(json.total_shipping, currencyFormat, currencySign, currencyBlank));
|
||||
$('#cart_block_wrapping_cost').html(formatCurrency(json.total_wrapping, currencyFormat, currencySign, currencyBlank));
|
||||
$('#cart_block_total').html(formatCurrency(json.total_price, currencyFormat, currencySign, currencyBlank));
|
||||
}
|
||||
$('#cart_block_shipping_cost').html(formatCurrency(json.total_shipping_tax_exc, currencyFormat, currencySign, currencyBlank));
|
||||
$('#cart_block_wrapping_cost').html(formatCurrency(json.total_wrapping_tax_exc, currencyFormat, currencySign, currencyBlank));
|
||||
$('#cart_block_total').html(formatCurrency(json.total_price_without_tax, currencyFormat, currencySign, currencyBlank));
|
||||
} else {
|
||||
$('#cart_block_shipping_cost').html(formatCurrency(json.total_shipping, currencyFormat, currencySign, currencyBlank));
|
||||
$('#cart_block_wrapping_cost').html(formatCurrency(json.total_wrapping, currencyFormat, currencySign, currencyBlank));
|
||||
$('#cart_block_total').html(formatCurrency(json.total_price, currencyFormat, currencySign, currencyBlank));
|
||||
}
|
||||
|
||||
$('#cart_block_tax_cost').html(formatCurrency(json.total_tax, currencyFormat, currencySign, currencyBlank));
|
||||
$('.ajax_cart_quantity').html(nbrProducts);
|
||||
@@ -359,9 +546,9 @@ function updateCartSummary(json)
|
||||
// Cart summary
|
||||
$('#summary_products_quantity').html(nbrProducts+' '+(nbrProducts > 1 ? txtProducts : txtProduct));
|
||||
if (priceDisplayMethod != 0)
|
||||
$('#total_product').html(formatCurrency(json.total_products, currencyFormat, currencySign, currencyBlank));
|
||||
else
|
||||
$('#total_product').html(formatCurrency(json.total_products_wt, currencyFormat, currencySign, currencyBlank));
|
||||
$('#total_product').html(formatCurrency(json.total_products, currencyFormat, currencySign, currencyBlank));
|
||||
else
|
||||
$('#total_product').html(formatCurrency(json.total_products_wt, currencyFormat, currencySign, currencyBlank));
|
||||
$('#total_price').html(formatCurrency(json.total_price, currencyFormat, currencySign, currencyBlank));
|
||||
$('#total_price_without_tax').html(formatCurrency(json.total_price_without_tax, currencyFormat, currencySign, currencyBlank));
|
||||
$('#total_tax').html(formatCurrency(json.total_tax, currencyFormat, currencySign, currencyBlank));
|
||||
@@ -372,12 +559,12 @@ function updateCartSummary(json)
|
||||
{
|
||||
$('.cart_total_delivery').fadeIn();
|
||||
if (priceDisplayMethod != 0)
|
||||
{
|
||||
$('#total_shipping').html(formatCurrency(json.total_shipping_tax_exc, currencyFormat, currencySign, currencyBlank));
|
||||
{
|
||||
$('#total_shipping').html(formatCurrency(json.total_shipping_tax_exc, currencyFormat, currencySign, currencyBlank));
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#total_shipping').html(formatCurrency(json.total_shipping, currencyFormat, currencySign, currencyBlank));
|
||||
$('#total_shipping').html(formatCurrency(json.total_shipping, currencyFormat, currencySign, currencyBlank));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -408,10 +595,11 @@ function updateCustomizedDatas(json)
|
||||
for(i in json)
|
||||
for(j in json[i])
|
||||
for(k in json[i][j])
|
||||
{
|
||||
$('input[name=quantity_'+i+'_'+j+'_'+k+'_hidden]').val(json[i][j][k]['quantity']);
|
||||
$('input[name=quantity_'+i+'_'+j+'_'+k+']').val(json[i][j][k]['quantity']);
|
||||
}
|
||||
for(l in json[i][j][k])
|
||||
{
|
||||
$('input[name=quantity_'+i+'_'+j+'_'+l+'_'+k+'_hidden]').val(json[i][j][k][l]['quantity']);
|
||||
$('input[name=quantity_'+i+'_'+j+'_'+l+'_'+k+']').val(json[i][j][k][l]['quantity']);
|
||||
}
|
||||
}
|
||||
|
||||
function updateHookShoppingCart(html)
|
||||
@@ -422,4 +610,17 @@ function updateHookShoppingCart(html)
|
||||
function updateHookShoppingCartExtra(html)
|
||||
{
|
||||
$('#HOOK_SHOPPING_CART_EXTRA').html(html);
|
||||
}
|
||||
}
|
||||
$(document).ready(function() {
|
||||
$.each($('.delivery_option_radio'), function() {
|
||||
if ($(this).attr('checked'))
|
||||
$(this).parent().find('.delivery_option_carrier').show();
|
||||
else
|
||||
$(this).parent().find('.delivery_option_carrier').hide();
|
||||
|
||||
});
|
||||
$('.delivery_option_radio').change(function() {
|
||||
$(this).parent().parent().find('.delivery_option_carrier').hide();
|
||||
$(this).parent().find('.delivery_option_carrier').show();
|
||||
});
|
||||
});
|
||||
@@ -60,7 +60,7 @@ function updateAddressesDisplay(first_view)
|
||||
else
|
||||
{
|
||||
$('#address_invoice_form:hidden').show('fast');
|
||||
if ($('select#id_address_invoice').val())
|
||||
if ($('#id_address_invoice').val())
|
||||
updateAddressDisplay('invoice');
|
||||
else
|
||||
{
|
||||
@@ -82,20 +82,23 @@ function updateAddressDisplay(addressType)
|
||||
if (formatedAddressFieldsValuesList.length <= 0)
|
||||
return false;
|
||||
|
||||
var idAddress = $('select#id_address_' + addressType + '').val();
|
||||
var idAddress = $('#id_address_' + addressType + '').val();
|
||||
buildAddressBlock(idAddress, addressType, $('#address_'+ addressType));
|
||||
|
||||
// change update link
|
||||
var link = $('ul#address_' + addressType + ' li.address_update a').attr('href');
|
||||
var expression = /id_address=\d+/;
|
||||
link = link.replace(expression, 'id_address='+idAddress);
|
||||
$('ul#address_' + addressType + ' li.address_update a').attr('href', link);
|
||||
if (link)
|
||||
{
|
||||
link = link.replace(expression, 'id_address='+idAddress);
|
||||
$('ul#address_' + addressType + ' li.address_update a').attr('href', link);
|
||||
}
|
||||
}
|
||||
|
||||
function updateAddresses()
|
||||
{
|
||||
var idAddress_delivery = $('select#id_address_delivery').val();
|
||||
var idAddress_invoice = $('input[type=checkbox]#addressesAreEquals:checked').length == 1 ? idAddress_delivery : $('select#id_address_invoice').val();
|
||||
var idAddress_delivery = $('#id_address_delivery').val();
|
||||
var idAddress_invoice = $('input[type=checkbox]#addressesAreEquals:checked').length == 1 ? idAddress_delivery : $('#id_address_invoice').val();
|
||||
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
|
||||
@@ -112,8 +112,8 @@ function updatePaymentMethods(json)
|
||||
|
||||
function updateAddressSelection()
|
||||
{
|
||||
var idAddress_delivery = ($('input#opc_id_address_delivery').length == 1 ? $('input#opc_id_address_delivery').val() : $('select#id_address_delivery').val());
|
||||
var idAddress_invoice = ($('input#opc_id_address_invoice').length == 1 ? $('input#opc_id_address_invoice').val() : ($('input[type=checkbox]#addressesAreEquals:checked').length == 1 ? idAddress_delivery : ($('select#id_address_invoice').length == 1 ? $('select#id_address_invoice').val() : idAddress_delivery)));
|
||||
var idAddress_delivery = ($('input#opc_id_address_delivery').length == 1 ? $('input#opc_id_address_delivery').val() : $('#id_address_delivery').val());
|
||||
var idAddress_invoice = ($('input#opc_id_address_invoice').length == 1 ? $('input#opc_id_address_invoice').val() : ($('input[type=checkbox]#addressesAreEquals:checked').length == 1 ? idAddress_delivery : ($('#id_address_invoice').length == 1 ? $('select#id_address_invoice').val() : idAddress_delivery)));
|
||||
|
||||
$('#opc_account-overlay').fadeIn('slow');
|
||||
$('#opc_delivery_methods-overlay').fadeIn('slow');
|
||||
|
||||
@@ -0,0 +1,289 @@
|
||||
{*
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{* Will be deleted for 1.5 version and more *}
|
||||
{if !isset($formatedAddressFieldsValuesList)}
|
||||
{$ignoreList.0 = "id_address"}
|
||||
{$ignoreList.1 = "id_country"}
|
||||
{$ignoreList.2 = "id_state"}
|
||||
{$ignoreList.3 = "id_customer"}
|
||||
{$ignoreList.4 = "id_manufacturer"}
|
||||
{$ignoreList.5 = "id_supplier"}
|
||||
{$ignoreList.6 = "date_add"}
|
||||
{$ignoreList.7 = "date_upd"}
|
||||
{$ignoreList.8 = "active"}
|
||||
{$ignoreList.9 = "deleted"}
|
||||
|
||||
{* PrestaShop 1.4.0.17 compatibility *}
|
||||
{if isset($addresses)}
|
||||
{foreach from=$addresses key=k item=address}
|
||||
{counter start=0 skip=1 assign=address_key_number}
|
||||
{$id_address = $address.id_address}
|
||||
{foreach from=$address key=address_key item=address_content}
|
||||
{if !in_array($address_key, $ignoreList)}
|
||||
{$formatedAddressFieldsValuesList.$id_address.ordered_fields.$address_key_number = $address_key}
|
||||
{$formatedAddressFieldsValuesList.$id_address.formated_fields_values.$address_key = $address_content}
|
||||
{counter}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
{if !$opc}
|
||||
var orderProcess = 'order';
|
||||
var currencySign = '{$currencySign|html_entity_decode:2:"UTF-8"}';
|
||||
var currencyRate = '{$currencyRate|floatval}';
|
||||
var currencyFormat = '{$currencyFormat|intval}';
|
||||
var currencyBlank = '{$currencyBlank|intval}';
|
||||
var txtProduct = "{l s='product'}";
|
||||
var txtProducts = "{l s='products'}";
|
||||
{/if}
|
||||
|
||||
var formatedAddressFieldsValuesList = new Array();
|
||||
|
||||
{foreach from=$formatedAddressFieldsValuesList key=id_address item=type}
|
||||
formatedAddressFieldsValuesList[{$id_address}] =
|
||||
{ldelim}
|
||||
'ordered_fields':[
|
||||
{foreach from=$type.ordered_fields key=num_field item=field_name name=inv_loop}
|
||||
{if !$smarty.foreach.inv_loop.first},{/if}"{$field_name}"
|
||||
{/foreach}
|
||||
],
|
||||
'formated_fields_values':{ldelim}
|
||||
{foreach from=$type.formated_fields_values key=pattern_name item=field_name name=inv_loop}
|
||||
{if !$smarty.foreach.inv_loop.first},{/if}"{$pattern_name}":"{$field_name}"
|
||||
{/foreach}
|
||||
{rdelim}
|
||||
{rdelim}
|
||||
{/foreach}
|
||||
|
||||
function getAddressesTitles()
|
||||
{ldelim}
|
||||
return {ldelim}
|
||||
'invoice': "{l s='Your billing address'}",
|
||||
'delivery': "{l s='Your delivery address'}"
|
||||
{rdelim};
|
||||
|
||||
{rdelim}
|
||||
|
||||
|
||||
function buildAddressBlock(id_address, address_type, dest_comp)
|
||||
{ldelim}
|
||||
var adr_titles_vals = getAddressesTitles();
|
||||
var li_content = formatedAddressFieldsValuesList[id_address]['formated_fields_values'];
|
||||
var ordered_fields_name = ['title'];
|
||||
|
||||
ordered_fields_name = ordered_fields_name.concat(formatedAddressFieldsValuesList[id_address]['ordered_fields']);
|
||||
ordered_fields_name = ordered_fields_name.concat(['update']);
|
||||
|
||||
dest_comp.html('');
|
||||
|
||||
li_content['title'] = adr_titles_vals[address_type];
|
||||
li_content['update'] = '<a href="{$link->getPageLink('address', true, NULL, "id_address")}'+id_address+'&back=order?step=1{if $back}&mod={$back}{/if}" title="{l s='Update'}">{l s='Update'}</a>';
|
||||
|
||||
appendAddressList(dest_comp, li_content, ordered_fields_name);
|
||||
{rdelim}
|
||||
|
||||
function appendAddressList(dest_comp, values, fields_name)
|
||||
{ldelim}
|
||||
for (var item in fields_name)
|
||||
{ldelim}
|
||||
var name = fields_name[item];
|
||||
var value = getFieldValue(name, values);
|
||||
if (value != "")
|
||||
{ldelim}
|
||||
var new_li = document.createElement('li');
|
||||
new_li.className = 'address_'+ name;
|
||||
new_li.innerHTML = getFieldValue(name, values);
|
||||
dest_comp.append(new_li);
|
||||
{rdelim}
|
||||
{rdelim}
|
||||
{rdelim}
|
||||
|
||||
function getFieldValue(field_name, values)
|
||||
{ldelim}
|
||||
var reg=new RegExp("[ ]+", "g");
|
||||
|
||||
var items = field_name.split(reg);
|
||||
var vals = new Array();
|
||||
|
||||
for (var field_item in items)
|
||||
vals.push(values[items[field_item]]);
|
||||
return vals.join(" ");
|
||||
{rdelim}
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
{if !$opc}
|
||||
{capture name=path}{l s='Addresses'}{/capture}
|
||||
{include file="$tpl_dir./breadcrumb.tpl"}
|
||||
{/if}
|
||||
|
||||
{if !$opc}<h1>{l s='Addresses'}</h1>{else}<h2>1. {l s='Addresses'}</h2>{/if}
|
||||
|
||||
{if !$opc}
|
||||
{assign var='current_step' value='address'}
|
||||
{include file="$tpl_dir./order-steps.tpl"}
|
||||
{include file="$tpl_dir./errors.tpl"}
|
||||
|
||||
<p>{l s='Choose the delivery addresses:'}</p>
|
||||
|
||||
<div id="order-detail-content" class="table_block">
|
||||
<table id="cart_summary" class="std">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="cart_product first_item">{l s='Product'}</th>
|
||||
<th class="cart_description item">{l s='Description'}</th>
|
||||
<th class="cart_ref item">{l s='Ref.'}</th>
|
||||
<th class="cart_quantity item">{l s='Qty'}</th>
|
||||
<th class="shipping_address last_item">{l s='Shipping address'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$products item=product name=productLoop}
|
||||
{assign var='productId' value=$product.id_product}
|
||||
{assign var='productAttributeId' value=$product.id_product_attribute}
|
||||
{assign var='quantityDisplayed' value=0}
|
||||
{* Display the product line *}
|
||||
{include file="$tpl_dir./order-address-product-line.tpl" productLast=$smarty.foreach.productLoop.last productFirst=$smarty.foreach.productLoop.first}
|
||||
{* Then the customized datas ones*}
|
||||
{if isset($customizedDatas.$productId.$productAttributeId)}
|
||||
{foreach from=$customizedDatas.$productId.$productAttributeId[$product.id_address_delivery] key='id_customization' item='customization'}
|
||||
<tr id="product_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}" class="product_{$product.id_product}_{$product.id_product_attribute}_0_{$product.id_address_delivery|intval} alternate_item cart_item">
|
||||
<td colspan="4">
|
||||
{foreach from=$customization.datas key='type' item='datas'}
|
||||
{if $type == $CUSTOMIZE_FILE}
|
||||
<div class="customizationUploaded">
|
||||
<ul class="customizationUploaded">
|
||||
{foreach from=$datas item='picture'}<li><img src="{$pic_dir}{$picture.value}_small" alt="" class="customizationUploaded" /></li>{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
{elseif $type == $CUSTOMIZE_TEXTFIELD}
|
||||
<ul class="typedText">
|
||||
{foreach from=$datas item='textField' name='typedText'}<li>{if $textField.name}{$textField.name}{else}{l s='Text #'}{$smarty.foreach.typedText.index+1}{/if}{l s=':'} {$textField.value}</li>{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</td>
|
||||
<td class="cart_quantity">
|
||||
{if isset($cannotModify) AND $cannotModify == 1}
|
||||
<span style="float:left">{if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if}</span>
|
||||
{else}
|
||||
<div style="float:right">
|
||||
<a rel="nofollow" class="cart_quantity_delete" id="{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}" href="{$link->getPageLink('cart', true, NULL, "delete&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_customization={$id_customization}&id_address_delivery={$product.id_address_delivery}&token={$token_cart}")}"><img src="{$img_dir}icon/delete.gif" alt="{l s='Delete'}" title="{l s='Delete this customization'}" width="11" height="13" class="icon" /></a>
|
||||
</div>
|
||||
<div id="cart_quantity_button" style="float:left">
|
||||
<a rel="nofollow" class="cart_quantity_up" id="cart_quantity_up_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}" href="{$link->getPageLink('cart', true, NULL, "add&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_address_delivery={$product.id_address_delivery}&id_customization={$id_customization}&token={$token_cart}")}" title="{l s='Add'}"><img src="{$img_dir}icon/quantity_up.gif" alt="{l s='Add'}" width="14" height="9" /></a><br />
|
||||
{if $product.minimal_quantity < ($customization.quantity -$quantityDisplayed) OR $product.minimal_quantity <= 1}
|
||||
<a rel="nofollow" class="cart_quantity_down" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}" href="{$link->getPageLink('cart', true, NULL, "add&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_address_delivery={$product.id_address_delivery}&id_customization={$id_customization}&op=down&token={$token_cart}")}" title="{l s='Subtract'}">
|
||||
<img src="{$img_dir}icon/quantity_down.gif" alt="{l s='Subtract'}" width="14" height="9" />
|
||||
</a>
|
||||
{else}
|
||||
<a class="cart_quantity_down" style="opacity: 0.3;" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}" href="#" title="{l s='Subtract'}">
|
||||
<img src="{$img_dir}icon/quantity_down.gif" alt="{l s='Subtract'}" width="14" height="9" />
|
||||
</a>
|
||||
{/if}
|
||||
</div>
|
||||
<input type="hidden" value="{$customization.quantity}" name="quantity_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}_hidden"/>
|
||||
<input size="2" type="text" value="{$customization.quantity}" class="cart_quantity_input" name="quantity_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}"/>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="cart_total"></td>
|
||||
</tr>
|
||||
{assign var='quantityDisplayed' value=$quantityDisplayed+$customization.quantity}
|
||||
{/foreach}
|
||||
{* If it exists also some uncustomized products *}
|
||||
{if $product.quantity-$quantityDisplayed > 0}
|
||||
{include file="$tpl_dir./order-address-product-line.tpl" productLast=$smarty.foreach.productLoop.last productFirst=$smarty.foreach.productLoop.first}
|
||||
{/if}
|
||||
|
||||
{/if}
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<form action="{$link->getPageLink('order', true, NULL, 'multi-shipping=1')}" method="post">
|
||||
{else}
|
||||
<div id="opc_account" class="opc-main-block">
|
||||
<div id="opc_account-overlay" class="opc-overlay" style="display: none;"></div>
|
||||
{/if}
|
||||
|
||||
<div class="addresses">
|
||||
<input type="hidden" name="id_address_delivery" id="id_address_delivery" value="{$cart->id_address_delivery}" />
|
||||
<p id="address_invoice_form" class="select" {if $cart->id_address_invoice == $cart->id_address_delivery}style="display: none;"{/if}>
|
||||
|
||||
{if $addresses|@count > 1}
|
||||
<label for="id_address_invoice" class="strong">{l s='Choose a billing address:'}</label>
|
||||
<select name="id_address_invoice" id="id_address_invoice" class="address_select" onchange="updateAddressesDisplay();{if $opc}updateAddressSelection();{/if}">
|
||||
{section loop=$addresses step=-1 name=address}
|
||||
<option value="{$addresses[address].id_address|intval}" {if $addresses[address].id_address == $cart->id_address_invoice && $cart->id_address_delivery != $cart->id_address_invoice}selected="selected"{/if}>{$addresses[address].alias|escape:'htmlall':'UTF-8'}</option>
|
||||
{/section}
|
||||
</select>
|
||||
{else}
|
||||
{if $back}
|
||||
<a style="margin-left: 221px;" href="{$link->getPageLink('address', true, NULL, "back=order&step=1&select_address=1&mod=$back")}" title="{l s='Add'}" class="button_large">{l s='Add a new address'}</a>
|
||||
{else}
|
||||
<a style="margin-left: 221px;" href="{$link->getPageLink('address', true, NULL, "back=order&step=1&select_address=1")}" title="{l s='Add'}" class="button_large">{l s='Add a new address'}</a>
|
||||
{/if}
|
||||
{/if}
|
||||
</p>
|
||||
<div class="clear"></div>
|
||||
<ul class="address item {if $cart->isVirtualCart()}full_width{/if}" id="address_invoice">
|
||||
</ul>
|
||||
<br class="clear" />
|
||||
<p class="address_add submit">
|
||||
{if $back}
|
||||
<a href="{$link->getPageLink('address', true, NULL, "back=order%26step=1%26mod={$back}%26multi-shipping=1")}" title="{l s='Add'}" class="button_large">{l s='Add a new address'}</a>
|
||||
{else}
|
||||
<a href="{$link->getPageLink('address', true, NULL, "back=order%26step=1%26multi-shipping=1")}" title="{l s='Add'}" class="button_large">{l s='Add a new address'}</a>
|
||||
{/if}
|
||||
</p>
|
||||
{if !$opc}
|
||||
<div id="ordermsg">
|
||||
<p>{l s='If you would like to add a comment about your order, please write it below.'}</p>
|
||||
<p class="textarea"><textarea cols="60" rows="3" name="message">{if isset($oldMessage)}{$oldMessage}{/if}</textarea></p>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{if !$opc}
|
||||
<p class="cart_navigation submit">
|
||||
<input type="hidden" class="hidden" name="step" value="2" />
|
||||
<input type="hidden" name="back" value="{$back}" />
|
||||
{if $back}
|
||||
<a href="{$link->getPageLink('order', true, NULL, "step=0&back={$back}")}" title="{l s='Previous'}" class="button">« {l s='Previous'}</a>
|
||||
{else}
|
||||
<a href="{$link->getPageLink('order', true, NULL, "step=0")}" title="{l s='Previous'}" class="button">« {l s='Previous'}</a>
|
||||
{/if}
|
||||
<input type="submit" name="processAddress" value="{l s='Next'} »" class="exclusive" />
|
||||
</p>
|
||||
</form>
|
||||
{else}
|
||||
</div>
|
||||
{/if}
|
||||
@@ -0,0 +1,84 @@
|
||||
{*
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<tr id="product_{$product.id_product}_{$product.id_product_attribute}_0_{$product.id_address_delivery|intval}" class="{if $productLast}last_item{elseif $productFirst}first_item{/if} {if isset($customizedDatas.$productId.$productAttributeId) AND $quantityDisplayed == 0}alternate_item{/if} cart_item">
|
||||
<td class="cart_product">
|
||||
<a href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category)|escape:'htmlall':'UTF-8'}"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'small')}" alt="{$product.name|escape:'htmlall':'UTF-8'}" {if isset($smallSize)}width="{$smallSize.width}" height="{$smallSize.height}" {/if} /></a>
|
||||
</td>
|
||||
<td class="cart_description">
|
||||
<h5><a href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category)|escape:'htmlall':'UTF-8'}">{$product.name|escape:'htmlall':'UTF-8'}</a></h5>
|
||||
{if isset($product.attributes) && $product.attributes}<a href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category)|escape:'htmlall':'UTF-8'}">{$product.attributes|escape:'htmlall':'UTF-8'}</a>{/if}
|
||||
</td>
|
||||
<td class="cart_ref">{if $product.reference}{$product.reference|escape:'htmlall':'UTF-8'}{else}--{/if}</td>
|
||||
<td class="cart_quantity"{if isset($customizedDatas.$productId.$productAttributeId) AND $quantityDisplayed == 0} style="text-align: center;"{/if}>
|
||||
{if isset($cannotModify) AND $cannotModify == 1}
|
||||
<span style="float:left">{if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if}</span>
|
||||
{else}
|
||||
{if isset($customizedDatas.$productId.$productAttributeId) AND $quantityDisplayed == 0}<span id="cart_quantity_custom_{$product.id_product}_{$product.id_product_attribute}_{$product.id_address_delivery|intval}" >{$product.customizationQuantityTotal}</span>{/if}
|
||||
{if !isset($customizedDatas.$productId.$productAttributeId) OR $quantityDisplayed > 0}
|
||||
<div>
|
||||
<a rel="nofollow" class="cart_quantity_delete" id="{$product.id_product}_{$product.id_product_attribute}_0_{$product.id_address_delivery|intval}" href="{$link->getPageLink('cart', true, NULL, "delete&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_address_delivery={$product.id_address_delivery|intval}&token={$token_cart}")}" title="{l s='Delete'}"><img src="{$img_dir}icon/delete.gif" alt="{l s='Delete'}" class="icon" width="11" height="13" /></a>
|
||||
</div>
|
||||
<div id="cart_quantity_button" style="float:left;">
|
||||
<a rel="nofollow" class="cart_quantity_up" id="cart_quantity_up_{$product.id_product}_{$product.id_product_attribute}_0_{$product.id_address_delivery|intval}" href="{$link->getPageLink('cart', true, NULL, "add&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_address_delivery={$product.id_address_delivery|intval}&token={$token_cart}")}" title="{l s='Add'}"><img src="{$img_dir}icon/quantity_up.gif" alt="{l s='Add'}" width="14" height="9" /></a><br />
|
||||
{if $product.minimal_quantity < ($product.cart_quantity-$quantityDisplayed) OR $product.minimal_quantity <= 1}
|
||||
<a rel="nofollow" class="cart_quantity_down" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_0_{$product.id_address_delivery|intval}" href="{$link->getPageLink('cart', true, NULL, "add&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_address_delivery={$product.id_address_delivery|intval}&op=down&token={$token_cart}")}" title="{l s='Subtract'}">
|
||||
<img src="{$img_dir}icon/quantity_down.gif" alt="{l s='Subtract'}" width="14" height="9" />
|
||||
</a>
|
||||
{else}
|
||||
<a class="cart_quantity_down" style="opacity: 0.3;" href="#" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_0_{$product.id_address_delivery|intval}" title="{l s='You must purchase a minimum of '}{$product.minimal_quantity}{l s=' of this product.'}">
|
||||
<img src="{$img_dir}icon/quantity_down.gif" width="14" height="9" alt="{l s='Subtract'}" />
|
||||
</a>
|
||||
{/if}
|
||||
</div>
|
||||
<input type="hidden" value="{if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if}" name="quantity_{$product.id_product}_{$product.id_product_attribute}_0_{$product.id_address_delivery|intval}_hidden" />
|
||||
<input size="2" type="text" class="cart_quantity_input" value="{if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if}" name="quantity_{$product.id_product}_{$product.id_product_attribute}_0_{$product.id_address_delivery|intval}" />
|
||||
|
||||
{/if}
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
<from method="post" action="{$link->getPageLink('cart', true, NULL, "token={$token_cart}")}">
|
||||
<input type="hidden" name="id_product" value="{$product.id_product}" />
|
||||
<input type="hidden" name="id_product_attribute" value="{$product.id_product_attribute}" />
|
||||
<select name="address_delivery" id="select_address_delivery_{$product.id_product}_{$product.id_product_attribute}_{$product.id_address_delivery|intval}" class="cart_address_delivery">
|
||||
{if $product.id_address_delivery == 0 && $delivery->id == 0}
|
||||
<option></option>
|
||||
{/if}
|
||||
<option value="-1">{l s='New address'}</option>
|
||||
{foreach $address_list as $address}
|
||||
<option value="{$address.id_address}"
|
||||
{if ($product.id_address_delivery > 0 && $product.id_address_delivery == $address.id_address) || ($product.id_address_delivery == 0 && $address.id_address == $delivery->id)}
|
||||
selected="selected"
|
||||
{/if}
|
||||
>
|
||||
{$address.alias}
|
||||
</option>
|
||||
{/foreach}
|
||||
<option value="-2">{l s='Ship to an other address'}</option>
|
||||
</select>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -157,6 +157,12 @@
|
||||
{assign var='current_step' value='address'}
|
||||
{include file="$tpl_dir./order-steps.tpl"}
|
||||
{include file="$tpl_dir./errors.tpl"}
|
||||
|
||||
<div class="address-form-multishipping">
|
||||
<a href="{$link->getPageLink('order', true, NULL, 'step=1&multi-shipping=1')}" title="{l s='Multi-shipping'}" class="button exclusive">
|
||||
{l s='Multi-shipping'}
|
||||
</a>
|
||||
</div>
|
||||
<form action="{$link->getPageLink('order', true)}" method="post">
|
||||
{else}
|
||||
<div id="opc_account" class="opc-main-block">
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
{include file="$tpl_dir./errors.tpl"}
|
||||
|
||||
<form id="form" action="{$link->getPageLink('order', true)}" method="post" onsubmit="return acceptCGV();">
|
||||
<form id="form" action="{$link->getPageLink('order', true, NULL, "multi-shipping={$multi_shipping}")}" method="post" onsubmit="return acceptCGV();">
|
||||
{else}
|
||||
<div id="opc_delivery_methods" class="opc-main-block">
|
||||
<div id="opc_delivery_methods-overlay" class="opc-overlay" style="display: none;"></div>
|
||||
@@ -112,45 +112,83 @@
|
||||
<label for="recyclable">{l s='I agree to receive my order in recycled packaging'}.</label>
|
||||
</p>
|
||||
{/if}
|
||||
<p class="warning" id="noCarrierWarning" {if isset($carriers) && $carriers && count($carriers)}style="display:none;"{/if}>{l s='There are no carriers available that deliver to this address.'}</p>
|
||||
<table id="carrierTable" class="std" {if !isset($carriers) || !$carriers || !count($carriers)}style="display:none;"{/if}>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="carrier_action first_item"></th>
|
||||
<th class="carrier_name item">{l s='Carrier'}</th>
|
||||
<th class="carrier_infos item">{l s='Information'}</th>
|
||||
<th class="carrier_price last_item">{l s='Price'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{if isset($carriers)}
|
||||
{foreach from=$carriers item=carrier name=myLoop}
|
||||
<tr class="{if $smarty.foreach.myLoop.first}first_item{elseif $smarty.foreach.myLoop.last}last_item{/if} {if $smarty.foreach.myLoop.index % 2}alternate_item{else}item{/if}">
|
||||
<td class="carrier_action radio">
|
||||
<input type="radio" name="id_carrier" value="{$carrier.id_carrier|intval}" id="id_carrier{$carrier.id_carrier|intval}" {if $opc}onclick="updateCarrierSelectionAndGift();"{/if} {if !($carrier.is_module AND $opc AND !$isLogged)}{if $carrier.id_carrier == $checked}checked="checked"{/if}{else}disabled="disabled"{/if} />
|
||||
</td>
|
||||
<td class="carrier_name">
|
||||
<label for="id_carrier{$carrier.id_carrier|intval}">
|
||||
{if $carrier.img}<img src="{$carrier.img|escape:'htmlall':'UTF-8'}" alt="{$carrier.name|escape:'htmlall':'UTF-8'}" />{else}{$carrier.name|escape:'htmlall':'UTF-8'}{/if}
|
||||
</label>
|
||||
</td>
|
||||
<td class="carrier_infos">{$carrier.delay|escape:'htmlall':'UTF-8'}</td>
|
||||
<td class="carrier_price">
|
||||
{if $carrier.price}
|
||||
<span class="price">
|
||||
{if $priceDisplay == 1}{convertPrice price=$carrier.price_tax_exc}{else}{convertPrice price=$carrier.price}{/if}
|
||||
</span>
|
||||
{if $use_taxes}{if $priceDisplay == 1} {l s='(tax excl.)'}{else} {l s='(tax incl.)'}{/if}{/if}
|
||||
{else}
|
||||
{l s='Free!'}
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
<tr id="HOOK_EXTRACARRIER">{$HOOK_EXTRACARRIER}</tr>
|
||||
{/if}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="delivery_options_address">
|
||||
{foreach $delivery_option_list as $id_address => $option_list}
|
||||
<h3>{$address_collection[$id_address]->alias}</h3>
|
||||
<div class="delivery_options">
|
||||
{foreach $option_list as $key => $option}
|
||||
<div class="delivery_option {if ($option@index % 2)}alternate_{/if}item">
|
||||
<input class="delivery_option_radio" type="radio" name="delivery_option[{$id_address}]" id="delivery_option_{$id_address}_{$option@index}" value="{$key}" />
|
||||
<label for="delivery_option_{$id_address}_{$option@index}">
|
||||
<table class="resume">
|
||||
<tr>
|
||||
<td class="delivery_option_logo">
|
||||
{* If there is only one carrier, show the logo of the carrier *}
|
||||
{if $option.unique_carrier}
|
||||
{foreach $option.carrier_list as $carrier}
|
||||
{if $carrier.logo}
|
||||
<img src="{$carrier.logo}" alt="{$carrier.instance->name}"/>
|
||||
{else}
|
||||
{$carrier.instance->name}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{else}
|
||||
{$carrier.instance->name}
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
{if $option.is_best_grade}
|
||||
{if $option.is_best_price}
|
||||
<div class="delivery_option_best delivery_option_icon">{l s="The best price and grade"}</div>
|
||||
{else}
|
||||
<div class="delivery_option_fast delivery_option_icon">{l s="The faster"}</div>
|
||||
{/if}
|
||||
{else}
|
||||
{if $option.is_best_price}
|
||||
<div class="delivery_option_best_price delivery_option_icon">{l s="The best price"}</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
<div class="delivery_option_price">
|
||||
{if $option.total_price_with_tax}
|
||||
{if $use_taxes == 1}
|
||||
{convertPrice price=$option.total_price_with_tax} {l s='(tax incl.)'}
|
||||
{else}
|
||||
{convertPrice price=$option.total_price_without_tax} {l s='(tax excl.)'}
|
||||
{/if}
|
||||
{else}
|
||||
{l s='Free!'}
|
||||
{/if}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="delivery_option_carrier">
|
||||
{foreach $option.carrier_list as $carrier}
|
||||
<tr>
|
||||
<td>
|
||||
{if $carrier.logo}
|
||||
<img src="{$carrier.logo}" alt="{$carrier.instance->name}"/>
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
{$carrier.instance->name}
|
||||
</td>
|
||||
<td>
|
||||
{if isset($carrier.instance->delay[$cookie->id_lang])}
|
||||
{$carrier.instance->delay[$cookie->id_lang]}
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
</label>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
<div style="display: none;" id="extra_carrier"></div>
|
||||
|
||||
{if $giftAllowed}
|
||||
@@ -182,12 +220,12 @@
|
||||
<input type="hidden" name="back" value="{$back}" />
|
||||
{if !$is_guest}
|
||||
{if $back}
|
||||
<a href="{$link->getPageLink('order', true, NULL, "step=1&back={$back}")}" title="{l s='Previous'}" class="button">« {l s='Previous'}</a>
|
||||
<a href="{$link->getPageLink('order', true, NULL, "step=1&back={$back}&multi-shipping={$multi_shipping}")}" title="{l s='Previous'}" class="button">« {l s='Previous'}</a>
|
||||
{else}
|
||||
<a href="{$link->getPageLink('order', true, NULL, "step=1")}" title="{l s='Previous'}" class="button">« {l s='Previous'}</a>
|
||||
<a href="{$link->getPageLink('order', true, NULL, "step=1&multi-shipping={$multi_shipping}")}" title="{l s='Previous'}" class="button">« {l s='Previous'}</a>
|
||||
{/if}
|
||||
{else}
|
||||
<a href="{$link->getPageLink('order', true)}" title="{l s='Previous'}" class="button">« {l s='Previous'}</a>
|
||||
<a href="{$link->getPageLink('order', true, NULL, "multi-shipping={$multi_shipping}")}" title="{l s='Previous'}" class="button">« {l s='Previous'}</a>
|
||||
{/if}
|
||||
<input type="submit" name="processCarrier" value="{l s='Next'} »" class="exclusive" />
|
||||
</p>
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
{include file="$tpl_dir./shopping-cart-product-line.tpl"}
|
||||
{* Then the customized datas ones*}
|
||||
{if isset($customizedDatas.$productId.$productAttributeId)}
|
||||
{foreach from=$customizedDatas.$productId.$productAttributeId key='id_customization' item='customization'}
|
||||
{foreach from=$customizedDatas.$productId.$productAttributeId[$product.id_address_delivery] key='id_customization' item='customization'}
|
||||
<tr id="product_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}" class="alternate_item cart_item">
|
||||
<td colspan="5">
|
||||
{foreach from=$customization.datas key='type' item='datas'}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<ul class="step" id="order_step">
|
||||
<li class="{if $current_step=='summary'}step_current{else}{if $current_step=='payment' || $current_step=='shipping' || $current_step=='address' || $current_step=='login'}step_done{else}step_todo{/if}{/if}">
|
||||
{if $current_step=='payment' || $current_step=='shipping' || $current_step=='address' || $current_step=='login'}
|
||||
<a href="{$link->getPageLink('order', true, NULL, "{$smarty.capture.url_back}")}">
|
||||
<a href="{$link->getPageLink('order', true, NULL, "{$smarty.capture.url_back}&multi-shipping={$multi_shipping}")}">
|
||||
{l s='Summary'}
|
||||
</a>
|
||||
{else}
|
||||
@@ -42,7 +42,7 @@
|
||||
</li>
|
||||
<li class="{if $current_step=='login'}step_current{else}{if $current_step=='payment' || $current_step=='shipping' || $current_step=='address'}step_done{else}step_todo{/if}{/if}">
|
||||
{if $current_step=='payment' || $current_step=='shipping' || $current_step=='address'}
|
||||
<a href="{$link->getPageLink('order', true, NULL, "{$smarty.capture.url_back}&step=1")}">
|
||||
<a href="{$link->getPageLink('order', true, NULL, "{$smarty.capture.url_back}&step=1&multi-shipping={$multi_shipping}")}">
|
||||
{l s='Login'}
|
||||
</a>
|
||||
{else}
|
||||
@@ -51,7 +51,7 @@
|
||||
</li>
|
||||
<li class="{if $current_step=='address'}step_current{else}{if $current_step=='payment' || $current_step=='shipping'}step_done{else}step_todo{/if}{/if}">
|
||||
{if $current_step=='payment' || $current_step=='shipping'}
|
||||
<a href="{$link->getPageLink('order', true, NULL, "{$smarty.capture.url_back}&step=1")}">
|
||||
<a href="{$link->getPageLink('order', true, NULL, "{$smarty.capture.url_back}&step=1&multi-shipping={$multi_shipping}")}">
|
||||
{l s='Address'}
|
||||
</a>
|
||||
{else}
|
||||
@@ -60,7 +60,7 @@
|
||||
</li>
|
||||
<li class="{if $current_step=='shipping'}step_current{else}{if $current_step=='payment'}step_done{else}step_todo{/if}{/if}">
|
||||
{if $current_step=='payment'}
|
||||
<a href="{$link->getPageLink('order', true, NULL, "{$smarty.capture.url_back}&step=2")}">
|
||||
<a href="{$link->getPageLink('order', true, NULL, "{$smarty.capture.url_back}&step=2&multi-shipping={$multi_shipping}")}">
|
||||
{l s='Shipping'}
|
||||
</a>
|
||||
{else}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<tr id="product_{$product.id_product}_{$product.id_product_attribute}" class="{if $smarty.foreach.productLoop.last}last_item{elseif $smarty.foreach.productLoop.first}first_item{/if}{if isset($customizedDatas.$productId.$productAttributeId) AND $quantityDisplayed == 0}alternate_item{/if} cart_item">
|
||||
<tr id="product_{$product.id_product}_{$product.id_product_attribute}_0_{$product.id_address_delivery|intval}" class="{if $productLast}last_item{elseif $productFirst}first_item{/if} {if isset($customizedDatas.$productId.$productAttributeId) AND $quantityDisplayed == 0}alternate_item{/if} cart_item">
|
||||
<td class="cart_product">
|
||||
<a href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category)|escape:'htmlall':'UTF-8'}"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'small')}" alt="{$product.name|escape:'htmlall':'UTF-8'}" {if isset($smallSize)}width="{$smallSize.width}" height="{$smallSize.height}" {/if} /></a>
|
||||
</td>
|
||||
@@ -41,7 +41,7 @@
|
||||
{/if}
|
||||
</td>
|
||||
<td class="cart_unit">
|
||||
<span class="price" id="product_price_{$product.id_product}_{$product.id_product_attribute}">
|
||||
<span class="price" id="product_price_{$product.id_product}_{$product.id_product_attribute}_{$product.id_address_delivery|intval}">
|
||||
{if isset($product.is_discounted) && $product.is_discounted}
|
||||
<span style="text-decoration:line-through;">{convertPrice price=$product.price_without_specific_price}</span><br />
|
||||
{/if}
|
||||
@@ -56,31 +56,31 @@
|
||||
{if isset($cannotModify) AND $cannotModify == 1}
|
||||
<span style="float:left">{if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if}</span>
|
||||
{else}
|
||||
{if isset($customizedDatas.$productId.$productAttributeId) AND $quantityDisplayed == 0}<span id="cart_quantity_custom_{$product.id_product}_{$product.id_product_attribute}" >{$product.customizationQuantityTotal}</span>{/if}
|
||||
{if isset($customizedDatas.$productId.$productAttributeId) AND $quantityDisplayed == 0}<span id="cart_quantity_custom_{$product.id_product}_{$product.id_product_attribute}_{$product.id_address_delivery|intval}" >{$product.customizationQuantityTotal}</span>{/if}
|
||||
{if !isset($customizedDatas.$productId.$productAttributeId) OR $quantityDisplayed > 0}
|
||||
<div>
|
||||
<a rel="nofollow" class="cart_quantity_delete" id="{$product.id_product}_{$product.id_product_attribute}" href="{$link->getPageLink('cart', true, NULL, "delete&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&token={$token_cart}")}" title="{l s='Delete'}"><img src="{$img_dir}icon/delete.gif" alt="{l s='Delete'}" class="icon" width="11" height="13" /></a>
|
||||
<a rel="nofollow" class="cart_quantity_delete" id="{$product.id_product}_{$product.id_product_attribute}_0_{$product.id_address_delivery|intval}" href="{$link->getPageLink('cart', true, NULL, "delete&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_address_delivery={$product.id_address_delivery|intval}&token={$token_cart}")}" title="{l s='Delete'}"><img src="{$img_dir}icon/delete.gif" alt="{l s='Delete'}" class="icon" width="11" height="13" /></a>
|
||||
</div>
|
||||
<div id="cart_quantity_button" style="float:left;">
|
||||
<a rel="nofollow" class="cart_quantity_up" id="cart_quantity_up_{$product.id_product}_{$product.id_product_attribute}" href="{$link->getPageLink('cart', true, NULL, "add&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&token={$token_cart}")}" title="{l s='Add'}"><img src="{$img_dir}icon/quantity_up.gif" alt="{l s='Add'}" width="14" height="9" /></a><br />
|
||||
<a rel="nofollow" class="cart_quantity_up" id="cart_quantity_up_{$product.id_product}_{$product.id_product_attribute}_0_{$product.id_address_delivery|intval}" href="{$link->getPageLink('cart', true, NULL, "add&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_address_delivery={$product.id_address_delivery|intval}&token={$token_cart}")}" title="{l s='Add'}"><img src="{$img_dir}icon/quantity_up.gif" alt="{l s='Add'}" width="14" height="9" /></a><br />
|
||||
{if $product.minimal_quantity < ($product.cart_quantity-$quantityDisplayed) OR $product.minimal_quantity <= 1}
|
||||
<a rel="nofollow" class="cart_quantity_down" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}" href="{$link->getPageLink('cart', true, NULL, "add&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&op=down&token={$token_cart}")}" title="{l s='Subtract'}">
|
||||
<a rel="nofollow" class="cart_quantity_down" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_0_{$product.id_address_delivery|intval}" href="{$link->getPageLink('cart', true, NULL, "add&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_address_delivery={$product.id_address_delivery|intval}&op=down&token={$token_cart}")}" title="{l s='Subtract'}">
|
||||
<img src="{$img_dir}icon/quantity_down.gif" alt="{l s='Subtract'}" width="14" height="9" />
|
||||
</a>
|
||||
{else}
|
||||
<a class="cart_quantity_down" style="opacity: 0.3;" href="#" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}" title="{l s='You must purchase a minimum of '}{$product.minimal_quantity}{l s=' of this product.'}">
|
||||
<a class="cart_quantity_down" style="opacity: 0.3;" href="#" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_0_{$product.id_address_delivery|intval}" title="{l s='You must purchase a minimum of '}{$product.minimal_quantity}{l s=' of this product.'}">
|
||||
<img src="{$img_dir}icon/quantity_down.gif" width="14" height="9" alt="{l s='Subtract'}" />
|
||||
</a>
|
||||
{/if}
|
||||
</div>
|
||||
<input type="hidden" value="{if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if}" name="quantity_{$product.id_product}_{$product.id_product_attribute}_hidden" />
|
||||
<input size="2" type="text" class="cart_quantity_input" value="{if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if}" name="quantity_{$product.id_product}_{$product.id_product_attribute}" />
|
||||
<input type="hidden" value="{if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if}" name="quantity_{$product.id_product}_{$product.id_product_attribute}_0_{$product.id_address_delivery|intval}_hidden" />
|
||||
<input size="2" type="text" class="cart_quantity_input" value="{if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if}" name="quantity_{$product.id_product}_{$product.id_product_attribute}_0_{$product.id_address_delivery|intval}" />
|
||||
|
||||
{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
</td>
|
||||
<td class="cart_total">
|
||||
<span class="price" id="total_product_price_{$product.id_product}_{$product.id_product_attribute}">
|
||||
<span class="price" id="total_product_price_{$product.id_product}_{$product.id_product_attribute}_{$product.id_address_delivery|intval}">
|
||||
{if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}
|
||||
{if !$priceDisplay}{displayPrice price=$product.total_customization_wt}{else}{displayPrice price=$product.total_customization}{/if}
|
||||
{else}
|
||||
|
||||
@@ -55,21 +55,17 @@
|
||||
</script>
|
||||
<p style="display:none" id="emptyCartWarning" class="warning">{l s='Your shopping cart is empty.'}</p>
|
||||
{if isset($lastProductAdded) AND $lastProductAdded}
|
||||
{foreach from=$products item=product}
|
||||
{if $product.id_product == $lastProductAdded.id_product AND (!$product.id_product_attribute OR ($product.id_product_attribute == $lastProductAdded.id_product_attribute))}
|
||||
<div class="cart_last_product">
|
||||
<div class="cart_last_product_header">
|
||||
<div class="left">{l s='Last added product'}</div>
|
||||
</div>
|
||||
<a class="cart_last_product_img" href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category, null, null, $lastProductAdded.id_shop)|escape:'htmlall':'UTF-8'}"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'small')}" alt="{$product.name|escape:'htmlall':'UTF-8'}"/></a>
|
||||
<div class="cart_last_product_content">
|
||||
<h5><a href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category)|escape:'htmlall':'UTF-8'}">{$product.name|escape:'htmlall':'UTF-8'}</a></h5>
|
||||
{if isset($product.attributes) && $product.attributes}<a href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category)|escape:'htmlall':'UTF-8'}">{$product.attributes|escape:'htmlall':'UTF-8'}</a>{/if}
|
||||
</div>
|
||||
<br class="clear" />
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
<div class="cart_last_product">
|
||||
<div class="cart_last_product_header">
|
||||
<div class="left">{l s='Last added product'}</div>
|
||||
</div>
|
||||
<a class="cart_last_product_img" href="{$link->getProductLink($lastProductAdded.id_product, $lastProductAdded.link_rewrite, $lastProductAdded.category, null, null, $lastProductAdded.id_shop)|escape:'htmlall':'UTF-8'}"><img src="{$link->getImageLink($lastProductAdded.link_rewrite, $lastProductAdded.id_image, 'small')}" alt="{$lastProductAdded.name|escape:'htmlall':'UTF-8'}"/></a>
|
||||
<div class="cart_last_product_content">
|
||||
<h5><a href="{$link->getProductLink($lastProductAdded.id_product, $lastProductAdded.link_rewrite, $lastProductAdded.category)|escape:'htmlall':'UTF-8'}">{$lastProductAdded.name|escape:'htmlall':'UTF-8'}</a></h5>
|
||||
{if isset($lastProductAdded.attributes) && $lastProductAdded.attributes}<a href="{$link->getProductLink($lastProductAdded.id_product, $lastProductAdded.link_rewrite, $lastProductAdded.category)|escape:'htmlall':'UTF-8'}">{$lastProductAdded.attributes|escape:'htmlall':'UTF-8'}</a>{/if}
|
||||
</div>
|
||||
<br class="clear" />
|
||||
</div>
|
||||
{/if}
|
||||
<p>{l s='Your shopping cart contains'} <span id="summary_products_quantity">{$productNumber} {if $productNumber == 1}{l s='product'}{else}{l s='products'}{/if}</span></p>
|
||||
<div id="order-detail-content" class="table_block">
|
||||
@@ -219,24 +215,36 @@
|
||||
{assign var='productAttributeId' value=$product.id_product_attribute}
|
||||
{assign var='quantityDisplayed' value=0}
|
||||
{* Display the product line *}
|
||||
{include file="$tpl_dir./shopping-cart-product-line.tpl"}
|
||||
{include file="$tpl_dir/shopping-cart-product-line.tpl" productLast=$smarty.foreach.productLoop.last productFirst=$smarty.foreach.productLoop.first}
|
||||
{* Then the customized datas ones*}
|
||||
{if isset($customizedDatas.$productId.$productAttributeId)}
|
||||
{foreach from=$customizedDatas.$productId.$productAttributeId key='id_customization' item='customization'}
|
||||
<tr id="product_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}" class="alternate_item cart_item">
|
||||
{foreach from=$customizedDatas.$productId.$productAttributeId[$product.id_address_delivery] key=id_customization item=customization}
|
||||
<tr id="product_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}" class="alternate_item cart_item">
|
||||
<td colspan="5">
|
||||
{foreach from=$customization.datas key='type' item='datas'}
|
||||
{foreach from=$customization.datas key=type item=custom_data}
|
||||
|
||||
{if $type == $CUSTOMIZE_FILE}
|
||||
<div class="customizationUploaded">
|
||||
<ul class="customizationUploaded">
|
||||
{foreach from=$datas item='picture'}<li><img src="{$pic_dir}{$picture.value}_small" alt="" class="customizationUploaded" /></li>{/foreach}
|
||||
{foreach from=$datas item=picture}<li><img src="{$pic_dir}{$picture.value}_small" alt="" class="customizationUploaded" /></li>{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
{elseif $type == $CUSTOMIZE_TEXTFIELD}
|
||||
<ul class="typedText">
|
||||
{foreach from=$datas item='textField' name='typedText'}<li>{if $textField.name}{$textField.name}{else}{l s='Text #'}{$smarty.foreach.typedText.index+1}{/if}{l s=':'} {$textField.value}</li>{/foreach}
|
||||
{foreach from=$custom_data item=textField name=typedText}
|
||||
<li>
|
||||
{if $textField.name}
|
||||
{$textField.name}
|
||||
{else}
|
||||
{l s='Text #'}{$smarty.foreach.typedText.index+1}
|
||||
{/if}
|
||||
{l s=':'} {$textField.value}
|
||||
</li>
|
||||
{/foreach}
|
||||
|
||||
</ul>
|
||||
{/if}
|
||||
|
||||
{/foreach}
|
||||
</td>
|
||||
<td class="cart_quantity">
|
||||
@@ -244,22 +252,22 @@
|
||||
<span style="float:left">{if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if}</span>
|
||||
{else}
|
||||
<div style="float:right">
|
||||
<a rel="nofollow" class="cart_quantity_delete" id="{$product.id_product}_{$product.id_product_attribute}_{$id_customization}" href="{$link->getPageLink('cart', true, NULL, "delete&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_customization={$id_customization}&token={$token_cart}")}"><img src="{$img_dir}icon/delete.gif" alt="{l s='Delete'}" title="{l s='Delete this customization'}" width="11" height="13" class="icon" /></a>
|
||||
<a rel="nofollow" class="cart_quantity_delete" id="{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}" href="{$link->getPageLink('cart', true, NULL, "delete&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_customization={$id_customization}&id_address_delivery={$product.id_address_delivery}&token={$token_cart}")}"><img src="{$img_dir}icon/delete.gif" alt="{l s='Delete'}" title="{l s='Delete this customization'}" width="11" height="13" class="icon" /></a>
|
||||
</div>
|
||||
<div id="cart_quantity_button" style="float:left">
|
||||
<a rel="nofollow" class="cart_quantity_up" id="cart_quantity_up_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}" href="{$link->getPageLink('cart', true, NULL, "add&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_customization={$id_customization}&token={$token_cart}")}" title="{l s='Add'}"><img src="{$img_dir}icon/quantity_up.gif" alt="{l s='Add'}" width="14" height="9" /></a><br />
|
||||
<a rel="nofollow" class="cart_quantity_up" id="cart_quantity_up_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}" href="{$link->getPageLink('cart', true, NULL, "add&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_address_delivery={$product.id_address_delivery}&id_customization={$id_customization}&token={$token_cart}")}" title="{l s='Add'}"><img src="{$img_dir}icon/quantity_up.gif" alt="{l s='Add'}" width="14" height="9" /></a><br />
|
||||
{if $product.minimal_quantity < ($customization.quantity -$quantityDisplayed) OR $product.minimal_quantity <= 1}
|
||||
<a rel="nofollow" class="cart_quantity_down" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}" href="{$link->getPageLink('cart', true, NULL, "add&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_customization={$id_customization}&op=down&token={$token_cart}")}" title="{l s='Subtract'}">
|
||||
<a rel="nofollow" class="cart_quantity_down" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}" href="{$link->getPageLink('cart', true, NULL, "add&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_address_delivery={$product.id_address_delivery}&id_customization={$id_customization}&op=down&token={$token_cart}")}" title="{l s='Subtract'}">
|
||||
<img src="{$img_dir}icon/quantity_down.gif" alt="{l s='Subtract'}" width="14" height="9" />
|
||||
</a>
|
||||
{else}
|
||||
<a class="cart_quantity_down" style="opacity: 0.3;" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}" href="#" title="{l s='Subtract'}">
|
||||
<a class="cart_quantity_down" style="opacity: 0.3;" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}" href="#" title="{l s='Subtract'}">
|
||||
<img src="{$img_dir}icon/quantity_down.gif" alt="{l s='Subtract'}" width="14" height="9" />
|
||||
</a>
|
||||
{/if}
|
||||
</div>
|
||||
<input type="hidden" value="{$customization.quantity}" name="quantity_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_hidden"/>
|
||||
<input size="2" type="text" value="{$customization.quantity}" class="cart_quantity_input" name="quantity_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}"/>
|
||||
<input type="hidden" value="{$customization.quantity}" name="quantity_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}_hidden"/>
|
||||
<input size="2" type="text" value="{$customization.quantity}" class="cart_quantity_input" name="quantity_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}"/>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="cart_total"></td>
|
||||
@@ -267,7 +275,7 @@
|
||||
{assign var='quantityDisplayed' value=$quantityDisplayed+$customization.quantity}
|
||||
{/foreach}
|
||||
{* If it exists also some uncustomized products *}
|
||||
{if $product.quantity-$quantityDisplayed > 0}{include file="$tpl_dir./shopping-cart-product-line.tpl"}{/if}
|
||||
{if $product.quantity-$quantityDisplayed > 0}{include file="$tpl_dir./shopping-cart-product-line.tpl" productLast=$smarty.foreach.productLoop.last productFirst=$smarty.foreach.productLoop.first}{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
</tbody>
|
||||
@@ -395,7 +403,10 @@
|
||||
</div>
|
||||
{/if}
|
||||
<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>{/if}
|
||||
{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}
|
||||
<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>
|
||||
<p class="clear"><br /><br /></p>
|
||||
|
||||
Reference in New Issue
Block a user