// Merge -> revision 8097

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8100 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-08-17 16:10:20 +00:00
parent 89bc665d48
commit 0aada6cc1e
41 changed files with 107 additions and 135 deletions
+15 -1
View File
@@ -3420,4 +3420,18 @@ class ProductCore extends ObjectModel
return false;
return true;
}
}
/**
* Checks if reference exists
* @return boolean
*/
public function existsRefInDatabase($reference)
{
$row = Db::getInstance()->getRow('
SELECT `reference`
FROM `'._DB_PREFIX_.'product` p
WHERE p.reference = "'.$reference.'"');
return isset($row['reference']);
}
}