Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Product.php #141

Merged
merged 4 commits into from
Oct 30, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion classes/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -2369,6 +2369,7 @@ protected static function _getProductIdByDate($beginning, $ending, Context $cont

$id_address = $context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')};
$ids = Address::getCountryAndState($id_address);
$ids['id_country'] = $ids['id_country'] ?? null;
$id_country = $ids['id_country'] ? (int)$ids['id_country'] : (int)Configuration::get('PS_COUNTRY_DEFAULT');

return SpecificPrice::getProductIdByDate(
Expand Down Expand Up @@ -3706,7 +3707,7 @@ public static function cacheProductsFeatures($product_ids)
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
SELECT id_feature, id_product, id_feature_value
FROM `'._DB_PREFIX_.'feature_product`
WHERE `id_product` IN ('.implode($product_implode, ',').')');
WHERE `id_product` IN ('.implode( ',', $product_implode).')');
foreach ($result as $row) {
if (!array_key_exists($row['id_product'], self::$_cacheFeatures)) {
self::$_cacheFeatures[$row['id_product']] = array();
Expand Down