diff --git a/classes/CartRule.php b/classes/CartRule.php
index 240015b37..fdd5c706b 100644
--- a/classes/CartRule.php
+++ b/classes/CartRule.php
@@ -1477,10 +1477,7 @@ class CartRuleCore extends ObjectModel
*/
public static function isFeatureActive()
{
- static $is_feature_active = null;
- if ($is_feature_active === null) {
- $is_feature_active = (bool)Configuration::get('PS_CART_RULE_FEATURE_ACTIVE');
- }
+ $is_feature_active = (bool)Configuration::get('PS_CART_RULE_FEATURE_ACTIVE');
return $is_feature_active;
}
diff --git a/classes/Profile.php b/classes/Profile.php
index 1a9dabda2..39637163a 100644
--- a/classes/Profile.php
+++ b/classes/Profile.php
@@ -141,11 +141,18 @@ class ProfileCore extends ObjectModel
);
}
} else {
- $result = Db::getInstance()->executeS('
- SELECT *
- FROM `'._DB_PREFIX_.'access` a
- LEFT JOIN `'._DB_PREFIX_.'tab` t ON t.id_tab = a.id_tab
- WHERE `id_profile` = '.(int)$id_profile);
+ if ($result = Db::getInstance()->executeS('
+ SELECT * FROM `'._DB_PREFIX_.'access` a
+ LEFT JOIN `'._DB_PREFIX_.'tab` t ON t.id_tab = a.id_tab
+ WHERE `id_profile` = '.(int)$id_profile)
+ ) {
+ foreach ($result as $key => $profileAccess) {
+ $result[$key]['view'] = (int) $profileAccess['view'];
+ $result[$key]['delete'] = (int) $profileAccess['delete'];
+ $result[$key]['add'] = (int) $profileAccess['add'];
+ $result[$key]['edit'] = (int) $profileAccess['edit'];
+ }
+ }
foreach ($result as $row) {
self::$_cache_accesses[$id_profile][$type][$row[$type]] = $row;
diff --git a/classes/Tools.php b/classes/Tools.php
index 47b95a4aa..2ffec4434 100644
--- a/classes/Tools.php
+++ b/classes/Tools.php
@@ -2608,29 +2608,26 @@ FileETag none
public static function getDefaultIndexContent()
{
return '
-* @copyright 2007-'.date('Y').' PrestaShop SA
-* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
-* International Registered Trademark & Property of PrestaShop SA
+* @author Webkul IN
+* @copyright Since 2010 Webkul
+* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
diff --git a/classes/cache/CacheFs.php b/classes/cache/CacheFs.php
index 37ffd1f26..9adaa6bb0 100644
--- a/classes/cache/CacheFs.php
+++ b/classes/cache/CacheFs.php
@@ -37,7 +37,8 @@ class CacheFsCore extends Cache
$keys_filename = $this->getFilename(self::KEYS_NAME);
if (@filemtime($keys_filename)) {
- $this->keys = unserialize(file_get_contents($keys_filename));
+ $keys = @unserialize(file_get_contents($keys_filename));
+ $this->keys = is_array($keys) ? $keys : array();
}
}
diff --git a/classes/webservice/WebserviceSpecificManagementBookings.php b/classes/webservice/WebserviceSpecificManagementBookings.php
index 10e52dab0..3a547d3c7 100644
--- a/classes/webservice/WebserviceSpecificManagementBookings.php
+++ b/classes/webservice/WebserviceSpecificManagementBookings.php
@@ -507,7 +507,7 @@ class WebserviceSpecificManagementBookingsCore Extends ObjectModel implements We
$formattedRooms[$key]['occupancy'] = $occupancy;
if (isset($room['id_tax_rules_group'])) {
$formattedRooms[$key]['id_tax_rules_group'] = $room['id_tax_rules_group'];
- } else if ($room['total_tax']) {
+ } else if (isset($room['total_tax'])) {
$formattedRooms[$key]['total_tax'] = $room['total_tax'];
}
}
diff --git a/controllers/admin/AdminImportController.php b/controllers/admin/AdminImportController.php
index d2819efca..2e5bb151c 100644
--- a/controllers/admin/AdminImportController.php
+++ b/controllers/admin/AdminImportController.php
@@ -3223,7 +3223,25 @@ class AdminImportControllerCore extends AdminController
public function utf8EncodeArray($array)
{
- return (is_array($array) ? array_map('utf8_encode', $array) : mb_convert_encoding($array, 'UTF-8', 'ISO-8859-1'));
+ if (is_array($array)) {
+ return array_map(function ($value) {
+ if (is_array($value)) {
+ return $this->utf8EncodeArray($value);
+ }
+
+ if (!is_string($value)) {
+ return $value;
+ }
+
+ return mb_convert_encoding($value, 'UTF-8', 'ISO-8859-1');
+ }, $array);
+ }
+
+ if (!is_string($array)) {
+ return $array;
+ }
+
+ return mb_convert_encoding($array, 'UTF-8', 'ISO-8859-1');
}
protected function getNbrColumn($handle, $glue)
diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php
index eac62c06d..0062a2d7a 100644
--- a/controllers/admin/AdminOrdersController.php
+++ b/controllers/admin/AdminOrdersController.php
@@ -485,6 +485,7 @@ class AdminOrdersControllerCore extends AdminController
'advance_payment_amount_without_tax' => $cart->getOrderTotal(false, Cart::ADVANCE_PAYMENT),
'advance_payment_amount_with_tax' => $cart->getOrderTotal(true, Cart::ADVANCE_PAYMENT),
'cart' => $cart,
+ 'customer' => $cart->id_customer ? new Customer($cart->id_customer): null ,
'currencies' => Currency::getCurrenciesByIdShop(Context::getContext()->shop->id),
'langs' => Language::getLanguages(true, Context::getContext()->shop->id),
'payment_modules' => $payment_modules,
diff --git a/controllers/admin/AdminThemesController.php b/controllers/admin/AdminThemesController.php
index 8772b899b..45ff88ae5 100644
--- a/controllers/admin/AdminThemesController.php
+++ b/controllers/admin/AdminThemesController.php
@@ -1209,7 +1209,9 @@ class AdminThemesControllerCore extends AdminController
');
foreach ($hook_list as &$row) {
- $row['exceptions'] = trim(preg_replace('/(,,+)/', ',', $row['exceptions']), ',');
+ if($row['exceptions']){
+ $row['exceptions'] = trim(preg_replace('/(,,+)/', ',', $row['exceptions']), ',');
+ }
}
$native_modules = $this->getNativeModule();
diff --git a/modules/hotelreservationsystem/controllers/admin/AdminHotelFeaturePricesSettings.php b/modules/hotelreservationsystem/controllers/admin/AdminHotelFeaturePricesSettings.php
index d5731d87f..7c2158940 100644
--- a/modules/hotelreservationsystem/controllers/admin/AdminHotelFeaturePricesSettings.php
+++ b/modules/hotelreservationsystem/controllers/admin/AdminHotelFeaturePricesSettings.php
@@ -219,6 +219,60 @@ class AdminHotelFeaturePricesSettingsController extends ModuleAdminController
}
+ public function processBulkEnableSelection()
+ {
+ if (!is_array($this->boxes) || empty($this->boxes)) {
+ return parent::processBulkEnableSelection();
+ }
+
+ $objFeaturePriceRule = new HotelRoomTypeFeaturePricingRestriction();
+ $result = true;
+
+ foreach ($this->boxes as $id) {
+ $objFeaturePricing = new $this->className((int)$id);
+ if (!Validate::isLoadedObject($objFeaturePricing)) {
+ $this->errors[] = sprintf($this->l('Invalid advanced price rule ID %d.'), (int) $id);
+ $result = false;
+ continue;
+ }
+
+ if ($objFeaturePricing->active) {
+ continue;
+ }
+
+ if (
+ $objFeaturePricing->getDuplicateRestrictions(
+ $objFeaturePricing->id_product,
+ $objFeaturePricing->getGroups($objFeaturePricing->id),
+ $objFeaturePricing->id,
+ $objFeaturePriceRule->getRestrictionsByIdFeaturePrice($objFeaturePricing->id),
+ )
+ ) {
+ $this->errors[] = sprintf(
+ $this->l('Unable to activate Advanced Price Rule with ID #%d. A rule with similar conditions already exists.'),
+ (int) $id);
+ return;
+ }
+
+ $objFeaturePricing->setFieldsToUpdate(array('active' => true));
+ $objFeaturePricing->active = 1;
+ $isUpdated = (bool) $objFeaturePricing->update();
+ $result = $result && $isUpdated;
+
+ if (!$isUpdated) {
+ $this->errors[] = sprintf($this->l('Can\'t update #%d status.'), (int) $id);
+ }
+ }
+
+ if ($result) {
+ $this->redirect_after = self::$currentIndex.'&conf=5&token='.$this->token;
+ } else {
+ $this->errors[] = $this->l('An error occurred while updating the status.');
+ }
+
+ return $result;
+ }
+
public function initToolbar()
{
parent::initToolbar();
diff --git a/modules/qlopaypalcommerce/views/css/front/wk_payment.css b/modules/qlopaypalcommerce/views/css/front/wk_payment.css
index 27256b7ff..5843f2c29 100644
--- a/modules/qlopaypalcommerce/views/css/front/wk_payment.css
+++ b/modules/qlopaypalcommerce/views/css/front/wk_payment.css
@@ -45,3 +45,15 @@
@keyframes rotate {
0% {transform: rotate(0deg);}
100% {transform: rotate(360deg);}}
+
+p.payment_module a#qlo_paypal_btn {
+ background: url(../../img/paypal-payment-icon.png) 15px 8px no-repeat #fbfbfb;
+}
+
+.qlo_paypal_methods_wrapper {
+ text-align: center;
+ padding: 20px 15px;
+ background: #fbfbfb;
+ border-radius: 3px;
+ border: 1px solid #d6d4d4;
+}
diff --git a/modules/qlopaypalcommerce/views/img/index.php b/modules/qlopaypalcommerce/views/img/index.php
new file mode 100644
index 000000000..409280877
--- /dev/null
+++ b/modules/qlopaypalcommerce/views/img/index.php
@@ -0,0 +1,32 @@
+
-
-
- {l s='Please wait...' mod='qlopaypalcommerce'}
+
\ No newline at end of file
+