/**
  * Get inherited conditions selectors
  *
  * @return array
  */
 public function getNewChildSelectOptions()
 {
     $children = array_merge_recursive(parent::getNewChildSelectOptions(), array(array('value' => $this->getType(), 'label' => Mage::helper('rule')->__('Conditions Combination'))));
     if ($this->getDateConditions()) {
         $children = array_merge_recursive($children, array(array('value' => array(Mage::getModel('enterprise_customersegment/segment_condition_uptodate')->getNewChildSelectOptions(), Mage::getModel('enterprise_customersegment/segment_condition_daterange')->getNewChildSelectOptions()), 'label' => Mage::helper('enterprise_customersegment')->__('Date Ranges'))));
     }
     $children = array_merge_recursive($children, array(Mage::getModel('enterprise_customersegment/segment_condition_product_attributes')->getNewChildSelectOptions()));
     return $children;
 }
 /**
  * Prepare operator select options
  *
  * @return Enterprise_CustomerSegment_Model_Segment_Condition_Product_Combine_List
  */
 public function loadOperatorOptions()
 {
     parent::loadOperatorOptions();
     $this->setOperatorOption(array('==' => Mage::helper('rule')->__('found'), '!=' => Mage::helper('rule')->__('not found')));
     return $this;
 }
Beispiel #3
0
 /**
  * Prepare base condition select which related with current condition combine
  *
  * @param $customer
  * @param $website
  * @return Varien_Db_Select
  */
 protected function _prepareConditionsSql($customer, $website)
 {
     $select = parent::_prepareConditionsSql($customer, $website);
     $select->limit(1);
     return $select;
 }
Beispiel #4
0
 /**
  * Get inherited conditions selectors
  *
  * @return array
  */
 public function getNewChildSelectOptions()
 {
     $conditions = array(array('value' => 'enterprise_customersegment/segment_condition_combine', 'label' => Mage::helper('enterprise_customersegment')->__('Conditions Combination')), array('value' => 'enterprise_customersegment/segment_condition_customer_address', 'label' => Mage::helper('enterprise_customersegment')->__('Customer Address')), Mage::getModel('enterprise_customersegment/segment_condition_customer')->getNewChildSelectOptions(), Mage::getModel('enterprise_customersegment/segment_condition_shoppingcart')->getNewChildSelectOptions(), array('value' => array(array('value' => 'enterprise_customersegment/segment_condition_product_combine_list', 'label' => Mage::helper('enterprise_customersegment')->__('Product List')), array('value' => 'enterprise_customersegment/segment_condition_product_combine_history', 'label' => Mage::helper('enterprise_customersegment')->__('Product History'))), 'label' => Mage::helper('enterprise_customersegment')->__('Products')), Mage::getModel('enterprise_customersegment/segment_condition_sales')->getNewChildSelectOptions());
     $conditions = array_merge_recursive(parent::getNewChildSelectOptions(), $conditions);
     return $conditions;
 }
 /**
  * Get list of available subconditions
  *
  * @return array
  */
 public function getNewChildSelectOptions()
 {
     $prefix = 'enterprise_customersegment/segment_condition_customer_address_';
     $result = array_merge_recursive(parent::getNewChildSelectOptions(), array(array('value' => $this->getType(), 'label' => Mage::helper('enterprise_customersegment')->__('Conditions Combination')), Mage::getModel($prefix . 'default')->getNewChildSelectOptions(), Mage::getModel($prefix . 'attributes')->getNewChildSelectOptions()));
     return $result;
 }
Beispiel #6
0
 public function __construct()
 {
     parent::__construct();
     $this->setType('enterprise_customersegment/segment_condition_order_address');
 }
 /**
  * Get inherited conditions selectors
  *
  * @return array
  */
 public function getNewChildSelectOptions()
 {
     return array_merge_recursive(parent::getNewChildSelectOptions(), array(Mage::getModel('enterprise_customersegment/segment_condition_order_status')->getNewChildSelectOptions(), array('value' => array(Mage::getModel('enterprise_customersegment/segment_condition_uptodate')->getNewChildSelectOptions(), Mage::getModel('enterprise_customersegment/segment_condition_daterange')->getNewChildSelectOptions()), 'label' => Mage::helper('enterprise_customersegment')->__('Date Ranges'))));
 }