Class Mage_SalesRule_Model_Resource_Rule_Collection
Sales Rules resource collection model
- Varien_Data_Collection_Db
- Mage_Core_Model_Resource_Db_Collection_Abstract
- Mage_Rule_Model_Resource_Rule_Collection_Abstract
- Mage_SalesRule_Model_Resource_Rule_Collection
Direct known subclasses
Mage_SalesRule_Model_Mysql4_Rule_Collection
Package: Mage\SalesRule
Category: Mage
Copyright: Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
License: Open Software License (OSL 3.0)
Author: Magento Core Team <core@magentocommerce.com>
Located at code/core/Mage/SalesRule/Model/Resource/Rule/Collection.php
Category: Mage
Copyright: Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
License: Open Software License (OSL 3.0)
Author: Magento Core Team <core@magentocommerce.com>
Located at code/core/Mage/SalesRule/Model/Resource/Rule/Collection.php
protected
|
|
public
|
#
setValidationFilter( integer $websiteId, integer $customerGroupId, string $couponCode = '', string|null $now = null )
Filter collection by specified website, customer group, coupon code, date. Filter collection to use only active rules. Involved sorting by sort_order column. |
public
|
#
addWebsiteGroupDateFilter( integer $websiteId, integer $customerGroupId, string|null $now = null )
Filter collection by website(s), customer group(s) and date. Filter collection to only active rules. Sorting is not involved |
public
|
|
public
|
#
addAttributeInConditionFilter( string $attributeCode )
Find product attribute in conditions or actions |
public
|
#
addAllowedSalesRulesFilter( )
Excludes price rules with generated specific coupon codes from collection |
_afterLoad(),
_getAssociatedEntityInfo(),
addFieldToFilter(),
addIsActiveFilter(),
addWebsiteFilter(),
addWebsitesToResult()
|
CACHE_TAG
|
protected
array
|
$_associatedEntitiesMap | array(
'website' => array(
'associations_table' => 'salesrule/website',
'rule_id_field' => 'rule_id',
'entity_id_field' => 'website_id'
),
'customer_group' => array(
'associations_table' => 'salesrule/customer_group',
'rule_id_field' => 'rule_id',
'entity_id_field' => 'customer_group_id'
)
) |
#
Store associated with rule entities information map |