Query whether or not the passed option/store ID combination has already been mapped.

@param integer $optionId The option ID to map
@param integer $storeId  The store ID to map

@return boolean TRUE if the combination has already been mapped, else FALSE
194104
protected function isMapped($optionId, $storeId)
    {
        return (isset($this->optionValueStoreMapping[$optionId]) && in_array($storeId, $this->optionValueStoreMapping[$optionId]));
    }
925909
public function getConfigDataDemoMode($storeId = null)
    {
        if ($storeId == null && Mage::app()->getStore()->isAdmin()) {
            $storeId = $this->getInfoInstance()->getOrder()->getStoreId();
        }

        return Mage::helper('adyen')->getConfigDataDemoMode($storeId);
    }
527748
public function actionRemove(int $productId, int $combinationId = null)
    {
        \Yii::$app->cart->removeItem($productId, $combinationId);
        return $this->redirect(\Yii::$app->request->referrer);
    }
50525
public function isEnabledForStore($key, $storeId = null)
    {
        try {
            if (!$storeId) {
                $storeId = $this->storeManager->getStore()->getId();
            }

            $websiteId = $this->storeManager->getStore($storeId)->getWebsiteId();

            if (!$this->isEnabledForWebsite($key, $websiteId)) {
                return false;
            }

            $stores = $this->jsonSerializer->unserialize($this->getConfigValue(self::STORE_SETTINGS, $websiteId));

            foreach ($stores as $store) {
                if ($store[StoreConfigInterface::STORE_ID_KEY] == $storeId) {
                    return true;
                }
            }
        } catch (\Exception $e) { //@codingStandardsIgnoreLine
        }

        return false;
    }
23258
public function exportCatalog($storeId, $limit)
    {
        $connectorProducts = [];
        $products = $this->getProductsToExport($storeId, $limit);

        foreach ($products as $product) {
            $connectorProduct = $this->connectorProductFactory->create()
                ->setProduct($product);
            $connectorProducts[$product->getId()] = $connectorProduct->expose();
        }

        return $connectorProducts;
    }
307165
protected function validateCombinationSkuProduct($index, &$combination)
    {
        if (!isset($combination['sku'])) {
            return null;
        }

        if ($combination['sku'] === '') {
            return true;
        }

        $updating = $this->getUpdating();

        $product_id = null;

        if (isset($updating['product_id'])) {
            $product_id = $updating['product_id'];
        }

        if (mb_strlen($combination['sku']) > 255) {
            $this->setErrorLengthRange("combination.$index.sku", $this->translation->text('SKU'), 0, 255);
            return false;
        }

        if (isset($this->processed_skus[$combination['sku']])) {
            $error = $this->translation->text('SKU must be unique per store');
            $this->setError("combination.$index.sku", $error);
            return false;
        }

        $store_id = $this->getSubmitted('store_id');
        $existing = $this->sku->get(array('sku' => $combination['sku'], 'store_id' => $store_id));

        if (isset($product_id) && isset($existing['product_id']) && $existing['product_id'] == $product_id) {
            $this->processed_skus[$combination['sku']] = true;
            return true;
        }

        if (!empty($existing)) {
            $error = $this->translation->text('SKU must be unique per store');
            $this->setError("combination.$index.sku", $error);
            return false;
        }

        $this->processed_skus[$combination['sku']] = true;
        return true;
    }
556925
public static function checkPatternOption($patternStoreKey,$optionName) {

		if (isset(self::$store[$patternStoreKey])) {
			return isset(self::$store[$patternStoreKey][$optionName]);
		}

		return false;

	}
114435
public function canDelete($store_id)
    {
        if ($this->isDefault($store_id)) {
            return false;
        }

        $sql = 'SELECT NOT EXISTS (SELECT store_id FROM product WHERE store_id=:id)
                AND NOT EXISTS (SELECT store_id FROM category_group WHERE store_id=:id)
                AND NOT EXISTS (SELECT store_id FROM page WHERE store_id=:id)
                AND NOT EXISTS (SELECT store_id FROM orders WHERE store_id=:id)
                AND NOT EXISTS (SELECT store_id FROM cart WHERE store_id=:id)
                AND NOT EXISTS (SELECT store_id FROM user WHERE store_id=:id)';

        return (bool) $this->db->fetchColumn($sql, array('id' => $store_id));
    }
988140
public function getProductBlacklist($categoryId, $storeId)
    {
        $select = $this->getBaseSelect()
            ->columns(['product_id'])
            ->where('category_id = ?', (int) $categoryId)
            ->where('store_id = ?', (int) $storeId)
            ->where('is_blacklisted = ?', (int) true);

        return $this->getConnection()->fetchCol($select);
    }
248318
protected function getCategoryProductSelect($productIds, $storeId)
    {
        $select = $this->getConnection()->select()
            ->from(['cpi' => $this->getTable($this->getCategoryProductIndexTable($storeId))])
            ->where('cpi.store_id = ?', $storeId)
            ->where('cpi.product_id IN(?)', $productIds);

        return $select;
    }
111137
protected function getAdditionalConfigString($storeId = null)
    {
        return $this->getScopeConfig()->getValue(
            self::XML_PATH_ADDITIONAL_CONFIG,
            ScopeInterface::SCOPE_STORE,
            $storeId
        ) ?: '{}';
    }
1349651
public function isLostBasketCustomerEnabled($num, $storeId)
    {
        return $this->scopeConfig->isSetFlag(
            constant('self::XML_PATH_LOSTBASKET_CUSTOMER_ENABLED_' . $num),
            \Magento\Store\Model\ScopeInterface::SCOPE_STORE,
            $storeId
        );
    }
611107
private function isPopularQuery($queryId, $storeId)
    {
        $popularQueryIds = $this->queryCollection
            ->setPopularQueryFilter($storeId)
            ->setPageSize($this->getMaxCountCacheableSearchTerms($storeId))
            ->load()
            ->getColumnValues('query_id');

        return count(array_intersect([$queryId], $popularQueryIds)) > 0 ;
    }
750486
public function removeItem(int $productId, int $combinationId = null)
    {
        if (!\Yii::$app->user->isGuest) {
            $order = Order::find()->where([
                'user_id' => \Yii::$app->user->id,
                'status' => OrderStatus::STATUS_INCOMPLETE
            ])->one();
            if (!empty($order)) {
                $orderProduct = OrderProduct::find()->where([
                    'product_id' => $productId,
                    'combination_id' => $combinationId,
                    'order_id' => $order->id
                ])->one();
                if (!empty($orderProduct)) {
                    $orderProduct->delete();
                }
            }
        } else {
            $session = Yii::$app->session;
            if ($session->has(self::SESSION_KEY)) {
                $products = $session[self::SESSION_KEY];
                foreach ($products as $key => $product) {
                    if ($product['id'] == $productId && $product['combinationId'] == $combinationId)
                        unset($_SESSION[self::SESSION_KEY][$key]);
                }
            }
        }
        $this->trigger(self::EVENT_AFTER_REMOVE_PRODUCT);
    }
499358
public function getExpansions($storeId)
    {
        $connection = $this->getConnection();
        $select     = $this->getBaseSelect($storeId, ThesaurusInterface::TYPE_EXPANSION);

        $select->join(
            ['expanded_terms' => $this->getTable(ThesaurusInterface::REFERENCE_TABLE_NAME)],
            'expanded_terms.term_id = terms.term_id AND expanded_terms.thesaurus_id = terms.thesaurus_id',
            []
        );

        $select->columns(['terms' => new \Zend_Db_Expr('CONCAT(expanded_terms.term, " => " ,GROUP_CONCAT(terms.term))')]);

        return $connection->fetchCol($select);
    }
1013358
public function loadById($productId)
    {
        return $this->productRepository->getById($productId, false, $this->storeManager->getStore()->getId(), true);
    }
559727
public function getSynonyms($storeId)
    {
        $connection = $this->getConnection();
        $select     = $this->getBaseSelect($storeId, ThesaurusInterface::TYPE_SYNONYM);

        $select->columns(['terms' => new \Zend_Db_Expr('GROUP_CONCAT(terms.term)')]);

        return $connection->fetchCol($select);
    }