本文整理汇总了PHP中Mage_Core_Model_Website::getStoreIds方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Model_Website::getStoreIds方法的具体用法?PHP Mage_Core_Model_Website::getStoreIds怎么用?PHP Mage_Core_Model_Website::getStoreIds使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Core_Model_Website
的用法示例。
在下文中一共展示了Mage_Core_Model_Website::getStoreIds方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetStoreIds
public function testGetStoreIds()
{
$this->assertEquals(array(1 => 1), $this->_model->getStoreIds());
}
示例2: _checkStoreTo
/**
* Check if it possible to copy into store "store_to"
*
* @param Mage_Core_Model_Website $website
* @param array $storeData
* @return \Mage_Catalog_Model_Api2_Product_Website_Validator_Admin_Website
*/
protected function _checkStoreTo($website, $storeData)
{
if (!isset($storeData['store_to']) || !is_numeric($storeData['store_to'])) {
$this->_addError(sprintf('Invalid value for "store_to" for the website with ID #%d.', $website->getId()));
return $this;
}
// Check if the store with the specified ID (to which we will copy the information) exists
// and if it belongs to the website being added
$storeTo = Mage::getModel('core/store')->load($storeData['store_to']);
if (!$storeTo->getId()) {
$this->_addError(sprintf('Store not found #%d for website #%d.', $storeData['store_to'], $website->getId()));
return $this;
}
if (!in_array($storeTo->getId(), $website->getStoreIds())) {
$this->_addError(sprintf('Store #%d to which we will copy the information does not belong' . ' to the website #%d being added.', $storeTo->getId(), $website->getId()));
}
return $this;
}
示例3: _getQuoteToImport
/**
* get quotes to import
*
* @param Mage_Core_Model_Website $website
* @param int $limit
* @param $modified
*
* @return mixed
*/
private function _getQuoteToImport(Mage_Core_Model_Website $website, $limit = 100, $modified = false)
{
$collection = $this->getCollection()->addFieldToFilter('store_id', array('in' => $website->getStoreIds()))->addFieldToFilter('customer_id', array('notnull' => true));
if ($modified) {
$collection->addFieldToFilter('modified', 1)->addFieldToFilter('imported', 1);
} else {
$collection->addFieldToFilter('imported', array('null' => true));
}
$collection->getSelect()->limit($limit);
return $collection;
}
示例4: _getReviewsToExport
private function _getReviewsToExport(Mage_Core_Model_Website $website, $limit = 100)
{
return $this->getCollection()->addFieldToFilter('review_imported', array('null' => 'true'))->addFieldToFilter('store_id', array('in' => $website->getStoreIds()))->setPageSize($limit);
}
示例5: _getModifiedWishlistToImport
private function _getModifiedWishlistToImport(Mage_Core_Model_Website $website, $limit = 100)
{
$collection = $this->getCollection()->addFieldToFilter('wishlist_modified', 1)->addFieldToFilter('store_id', array('in' => $website->getStoreIds()));
$collection->getSelect()->limit($limit);
return $collection;
}