Overview

Packages

  • currencysymbol
  • MAbout
  • Mage
    • Admin
    • Adminhtml
    • AdminNotification
    • Api
    • Api2
    • Authorizenet
    • Backup
    • Bundle
    • Captcha
    • Catalog
    • CatalogIndex
    • CatalogInventory
    • CatalogRule
    • CatalogSearch
    • Centinel
    • Checkout
    • Cms
    • Compiler
    • Connect
    • Contacts
    • Core
    • Cron
    • CurrencySymbol
    • Customer
    • Dataflow
    • Directory
    • DirtectPost
    • Downloadable
    • Eav
    • GiftMessage
    • GoogleAnalytics
    • GoogleBase
    • GoogleCheckout
    • ImportExport
    • Index
    • Install
    • Log
    • Media
    • Newsletter
    • Oauth
    • Page
    • PageCache
    • Paygate
    • Payment
    • Paypal
    • PaypalUk
    • Persistent
    • Poll
    • ProductAlert
    • Rating
    • Reports
    • Review
    • Rss
    • Rule
    • Sales
    • SalesRule
    • Sedfriend
    • Sendfriend
    • Shipping
    • Sitemap
    • Tag
    • Tax
    • Usa
    • Weee
    • Widget
    • Wishlist
    • XmlConnect
  • None
  • Phoenix
    • Moneybookers
  • PHP
  • Zend
    • Date
    • Mime
    • XmlRpc

Classes

  • Mage_CatalogRule_Helper_Data
  • Mage_CatalogRule_Model_Flag
  • Mage_CatalogRule_Model_Mysql4_Rule
  • Mage_CatalogRule_Model_Mysql4_Rule_Collection
  • Mage_CatalogRule_Model_Mysql4_Rule_Product_Price
  • Mage_CatalogRule_Model_Mysql4_Rule_Product_Price_Collection
  • Mage_CatalogRule_Model_Observer
  • Mage_CatalogRule_Model_Resource_Rule
  • Mage_CatalogRule_Model_Resource_Rule_Collection
  • Mage_CatalogRule_Model_Resource_Rule_Product_Price
  • Mage_CatalogRule_Model_Resource_Rule_Product_Price_Collection
  • Mage_CatalogRule_Model_Rule
  • Mage_CatalogRule_Model_Rule_Action_Collection
  • Mage_CatalogRule_Model_Rule_Action_Product
  • Mage_CatalogRule_Model_Rule_Condition_Combine
  • Mage_CatalogRule_Model_Rule_Condition_Product
  • Mage_CatalogRule_Model_Rule_Product_Price
  • Overview
  • Package
  • Class
  • Tree

Class Mage_CatalogRule_Model_Rule

Catalog Rule data model

Varien_Object
Extended by Mage_Core_Model_Abstract
Extended by Mage_Rule_Model_Abstract
Extended by Mage_CatalogRule_Model_Rule
Package: Mage\CatalogRule
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/CatalogRule/Model/Rule.php
Methods summary
protected
# _construct( )

Init resource model and id field

Init resource model and id field

public Mage_CatalogRule_Model_Rule_Condition_Combine
# getConditionsInstance( )

Getter for rule conditions collection

Getter for rule conditions collection

Returns

Mage_CatalogRule_Model_Rule_Condition_Combine
public Mage_CatalogRule_Model_Rule_Action_Collection
# getActionsInstance( )

Getter for rule actions collection

Getter for rule actions collection

Returns

Mage_CatalogRule_Model_Rule_Action_Collection
public array
# getCustomerGroupIds( )

Get catalog rule customer group Ids

Get catalog rule customer group Ids

Returns

array
public string
# getNow( )

Retrieve current date for current rule

Retrieve current date for current rule

Returns

string
public
# setNow( string $now )

Set current date for current rule

Set current date for current rule

Parameters

$now
string
$now
public array
# getMatchingProductIds( )

Get array of product ids which are matched by rule

Get array of product ids which are matched by rule

Returns

array
public
# callbackValidateProduct( mixed $args )

Callback function for product matching

Callback function for product matching

Parameters

$args
mixed
$args
public
# applyToProduct( integer|Mage_Catalog_Model_Product $product, array|null $websiteIds = null )

Apply rule to product

Apply rule to product

Parameters

$product
integer|Mage_Catalog_Model_Product
$product
$websiteIds
array|null
$websiteIds
public Mage_CatalogRule_Model_Rule
# applyAll( )

Apply all price rules, invalidate related cache and refresh price index

Apply all price rules, invalidate related cache and refresh price index

Returns

Mage_CatalogRule_Model_Rule
public Mage_CatalogRule_Model_Rule
# applyAllRulesToProduct( integer|Mage_Catalog_Model_Product $product )

Apply all price rules to product

Apply all price rules to product

Parameters

$product
integer|Mage_Catalog_Model_Product
$product

Returns

Mage_CatalogRule_Model_Rule
public float|null
# calcProductPriceRule( Mage_Catalog_Model_Product $product, float $price )

Calculate price using catalog price rule of product

Calculate price using catalog price rule of product

Parameters

$product
Mage_Catalog_Model_Product
$product
$price
float
$price

Returns

float|null
public
# setProductsFilter( integer|array $productIds )

Filtering products that must be checked for matching with rule

Filtering products that must be checked for matching with rule

Parameters

$productIds
integer|array
$productIds
public array|integer|null
# getProductsFilter( )

Returns products filter

Returns products filter

Returns

array|integer|null
protected Mage_CatalogRule_Model_Rule
# _invalidateCache( )

Invalidate related cache types

Invalidate related cache types

Returns

Mage_CatalogRule_Model_Rule
Methods inherited from Mage_Rule_Model_Abstract
_beforeSave(), _convertFlatToRecursive(), _resetActions(), _resetConditions(), getActions(), getConditions(), getForm(), getWebsiteIds(), isDeleteable(), isReadonly(), loadPost(), setActions(), setConditions(), setIsDeleteable(), setIsReadonly(), validate(), validateData()
Methods inherited from Mage_Core_Model_Abstract
_afterDelete(), _afterDeleteCommit(), _afterLoad(), _afterSave(), _beforeDelete(), _beforeLoad(), _clearData(), _clearReferences(), _getEventData(), _getResource(), _hasModelChanged(), _init(), _protectFromNonAdmin(), _setResourceModel(), afterCommitCallback(), afterLoad(), cleanModelCache(), clearInstance(), delete(), getCacheIdTags(), getCacheTags(), getCollection(), getEntityId(), getId(), getIdFieldName(), getResource(), getResourceCollection(), getResourceName(), isObjectNew(), load(), save(), setId()
Constants summary
string XML_NODE_RELATED_CACHE 'global/catalogrule/related_cache_types'
#

Related cache types config path

Related cache types config path

Properties summary
protected string $_eventPrefix 'catalogrule_rule'
#

Prefix of model events names

Prefix of model events names

protected string $_eventObject 'rule'
#

Parameter name in event

Parameter name in event

In observe method you can use $observer->getEvent()->getRule() in this case

protected array $_productIds
#

Store matched product Ids

Store matched product Ids

protected integer|array|null $_productsFilter null
#

Limitation for products collection

Limitation for products collection

protected string $_now
#

Store current date at "Y-m-d H:i:s" format

Store current date at "Y-m-d H:i:s" format

protected static array $_priceRulesData array()
#

Cached data of prices calculated by price rules

Cached data of prices calculated by price rules

Properties inherited from Mage_Rule_Model_Abstract
$_actions, $_conditions, $_form, $_isDeleteable, $_isReadonly
Properties inherited from Mage_Core_Model_Abstract
$_cacheTag, $_dataSaveAllowed, $_isObjectNew, $_resource, $_resourceCollectionName, $_resourceName
Magento 1.7.0.2 API documentation generated by ApiGen 2.8.0