Update Product.php

This commit is contained in:
abhishek-webkul
2023-09-11 20:03:39 +05:30
committed by GitHub
parent 80230795be
commit edffee0fbd

View File

@@ -2579,14 +2579,16 @@ class ProductCore extends ObjectModel
}
$id_address = $context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')};
$id_country = (int) Configuration::get('PS_COUNTRY_DEFAULT');
$ids = Address::getCountryAndState($id_address);
$id_country = null;
if (isset($ids['id_country']) && (int) $ids['id_country']) {
$id_country = (int) $ids['id_country'];
} else {
$id_country = (int) Configuration::get('PS_COUNTRY_DEFAULT');
}
return SpecificPrice::getProductIdByDate(
return SpecificPrice::getProductIdByDate(
$context->shop->id,
$context->currency->id,
$id_country,