// BugFix id_carrier in cart not defined + choosing address delivery for multishiping on opc
This commit is contained in:
+6
-4
@@ -1529,10 +1529,12 @@ class CartCore extends ObjectModel
|
|||||||
$delivery_option_list = $this->getDeliveryOptionList();
|
$delivery_option_list = $this->getDeliveryOptionList();
|
||||||
foreach ($delivery_option as $id_address => $key)
|
foreach ($delivery_option as $id_address => $key)
|
||||||
{
|
{
|
||||||
if ($useTax)
|
if ($id_address == 0)
|
||||||
$total_shipping += $delivery_option_list[$id_address][$key]['total_price_with_tax'];
|
continue;
|
||||||
else
|
if ($useTax)
|
||||||
$total_shipping += $delivery_option_list[$id_address][$key]['total_price_without_tax'];
|
$total_shipping += $delivery_option_list[$id_address][$key]['total_price_with_tax'];
|
||||||
|
else
|
||||||
|
$total_shipping += $delivery_option_list[$id_address][$key]['total_price_without_tax'];
|
||||||
}
|
}
|
||||||
return $total_shipping;
|
return $total_shipping;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -202,15 +202,35 @@ class OrderOpcControllerCore extends ParentOrderController
|
|||||||
}
|
}
|
||||||
die(Tools::displayError());
|
die(Tools::displayError());
|
||||||
break;
|
break;
|
||||||
|
case 'multishipping':
|
||||||
|
$this->_assignSummaryInformations();
|
||||||
|
if ($this->context->customer->id)
|
||||||
|
$this->context->smarty->assign('address_list', $this->context->customer->getAddresses($this->context->language->id));
|
||||||
|
else
|
||||||
|
$this->context->smarty->assign('address_list', array());
|
||||||
|
$this->setTemplate(_PS_THEME_DIR_.'order-address-multishipping-products.tpl');
|
||||||
|
$this->display();
|
||||||
|
die();
|
||||||
|
case 'cartReload':
|
||||||
|
$this->_assignSummaryInformations();
|
||||||
|
if ($this->context->customer->id)
|
||||||
|
$this->context->smarty->assign('address_list', $this->context->customer->getAddresses($this->context->language->id));
|
||||||
|
else
|
||||||
|
$this->context->smarty->assign('address_list', array());
|
||||||
|
$this->context->smarty->assign('opc', true);
|
||||||
|
$this->setTemplate(_PS_THEME_DIR_.'shopping-cart.tpl');
|
||||||
|
$this->display();
|
||||||
|
die();
|
||||||
default:
|
default:
|
||||||
exit;
|
throw new PrestashopException('Unknown method "'.Tools::getValue('method').'"');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
exit;
|
else
|
||||||
|
throw new PrestashopException('Method is not defined'.Tools::isSubmit('method'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif (Tools::isSubmit('ajax'))
|
elseif (Tools::isSubmit('ajax'))
|
||||||
exit;
|
throw new PrestashopException('Method is not defined');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setMedia()
|
public function setMedia()
|
||||||
@@ -329,11 +349,12 @@ class OrderOpcControllerCore extends ParentOrderController
|
|||||||
{
|
{
|
||||||
$carriers = Carrier::getCarriersForOrder(Country::getIdZone((int)Configuration::get('PS_COUNTRY_DEFAULT')));
|
$carriers = Carrier::getCarriersForOrder(Country::getIdZone((int)Configuration::get('PS_COUNTRY_DEFAULT')));
|
||||||
$this->context->smarty->assign(array(
|
$this->context->smarty->assign(array(
|
||||||
'checked' => $this->_setDefaultCarrierSelection($carriers),
|
|
||||||
'carriers' => $carriers,
|
|
||||||
'default_carrier' => (int)(Configuration::get('PS_CARRIER_DEFAULT')),
|
|
||||||
'HOOK_EXTRACARRIER' => NULL,
|
'HOOK_EXTRACARRIER' => NULL,
|
||||||
'HOOK_BEFORECARRIER' => Hook::exec('beforeCarrier', array('carriers' => $carriers))
|
'HOOK_BEFORECARRIER' => Hook::exec('beforeCarrier', array(
|
||||||
|
'carriers' => $carriers,
|
||||||
|
'delivery_option_list' => $this->context->cart->getDeliveryOptionList(),
|
||||||
|
'delivery_option' => $this->context->cart->getDeliveryOption()
|
||||||
|
))
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -404,9 +425,11 @@ class OrderOpcControllerCore extends ParentOrderController
|
|||||||
{
|
{
|
||||||
$carriers = Carrier::getCarriersForOrder((int)Address::getZoneById((int)($address_delivery->id)), $groups);
|
$carriers = Carrier::getCarriersForOrder((int)Address::getZoneById((int)($address_delivery->id)), $groups);
|
||||||
$result = array(
|
$result = array(
|
||||||
'checked' => $this->_setDefaultCarrierSelection($carriers),
|
'HOOK_BEFORECARRIER' => Hook::exec('beforeCarrier', array(
|
||||||
'carriers' => $carriers,
|
'carriers' => $carriers,
|
||||||
'HOOK_BEFORECARRIER' => Hook::exec('beforeCarrier', array('carriers' => $carriers)),
|
'delivery_option_list' => $this->context->cart->getDeliveryOptionList(),
|
||||||
|
'delivery_option' => $this->context->cart->getDeliveryOption()
|
||||||
|
)),
|
||||||
'HOOK_EXTRACARRIER' => Hook::exec('extraCarrier', array('address' => $address_delivery))
|
'HOOK_EXTRACARRIER' => Hook::exec('extraCarrier', array('address' => $address_delivery))
|
||||||
);
|
);
|
||||||
return $result;
|
return $result;
|
||||||
|
|||||||
@@ -379,18 +379,18 @@ class ParentOrderControllerCore extends FrontController
|
|||||||
$id_zone = Address::getZoneById($address->id);
|
$id_zone = Address::getZoneById($address->id);
|
||||||
$carriers = Carrier::getCarriersForOrder($id_zone, $this->context->customer->getGroups());
|
$carriers = Carrier::getCarriersForOrder($id_zone, $this->context->customer->getGroups());
|
||||||
|
|
||||||
|
|
||||||
$this->context->smarty->assign(array(
|
$this->context->smarty->assign(array(
|
||||||
'checked' => $this->setDefaultCarrierSelection($carriers),
|
|
||||||
'carriers' => $carriers,
|
|
||||||
'address_collection' => $this->context->cart->getAddressCollection(),
|
'address_collection' => $this->context->cart->getAddressCollection(),
|
||||||
'delivery_option_list' => $this->context->cart->getDeliveryOptionList(),
|
'delivery_option_list' => $this->context->cart->getDeliveryOptionList(),
|
||||||
'delivery_option' => $this->context->cart->getDeliveryOption(),
|
'delivery_option' => $this->context->cart->getDeliveryOption()
|
||||||
'default_carrier' => (int)(Configuration::get('PS_CARRIER_DEFAULT'))
|
|
||||||
));
|
));
|
||||||
$this->context->smarty->assign(array(
|
$this->context->smarty->assign(array(
|
||||||
'HOOK_EXTRACARRIER' => Hook::exec('extraCarrier', array('address' => $address)),
|
'HOOK_EXTRACARRIER' => Hook::exec('extraCarrier', array('address' => $address)),
|
||||||
'HOOK_BEFORECARRIER' => Hook::exec('beforeCarrier', array('carriers' => $carriers))
|
'HOOK_BEFORECARRIER' => Hook::exec('beforeCarrier', array(
|
||||||
|
'carriers' => $carriers,
|
||||||
|
'delivery_option_list' => $this->context->cart->getDeliveryOptionList(),
|
||||||
|
'delivery_option' => $this->context->cart->getDeliveryOption()
|
||||||
|
))
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,6 @@ class BlockCart extends Module
|
|||||||
'wrapping_cost' => Tools::displayPrice($wrappingCost, $currency),
|
'wrapping_cost' => Tools::displayPrice($wrappingCost, $currency),
|
||||||
'product_total' => Tools::displayPrice($params['cart']->getOrderTotal($useTax, Cart::BOTH_WITHOUT_SHIPPING), $currency),
|
'product_total' => Tools::displayPrice($params['cart']->getOrderTotal($useTax, Cart::BOTH_WITHOUT_SHIPPING), $currency),
|
||||||
'total' => Tools::displayPrice($totalToPay, $currency),
|
'total' => Tools::displayPrice($totalToPay, $currency),
|
||||||
'id_carrier' => (int)($params['cart']->id_carrier),
|
|
||||||
'order_process' => Configuration::get('PS_ORDER_PROCESS_TYPE') ? 'order-opc' : 'order',
|
'order_process' => Configuration::get('PS_ORDER_PROCESS_TYPE') ? 'order-opc' : 'order',
|
||||||
'ajax_allowed' => (int)(Configuration::get('PS_BLOCK_CART_AJAX')) == 1 ? true : false
|
'ajax_allowed' => (int)(Configuration::get('PS_BLOCK_CART_AJAX')) == 1 ? true : false
|
||||||
));
|
));
|
||||||
|
|||||||
@@ -734,3 +734,48 @@ $(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function multishippingMode(it)
|
||||||
|
{
|
||||||
|
if (!$(it).hasClass('on'))
|
||||||
|
{
|
||||||
|
$('#address_delivery').hide();
|
||||||
|
$('#address_invoice').removeClass('alternate_item').addClass('item');
|
||||||
|
$(it).addClass('on');
|
||||||
|
$('#link_multishipping_form').show();
|
||||||
|
|
||||||
|
$('#link_multishipping_form').fancybox({
|
||||||
|
'transitionIn' : 'elastic',
|
||||||
|
'transitionOut' : 'elastic',
|
||||||
|
'type' : 'ajax',
|
||||||
|
'onClosed' : function()
|
||||||
|
{
|
||||||
|
// Relaod the cart
|
||||||
|
$.ajax({
|
||||||
|
url: orderOpcUrl,
|
||||||
|
data: 'ajax=true&method=cartReload',
|
||||||
|
dataType : 'html',
|
||||||
|
success: function(data) {
|
||||||
|
$('#cart_summary').replaceWith($(data).find('#cart_summary'));
|
||||||
|
}
|
||||||
|
})
|
||||||
|
updateCarrierSelectionAndGift();
|
||||||
|
},
|
||||||
|
'onStart' : function()
|
||||||
|
{
|
||||||
|
// Removing all ids on the cart to avoid conflic with the new one on the fancybox
|
||||||
|
// This action could "break" the cart design, if css rules use ids of the cart
|
||||||
|
$.each($('#cart_summary *'), function(it, el) {
|
||||||
|
$(el).attr('id', '');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$('#address_delivery').show();
|
||||||
|
$('#address_invoice').removeClass('item').addClass('alternate_item');
|
||||||
|
$(it).removeClass('on');
|
||||||
|
$('#link_multishipping_form').hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1,101 @@
|
|||||||
|
{*
|
||||||
|
* 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
|
||||||
|
*}
|
||||||
|
<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>
|
||||||
@@ -152,82 +152,7 @@
|
|||||||
{include file="$tpl_dir./order-steps.tpl"}
|
{include file="$tpl_dir./order-steps.tpl"}
|
||||||
{include file="$tpl_dir./errors.tpl"}
|
{include file="$tpl_dir./errors.tpl"}
|
||||||
|
|
||||||
<p>{l s='Choose the delivery addresses:'}</p>
|
{include file="$tpl_dir./order-address-multishipping-products.tpl"}
|
||||||
|
|
||||||
<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">
|
<form action="{$link->getPageLink('order', true, NULL, 'multi-shipping=1')}" method="post">
|
||||||
{else}
|
{else}
|
||||||
|
|||||||
@@ -171,6 +171,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<form action="{$link->getPageLink($back_order_page, true)}" method="post">
|
<form action="{$link->getPageLink($back_order_page, true)}" method="post">
|
||||||
{else}
|
{else}
|
||||||
|
<div class="address-form-multishipping">
|
||||||
|
<a href="#" id="multishipping_mode" title="{l s='Multi-shipping'}" class="button exclusive" onclick="multishippingMode(this); return false;">
|
||||||
|
{l s='Multi-shipping'}
|
||||||
|
</a>
|
||||||
|
<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'}" class="button exclusive" style="display:none">
|
||||||
|
{l s='Choose the delivery addresses'}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
<div id="opc_account" class="opc-main-block">
|
<div id="opc_account" class="opc-main-block">
|
||||||
<div id="opc_account-overlay" class="opc-overlay" style="display: none;"></div>
|
<div id="opc_account-overlay" class="opc-overlay" style="display: none;"></div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -113,81 +113,83 @@
|
|||||||
</p>
|
</p>
|
||||||
{/if}
|
{/if}
|
||||||
<div class="delivery_options_address">
|
<div class="delivery_options_address">
|
||||||
{foreach $delivery_option_list as $id_address => $option_list}
|
{if isset($delivery_option_list)}
|
||||||
<h3>{$address_collection[$id_address]->alias}</h3>
|
{foreach $delivery_option_list as $id_address => $option_list}
|
||||||
<div class="delivery_options">
|
<h3>{$address_collection[$id_address]->alias}</h3>
|
||||||
{foreach $option_list as $key => $option}
|
<div class="delivery_options">
|
||||||
<div class="delivery_option {if ($option@index % 2)}alternate_{/if}item">
|
{foreach $option_list as $key => $option}
|
||||||
<input class="delivery_option_radio" type="radio" name="delivery_option[{$id_address}]" {if $opc}onclick="updateCarrierSelectionAndGift();"{/if} id="delivery_option_{$id_address}_{$option@index}" value="{$key}" />
|
<div class="delivery_option {if ($option@index % 2)}alternate_{/if}item">
|
||||||
<label for="delivery_option_{$id_address}_{$option@index}">
|
<input class="delivery_option_radio" type="radio" name="delivery_option[{$id_address}]" {if $opc}onclick="updateCarrierSelectionAndGift();"{/if} id="delivery_option_{$id_address}_{$option@index}" value="{$key}" />
|
||||||
<table class="resume">
|
<label for="delivery_option_{$id_address}_{$option@index}">
|
||||||
<tr>
|
<table class="resume">
|
||||||
<td class="delivery_option_logo">
|
<tr>
|
||||||
{* If there is only one carrier, show the logo of the carrier *}
|
<td class="delivery_option_logo">
|
||||||
{if $option.unique_carrier}
|
{* If there is only one carrier, show the logo of the carrier *}
|
||||||
{foreach $option.carrier_list as $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}
|
{if $carrier.logo}
|
||||||
<img src="{$carrier.logo}" alt="{$carrier.instance->name}"/>
|
<img src="{$carrier.logo}" alt="{$carrier.instance->name}"/>
|
||||||
{else}
|
|
||||||
{$carrier.instance->name}
|
|
||||||
{/if}
|
{/if}
|
||||||
{/foreach}
|
</td>
|
||||||
{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>
|
<td>
|
||||||
{if $carrier.logo}
|
{$carrier.instance->name}
|
||||||
<img src="{$carrier.logo}" alt="{$carrier.instance->name}"/>
|
</td>
|
||||||
{/if}
|
<td>
|
||||||
</td>
|
{if isset($carrier.instance->delay[$cookie->id_lang])}
|
||||||
<td>
|
{$carrier.instance->delay[$cookie->id_lang]}
|
||||||
{$carrier.instance->name}
|
{/if}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
</tr>
|
||||||
{if isset($carrier.instance->delay[$cookie->id_lang])}
|
{/foreach}
|
||||||
{$carrier.instance->delay[$cookie->id_lang]}
|
</table>
|
||||||
{/if}
|
</label>
|
||||||
</td>
|
</div>
|
||||||
</tr>
|
{/foreach}
|
||||||
{/foreach}
|
|
||||||
</table>
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</div>
|
{/if}
|
||||||
{/foreach}
|
|
||||||
</div>
|
</div>
|
||||||
<div style="display: none;" id="extra_carrier"></div>
|
<div style="display: none;" id="extra_carrier"></div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user