addJoin(ProductPeer::ID, sprintf('%s and %s = %s', AddPricePeer::ID, AddPricePeer::CURRENCY_ID, $currency->getId()), Criteria::LEFT_JOIN); } public static function exists($id, $currency_id) { $c = new Criteria(); $c->add(self::ID, $id); $c->add(self::CURRENCY_ID, $currency_id); return self::doCount($c) > 0; } public static function clearCache() { stPartialCache::clear('stProduct', '_productGroup', array('app' => 'frontend')); stPartialCache::clear('stProduct', '_new', array('app' => 'frontend')); stFastCacheManager::clearCache(); } }