diff --git a/admin-dev/ajax.php b/admin-dev/ajax.php index 6bd5cf27e..80ccb5169 100644 --- a/admin-dev/ajax.php +++ b/admin-dev/ajax.php @@ -625,7 +625,7 @@ if (Tools::isSubmit('getAdminHomeElement')) { $result = array(); - $protocol = (!empty($_SERVER['HTTPS']) AND strtolower($_SERVER['HTTPS']) != 'off') ? 'https' : 'http'; + $protocol = Tools::usingSecureMode() ? 'https' : 'http'; $isoUser = Context::getContext()->language->iso_code; $isoCountry = Context::getContext()->country->iso_code; $stream_context = stream_context_create(array('http' => array('method'=>"GET", 'timeout' => 5))); diff --git a/admin-dev/tabs/AdminDiscounts.php b/admin-dev/tabs/AdminDiscounts.php index b84e57179..a30abf708 100644 --- a/admin-dev/tabs/AdminDiscounts.php +++ b/admin-dev/tabs/AdminDiscounts.php @@ -340,7 +340,11 @@ class AdminDiscounts extends AdminTab
- * + *  +

'.$this->l('0 if not applicable').'

@@ -540,6 +544,4 @@ class AdminDiscounts extends AdminTab if ($key != 'infos') self::recurseCategoryForInclude($id_obj, $indexedCategories, $categories, $categories[$id_category][$key], $key, $id_category_default, $has_suite); } -} - - +} \ No newline at end of file diff --git a/admin-dev/tabs/AdminHome.php b/admin-dev/tabs/AdminHome.php index ced7096b4..6bde3c942 100644 --- a/admin-dev/tabs/AdminHome.php +++ b/admin-dev/tabs/AdminHome.php @@ -154,7 +154,7 @@ class AdminHome extends AdminTab $this->warnDomainName(); $tab = get_class(); - $protocol = (!empty($_SERVER['HTTPS']) AND strtolower($_SERVER['HTTPS']) != 'off')?'https':'http'; + $protocol = Tools::usingSecureMode()?'https':'http'; $isoUser = $this->context->language->iso_code; $currency = $this->context->currency; echo '
diff --git a/admin-dev/tabs/AdminImport.php b/admin-dev/tabs/AdminImport.php index 01a5b59ca..d683e1b40 100644 --- a/admin-dev/tabs/AdminImport.php +++ b/admin-dev/tabs/AdminImport.php @@ -751,11 +751,17 @@ class AdminImport extends AdminTab // check quantity if ($product->quantity == NULL) $product->quantity = 0; - - // If id product AND id product already in base, trying to update - if ($product->id AND Product::existsInDatabase((int)($product->id), 'product')) - { + // If match ref is specified AND ref product AND ref product already in base, trying to update + if (Tools::getValue('match_ref') == 1 AND $product->reference AND Product::existsRefInDatabase($product->reference)) + { + $datas = Db::getInstance()->getRow('SELECT `date_add`, `id_product` FROM `'._DB_PREFIX_.'product` WHERE `reference` = "'.$product->reference.'"'); + $product->id = pSQL($datas['id_product']); + $product->date_add = pSQL($datas['date_add']); + $res = $product->update(); + } // Else If id product AND id product already in base, trying to update + else if ($product->id AND Product::existsInDatabase((int)($product->id), 'product')) + { $datas = Db::getInstance()->getRow('SELECT `date_add` FROM `'._DB_PREFIX_.'product` WHERE `id_product` = '.(int)($product->id)); $product->date_add = pSQL($datas['date_add']); $res = $product->update(); @@ -767,7 +773,7 @@ class AdminImport extends AdminTab $res = $product->add(false); else $res = $product->add(); - } + } } // If both failed, mysql error if (!$res) @@ -1396,14 +1402,21 @@ class AdminImport extends AdminTab
- +
+ +
+ +
- '.$this->l('Note that the category import does not support categories of the same name').' + '.$this->l('Note that the category import does not support categories of the same name').'.
+
+ '.$this->l('Note that references are not specified as UNIQUE in the database').'. +
'; } else @@ -1427,6 +1440,14 @@ class AdminImport extends AdminTab
 
-
{capture name=path}{l s='My account' mod='blockwishlist'}{$navigationPipe}{l s='My wishlists' mod='blockwishlist'}{/capture} {include file="$tpl_dir./breadcrumb.tpl"} diff --git a/modules/loyalty/loyalty.php b/modules/loyalty/loyalty.php index c9cce2823..e9b027c38 100644 --- a/modules/loyalty/loyalty.php +++ b/modules/loyalty/loyalty.php @@ -525,6 +525,8 @@ class Loyalty extends Module 'voucher' => LoyaltyModule::getVoucherValue((int)$points), 'guest_checkout' => (int)Configuration::get('PS_GUEST_CHECKOUT_ENABLED') )); + } else { + $smarty->assign(array('points' => 0)); } return $this->display(__FILE__, 'shopping-cart.tpl'); diff --git a/modules/loyalty/loyalty.tpl b/modules/loyalty/loyalty.tpl index b6352f85f..e64742219 100644 --- a/modules/loyalty/loyalty.tpl +++ b/modules/loyalty/loyalty.tpl @@ -24,12 +24,6 @@ * International Registered Trademark & Property of PrestaShop SA *} - - {capture name=path}{l s='My account' mod='loyalty'}{$navigationPipe}{l s='My loyalty points' mod='loyalty'}{/capture} {include file="$tpl_dir./breadcrumb.tpl"} diff --git a/modules/mailalerts/myalerts.tpl b/modules/mailalerts/myalerts.tpl index 2ac6f41a1..325921005 100644 --- a/modules/mailalerts/myalerts.tpl +++ b/modules/mailalerts/myalerts.tpl @@ -24,12 +24,6 @@ * International Registered Trademark & Property of PrestaShop SA *} - -
{capture name=path}{l s='My account' mod='mailalerts'}{$navigationPipe}{l s='My alerts' mod='mailalerts'}{/capture} {include file="$tpl_dir./breadcrumb.tpl"} diff --git a/modules/mondialrelay/mondialrelay.php b/modules/mondialrelay/mondialrelay.php index 0167541d0..c8d081aa6 100755 --- a/modules/mondialrelay/mondialrelay.php +++ b/modules/mondialrelay/mondialrelay.php @@ -368,8 +368,7 @@ class MondialRelay extends Module self::$modulePath = _PS_MODULE_DIR_. 'mondialrelay/'; self::$MRToken = sha1('mr'._COOKIE_KEY_.'mrAgain'); - $protocol = (Configuration::get('PS_SSL_ENABLED') || (!empty($_SERVER['HTTPS']) - && strtolower($_SERVER['HTTPS']) != 'off')) ? 'https://' : 'http://'; + $protocol = (Configuration::get('PS_SSL_ENABLED') || Tools::usingSecureMode()) ? 'https://' : 'http://'; $endURL = __PS_BASE_URI__.'/modules/mondialrelay/'; diff --git a/modules/paypal/paypal.php b/modules/paypal/paypal.php index 98ab37fe4..a5a2928dd 100644 --- a/modules/paypal/paypal.php +++ b/modules/paypal/paypal.php @@ -1033,7 +1033,7 @@ class PayPal extends PaymentModule // Amount for refund $amt = 0.00; foreach ($products AS $product) - $amt += (float)($product['total_price']) * ($product['product_quantity'] - $product['product_quantity_refunded']); + $amt += (float)($product['product_price_wt']) * ($product['product_quantity'] - $product['product_quantity_refunded']); $amt += (float)($order->total_shipping) + (float)($order->total_wrapping) - (float)($order->total_discounts); // check if total or partial diff --git a/modules/referralprogram/referralprogram-program.tpl b/modules/referralprogram/referralprogram-program.tpl index f0fb36788..52556a1a6 100644 --- a/modules/referralprogram/referralprogram-program.tpl +++ b/modules/referralprogram/referralprogram-program.tpl @@ -26,12 +26,6 @@ - -
diff --git a/themes/prestashop/address.tpl b/themes/prestashop/address.tpl index 975600ea8..8e17d6a09 100644 --- a/themes/prestashop/address.tpl +++ b/themes/prestashop/address.tpl @@ -52,12 +52,6 @@ {/if} {/if} - - - {capture name=path}{l s='My account'}{$navigationPipe}{l s='My Vouchers'}{/capture} {include file="$tpl_dir./breadcrumb.tpl"} diff --git a/themes/prestashop/history.tpl b/themes/prestashop/history.tpl index 9f76e1136..025105ff4 100644 --- a/themes/prestashop/history.tpl +++ b/themes/prestashop/history.tpl @@ -24,12 +24,6 @@ * International Registered Trademark & Property of PrestaShop SA *} - - {capture name=path}{l s='My account'}{$navigationPipe}{l s='Order history'}{/capture} {include file="$tpl_dir./breadcrumb.tpl"} {include file="$tpl_dir./errors.tpl"} diff --git a/themes/prestashop/identity.tpl b/themes/prestashop/identity.tpl index 9c267c562..97900b7bc 100644 --- a/themes/prestashop/identity.tpl +++ b/themes/prestashop/identity.tpl @@ -24,12 +24,6 @@ * International Registered Trademark & Property of PrestaShop SA *} - - {capture name=path}{l s='My account'}{$navigationPipe}{l s='Your personal information'}{/capture} {include file="$tpl_dir./breadcrumb.tpl"} diff --git a/themes/prestashop/my-account.tpl b/themes/prestashop/my-account.tpl index b881665d4..b1b6d8bbb 100644 --- a/themes/prestashop/my-account.tpl +++ b/themes/prestashop/my-account.tpl @@ -24,12 +24,6 @@ * International Registered Trademark & Property of PrestaShop SA *} - - {capture name=path}{l s='My account'}{/capture} {include file="$tpl_dir./breadcrumb.tpl"} diff --git a/themes/prestashop/order-address.tpl b/themes/prestashop/order-address.tpl index 6a4807a16..3a1f8043e 100644 --- a/themes/prestashop/order-address.tpl +++ b/themes/prestashop/order-address.tpl @@ -61,7 +61,6 @@ - {capture name=path}{l s='Order confirmation'}{/capture} {include file="$tpl_dir./breadcrumb.tpl"} diff --git a/themes/prestashop/order-detail.tpl b/themes/prestashop/order-detail.tpl index 1cd103e9e..7c4d48fb3 100644 --- a/themes/prestashop/order-detail.tpl +++ b/themes/prestashop/order-detail.tpl @@ -24,11 +24,6 @@ * International Registered Trademark & Property of PrestaShop SA *} - {if !isset($smarty.get.ajax)}
diff --git a/themes/prestashop/order-follow.tpl b/themes/prestashop/order-follow.tpl index 0662f6ede..a677100ce 100644 --- a/themes/prestashop/order-follow.tpl +++ b/themes/prestashop/order-follow.tpl @@ -24,12 +24,6 @@ * International Registered Trademark & Property of PrestaShop SA *} - - {capture name=path}{l s='My account'}{$navigationPipe}{l s='Return Merchandise Authorization (RMA)'}{/capture} {include file="$tpl_dir./breadcrumb.tpl"} diff --git a/themes/prestashop/order-opc.tpl b/themes/prestashop/order-opc.tpl index c15722a7c..94be8a6fa 100755 --- a/themes/prestashop/order-opc.tpl +++ b/themes/prestashop/order-opc.tpl @@ -32,7 +32,6 @@ {else} - {capture name=path}{l s='My account'}{$navigationPipe}{l s='Credit slips'}{/capture} {include file="$tpl_dir./breadcrumb.tpl"} diff --git a/themes/prestashop/shopping-cart.tpl b/themes/prestashop/shopping-cart.tpl index fb1bc84a1..553c602dc 100644 --- a/themes/prestashop/shopping-cart.tpl +++ b/themes/prestashop/shopping-cart.tpl @@ -40,7 +40,6 @@ {else}