diff --git a/admin-dev/themes/default/template/controllers/orders/form.tpl b/admin-dev/themes/default/template/controllers/orders/form.tpl
index ddafe290e..ce42597c4 100755
--- a/admin-dev/themes/default/template/controllers/orders/form.tpl
+++ b/admin-dev/themes/default/template/controllers/orders/form.tpl
@@ -693,7 +693,7 @@
$('#carrier_recycled_package').attr('checked', true);
else
$('#carrier_recycled_package').removeAttr('checked');
- if (jsonSummary.free_shipping)
+ if (jsonSummary.free_shipping == 1)
$('#free_shipping').attr('checked', true);
else
$('#free_shipping').removeAttr('checked');
diff --git a/controllers/admin/AdminCartsController.php b/controllers/admin/AdminCartsController.php
index 64346c9a1..215fea541 100755
--- a/controllers/admin/AdminCartsController.php
+++ b/controllers/admin/AdminCartsController.php
@@ -643,7 +643,16 @@ class AdminCartsControllerCore extends AdminController
$message_content = '';
if ($message = Message::getMessageByCartId((int)$this->context->cart->id))
$message_content = $message['message'];
-
+ $cart_rules = $this->context->cart->getCartRules(CartRule::FILTER_ACTION_SHIPPING);
+
+ $free_shipping = false;
+ if (count($cart_rules))
+ foreach ($cart_rules as $cart_rule)
+ if ($cart_rule['id_cart_rule'] == CartRule::getIdByCode('BO_ORDER_'.(int)$this->context->cart->id))
+ {
+ $free_shipping = true;
+ break;
+ }
return array('summary' => $this->getCartSummary(),
'delivery_option_list' => $this->getDeliveryOptionList(),
'cart' => $this->context->cart,
@@ -654,7 +663,7 @@ class AdminCartsControllerCore extends AdminController
'order', false,
(int)$this->context->cart->id_lang,
'step=3&recover_cart='.$id_cart.'&token_cart='.md5(_COOKIE_KEY_.'recover_cart_'.$id_cart)),
- 'free_shipping' => (bool)CartRule::getIdByCode('BO_ORDER_'.(int)$this->context->cart->id)
+ 'free_shipping' => (int)$free_shipping
);
}
diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php
index e41352442..df172b8fc 100755
--- a/controllers/admin/AdminOrdersController.php
+++ b/controllers/admin/AdminOrdersController.php
@@ -521,8 +521,8 @@ class AdminOrdersControllerCore extends AdminController
if ($customizationList)
foreach ($customizationList as $key => $id_order_detail)
{
- $full_product_list[$id_order_detail] = $id_order_detail;
- $full_quantity_list[$id_order_detail] += $customizationQtyList[$key];
+ $full_product_list[(int)$id_order_detail] = $id_order_detail;
+ $full_quantity_list[(int)$id_order_detail] += $customizationQtyList[$key];
}
if ($productList || $customizationList)
@@ -627,7 +627,7 @@ class AdminOrdersControllerCore extends AdminController
$order_detail = new OrderDetail((int)$id_order_detail);
if (!$order->deleteProduct($order, $order_detail, $qtyCancelProduct))
$this->errors[] = Tools::displayError('An error occurred during deletion of the product.').' '.$order_detail->product_name.'';
- Hook::exec('actionProductCancel', array('order' => $order, 'id_order_detail' => $id_order_detail));
+ Hook::exec('actionProductCancel', array('order' => $order, 'id_order_detail' => (int)$id_order_detail));
}
if (!count($this->errors) && $customizationList)
foreach ($customizationList as $id_customization => $id_order_detail)
diff --git a/modules/blocklink/blocklink.php b/modules/blocklink/blocklink.php
index 1ef2a8125..daddb8fda 100644
--- a/modules/blocklink/blocklink.php
+++ b/modules/blocklink/blocklink.php
@@ -384,12 +384,15 @@ class BlockLink extends Module
{
$links = $this->getLinks();
$languages = Language::getLanguages();
+ $token = Tools::safeOutput(Tools::getValue('token'));
+ if (!Validate::isCleanHtml($token))
+ $token = '';
if ($links)
{
$this->_html .= '