diff --git a/Helper/Data.php b/Helper/Data.php index 0e2fbfca..0696fdc2 100755 --- a/Helper/Data.php +++ b/Helper/Data.php @@ -669,6 +669,12 @@ public function checkUrlKey($resource, $object, $urlKey) if ($id = $object->getId()) { $select->where($resource->getIdFieldName() . ' != :object_id'); + $storeIds = $object->getStoreIds(); + if (!empty($storeIds)) { + foreach (explode(',', $storeIds) ?? [] as $store) { + $select->where("FIND_IN_SET(${store}, store_ids)"); + } + } $binds['object_id'] = (int)$id; }