本文整理汇总了PHP中Mage_Rule_Model_Condition_Combine类的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Rule_Model_Condition_Combine类的具体用法?PHP Mage_Rule_Model_Condition_Combine怎么用?PHP Mage_Rule_Model_Condition_Combine使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Mage_Rule_Model_Condition_Combine类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: validate
public function validate(Varien_Object $object)
{
// for optimization if we no conditions
if (!$this->getConditions()) {
return true;
}
$origProduct = null;
if ($object->getHasChildren() && $object->getProductType() == 'configurable') {
//remember original product
$origProduct = $object->getProduct();
$origSku = $object->getSku();
foreach ($object->getChildren() as $child) {
// only one itereation.
$categoryIds = array_merge($child->getProduct()->getCategoryIds(), $origProduct->getCategoryIds());
$categoryIds = array_unique($categoryIds);
$object->setProduct($child->getProduct());
$object->setSku($child->getSku());
$object->getProduct()->setCategoryIds($categoryIds);
}
}
$result = @Mage_Rule_Model_Condition_Combine::validate($object);
if ($origProduct) {
// restore original product
$object->setProduct($origProduct);
$object->setSku($origSku);
}
return $result;
}
开发者ID:xiaoguizhidao,项目名称:blingjewelry-prod,代码行数:28,代码来源:Combine.php
示例2: getConditions
/**
* Retrieve rule combine conditions model
*
* @return Mage_Rule_Model_Condition_Combine
*/
public function getConditions()
{
if (empty($this->_conditions)) {
$this->_resetConditions();
}
// Load rule conditions if it is applicable
if ($this->hasConditionsSerialized()) {
$conditions = $this->getConditionsSerialized();
if (!empty($conditions)) {
$conditions = unserialize($conditions);
if (is_array($conditions) && !empty($conditions)) {
$this->_conditions->loadArray($conditions);
}
}
$this->unsConditionsSerialized();
}
return $this->_conditions;
}
开发者ID:ksaltik,项目名称:tooldexlive,代码行数:23,代码来源:Abstract.php
示例3: _removeAttributeFromConditions
/**
* Remove catalog attribute condition by attribute code from rule conditions
*
* @param Mage_Rule_Model_Condition_Combine $combine
* @param string $attributeCode
*/
protected function _removeAttributeFromConditions($combine, $attributeCode)
{
$conditions = $combine->getConditions();
foreach ($conditions as $conditionId => $condition) {
if ($condition instanceof Mage_Rule_Model_Condition_Combine) {
$this->_removeAttributeFromConditions($condition, $attributeCode);
}
if ($condition instanceof Mage_SalesRule_Model_Rule_Condition_Product) {
if ($condition->getAttribute() == $attributeCode) {
unset($conditions[$conditionId]);
}
}
}
$combine->setConditions($conditions);
}
开发者ID:SalesOneGit,项目名称:s1_magento,代码行数:21,代码来源:Observer.php
示例4: getNewChildSelectOptions
public function getNewChildSelectOptions()
{
$conditions = Mage_Rule_Model_Condition_Combine::getNewChildSelectOptions();
$conditions = array_merge_recursive($conditions, array(array('label' => Mage::helper('amlanding')->__('Conditions Combination'), 'value' => 'amlanding/filter_condition_combine'), array('label' => Mage::helper('amlanding')->__('Custom Fields'), 'value' => array(array('label' => Mage::helper('amlanding')->__('Qty'), 'value' => 'amlanding/filter_condition_qty'), array('label' => Mage::helper('amlanding')->__('Min Price'), 'value' => 'amlanding/filter_condition_price_min'), array('label' => Mage::helper('amlanding')->__('Max Price'), 'value' => 'amlanding/filter_condition_price_max'), array('label' => Mage::helper('amlanding')->__('Final Price'), 'value' => 'amlanding/filter_condition_price_final'))), array('label' => Mage::helper('catalog')->__('Product Attribute'), 'value' => $this->_getProductAttributes())));
return $conditions;
}
开发者ID:CE-Webmaster,项目名称:CE-Hub,代码行数:6,代码来源:Combine.php
示例5: getNewChildSelectOptions
public function getNewChildSelectOptions()
{
if ($this->getRule()->getType()) {
$type = $this->getRule()->getType();
} else {
$type = Mage::app()->getRequest()->getParam('rule_type');
}
if ($type == Mirasvit_FeedExport_Model_Rule::TYPE_ATTRIBUTE) {
$itemAttributes = $this->_getProductAttributes();
$condition = 'product' . $this->getRulePrefix();
} else {
$itemAttributes = $this->_getPerformanceAttributes();
$condition = 'performance';
}
$attributes = array();
foreach ($itemAttributes as $code => $label) {
$group = Mage::helper('feedexport/html')->getAttributeGroup(str_replace(Mirasvit_FeedExport_Model_Rule_Condition_Combine_Parent::ATTR_CODE_PREFIX, '', $code));
$attributes[$group][] = array('value' => 'feedexport/rule_condition_' . $condition . '|' . $code, 'label' => $label);
}
$conditions = parent::getNewChildSelectOptions();
$conditions = array_merge_recursive($conditions, array(array('value' => 'feedexport/rule_condition_combine', 'label' => Mage::helper('feedexport')->__('Conditions Combination')), array('value' => 'feedexport/rule_condition_combine_parent', 'label' => Mage::helper('feedexport')->__('Parent Product Attributes'))));
foreach ($attributes as $group => $arrAttributes) {
$conditions = array_merge_recursive($conditions, array(array('label' => $group, 'value' => $arrAttributes)));
}
return $conditions;
}
开发者ID:santhosh400,项目名称:ecart,代码行数:26,代码来源:Combine.php
示例6: getNewChildSelectOptions
public function getNewChildSelectOptions()
{
$attributes = array();
$customAttributes = Mage::getSingleton('xtento_orderexport/export_condition_custom')->getCustomAttributes();
foreach ($customAttributes as $code => $label) {
if (preg_match('/xt\\_billing\\_/', $code)) {
$attributes[] = array('value' => 'xtento_orderexport/export_condition_address_billing|' . str_replace('xt_billing_', '', $code), 'label' => $label);
} else {
if (preg_match('/xt\\_shipping\\_/', $code)) {
$attributes[] = array('value' => 'xtento_orderexport/export_condition_address_shipping|' . str_replace('xt_shipping_', '', $code), 'label' => $label);
} else {
$attributes[] = array('value' => 'xtento_orderexport/export_condition_object|' . $code, 'label' => $label);
}
}
}
$otherAttributes = array();
$customOtherAttributes = Mage::getSingleton('xtento_orderexport/export_condition_custom')->getCustomNotMappedAttributes();
foreach ($customOtherAttributes as $code => $label) {
$otherAttributes[] = array('value' => 'xtento_orderexport/export_condition_object|' . $code, 'label' => $label);
}
$conditions = parent::getNewChildSelectOptions();
$conditions = array_merge_recursive($conditions, array(array('value' => 'xtento_orderexport/export_condition_product_found', 'label' => Mage::helper('salesrule')->__('Product / Item attribute combination')), array('value' => 'xtento_orderexport/export_condition_product_subselect', 'label' => Mage::helper('salesrule')->__('Products subselection')), array('value' => 'xtento_orderexport/export_condition_combine', 'label' => Mage::helper('salesrule')->__('Conditions combination')), array('label' => Mage::helper('xtento_orderexport')->__('%s Attributes', ucfirst(Mage::registry('order_export_profile')->getEntity())), 'value' => $attributes), array('label' => Mage::helper('xtento_orderexport')->__('Misc. %s Attributes', ucfirst(Mage::registry('order_export_profile')->getEntity())), 'value' => $otherAttributes)));
$additional = new Varien_Object();
Mage::dispatchEvent('xtento_orderexport_rule_condition_combine', array('additional' => $additional));
if ($additionalConditions = $additional->getConditions()) {
$conditions = array_merge_recursive($conditions, $additionalConditions);
}
return $conditions;
}
开发者ID:xiaoguizhidao,项目名称:devfashion,代码行数:29,代码来源:Combine.php
示例7: getNewChildSelectOptions
public function getNewChildSelectOptions()
{
$addressCondition = Mage::getModel('followupemail/followupemailrule_rule_condition_address');
$addressAttributes = $addressCondition->loadAttributeOptions()->getAttributeOption();
$cattributes = array();
$oattributes = array();
$cusattributes = array();
$pattributes = array();
foreach ($addressAttributes as $code => $label) {
if (strpos($code, 'cart_') === 0) {
$cattributes[] = array('value' => 'followupemail/followupemailrule_rule_condition_address|' . $code, 'label' => $label);
} else {
if (strpos($code, 'order_') === 0) {
$oattributes[] = array('value' => 'followupemail/followupemailrule_rule_condition_address|' . $code, 'label' => $label);
} else {
if (strpos($code, 'product_') === 0) {
$pattributes[] = array('value' => 'followupemail/followupemailrule_rule_condition_address|' . $code, 'label' => $label);
} else {
$cusattributes[] = array('value' => 'followupemail/followupemailrule_rule_condition_address|' . $code, 'label' => $label);
}
}
}
}
$conditions = parent::getNewChildSelectOptions();
$conditions = array_merge_recursive($conditions, array(array('label' => Mage::helper('followupemail')->__('Cart Attribute'), 'value' => $cattributes), array('label' => Mage::helper('followupemail')->__('Order Attribute'), 'value' => $oattributes), array('label' => Mage::helper('followupemail')->__('Has Product'), 'value' => $pattributes), array('label' => Mage::helper('followupemail')->__('Customer Attribute'), 'value' => $cusattributes)));
// $additional = new Varien_Object();
// //Mage::dispatchEvent('helpdesk_helpdeskrule_rule_condition_combine', array('additional' => $additional));
// Mage::dispatchEvent('salesrule_rule_condition_combine', array('additional' => $additional));
// if ($additionalConditions = $additional->getConditions()) {
// $conditions = array_merge_recursive($conditions, $additionalConditions);
// }
return $conditions;
}
开发者ID:santhosh400,项目名称:ecart,代码行数:33,代码来源:Combine.php
示例8: getNewChildSelectOptions
public function getNewChildSelectOptions()
{
$conditions = parent::getNewChildSelectOptions();
$conditions = array_merge_recursive($conditions, array(array('value' => 'rewardpoints/rule_condition_combine', 'label' => Mage::helper('rewardpoints')->__('Conditions Combination'))));
$c_attributes = array(array('value' => 'rewardpoints/rule_condition_customeraddress_params|postcode', 'label' => Mage::helper('rewardpoints')->__('User post code')), array('value' => 'rewardpoints/rule_condition_customeraddress_params|region_id', 'label' => Mage::helper('rewardpoints')->__('User region')), array('value' => 'rewardpoints/rule_condition_customeraddress_params|country_id', 'label' => Mage::helper('rewardpoints')->__('User country')));
/*$customer = Mage::getModel('customer/customer');
$c2_attributes = array();
foreach ($customer->getAttributes() as $attribute){
//echo $attribute->getAttributeCode();
//echo $attribute->getFrontendLabel();
//backend_type
if ($attribute->getBackendModel() == "" && $attribute->getFrontendLabel() != ""){
$c2_attributes[] = array('value'=>'rewardpoints/rule_condition_customerattribute_params|'.$attribute->getAttributeCode(), 'label'=> $attribute->getFrontendLabel());
}
}*/
$conditions = array_merge_recursive($conditions, array(array('label' => Mage::helper('rewardpoints')->__('User location'), 'value' => $c_attributes)));
/*$conditions = array_merge_recursive($conditions, array(
array('label'=>Mage::helper('rewardpoints')->__('User Attributes'), 'value'=>$c2_attributes),
));*/
$addressCondition = Mage::getModel('salesrule/rule_condition_address');
$addressAttributes = $addressCondition->loadAttributeOptions()->getAttributeOption();
$cart_attributes = array();
foreach ($addressAttributes as $code => $label) {
$cart_attributes[] = array('value' => 'salesrule/rule_condition_address|' . $code, 'label' => $label);
}
$conditions = array_merge_recursive($conditions, array(array('label' => Mage::helper('salesrule')->__('Cart Attributes'), 'value' => $cart_attributes)));
return $conditions;
}
开发者ID:ntnhan220488,项目名称:ggm,代码行数:29,代码来源:Combine.php
示例9: getNewChildSelectOptions
public function getNewChildSelectOptions()
{
$cAttributes[] = array('value' => 'Aitoc_Aitloyalty_Model_Rule_Condition_Customer|amount_during_period', 'label' => 'Amount spent during period');
$cAttributes[] = array('value' => 'Aitoc_Aitloyalty_Model_Rule_Condition_Customer|membership_period', 'label' => 'Period of membership');
$cAttributes[] = array('value' => 'Aitoc_Aitloyalty_Model_Rule_Condition_Customer|amount_average', 'label' => 'Average order amount during period');
$conditions = parent::getNewChildSelectOptions();
$conditions = array_merge_recursive($conditions, array(array('value' => 'Aitoc_Aitloyalty_Model_Rule_Condition_Customer_Combine', 'label' => Mage::helper('catalog')->__('Conditions Combination')), array('label' => Mage::helper('catalog')->__('Customer Data'), 'value' => $cAttributes)));
return $conditions;
}
开发者ID:sagmahajan,项目名称:aswan_release,代码行数:9,代码来源:Combine.php
示例10: loadArray
/**
* Add operator when loading array
*
* @param array $arr
* @param string $key
* @return Enterprise_CustomerSegment_Model_Segment_Condition_Combine
*/
public function loadArray($arr, $key = 'conditions')
{
if (isset($arr['operator'])) {
$this->setOperator($arr['operator']);
}
if (isset($arr['attribute'])) {
$this->setAttribute($arr['attribute']);
}
return parent::loadArray($arr, $key);
}
开发者ID:jpbender,项目名称:mage_virtual,代码行数:17,代码来源:Abstract.php
示例11: getNewChildSelectOptions
public function getNewChildSelectOptions()
{
$bannerConditions = Mage::getModel('prolabels/rule_condition_product')->loadAttributeOptions()->getAttributeOption();
$attributes = array();
foreach ($bannerConditions as $code => $label) {
$attributes[] = array('value' => 'prolabels/rule_condition_product|' . $code, 'label' => $label);
}
$conditions = parent::getNewChildSelectOptions();
$conditions = array_merge_recursive($conditions, array(array('value' => 'prolabels/rule_condition_combine', 'label' => Mage::helper('catalogrule')->__('Conditions Combination')), array('value' => $attributes, 'label' => Mage::helper('catalogrule')->__('Product'))));
return $conditions;
}
开发者ID:jokusafet,项目名称:MagentoSource,代码行数:11,代码来源:Combine.php
示例12: getNewChildSelectOptions
public function getNewChildSelectOptions()
{
$productCondition = Mage::getModel('Mage_CatalogRule_Model_Rule_Condition_Product');
$productAttributes = $productCondition->loadAttributeOptions()->getAttributeOption();
$attributes = array();
foreach ($productAttributes as $code => $label) {
$attributes[] = array('value' => 'Mage_CatalogRule_Model_Rule_Condition_Product|' . $code, 'label' => $label);
}
$conditions = parent::getNewChildSelectOptions();
$conditions = array_merge_recursive($conditions, array(array('value' => 'Mage_CatalogRule_Model_Rule_Condition_Combine', 'label' => Mage::helper('Mage_CatalogRule_Helper_Data')->__('Conditions Combination')), array('label' => Mage::helper('Mage_CatalogRule_Helper_Data')->__('Product Attribute'), 'value' => $attributes)));
return $conditions;
}
开发者ID:natxetee,项目名称:magento2,代码行数:12,代码来源:Combine.php
示例13: getNewChildSelectOptions
public function getNewChildSelectOptions()
{
$addressCondition = AO::getModel('salesrule/rule_condition_address');
$addressAttributes = $addressCondition->loadAttributeOptions()->getAttributeOption();
$attributes = array();
foreach ($addressAttributes as $code => $label) {
$attributes[] = array('value' => 'salesrule/rule_condition_address|' . $code, 'label' => $label);
}
$conditions = parent::getNewChildSelectOptions();
$conditions = array_merge_recursive($conditions, array(array('value' => 'salesrule/rule_condition_product_found', 'label' => AO::helper('salesrule')->__('Product attribute combination')), array('value' => 'salesrule/rule_condition_product_subselect', 'label' => AO::helper('salesrule')->__('Products subselection')), array('value' => 'salesrule/rule_condition_combine', 'label' => AO::helper('salesrule')->__('Conditions combination')), array('label' => AO::helper('salesrule')->__('Cart Attribute'), 'value' => $attributes)));
return $conditions;
}
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:12,代码来源:Rule_Condition_Combine.php
示例14: getNewChildSelectOptions
/**
* get child select options
* @return type
*/
public function getNewChildSelectOptions()
{
$orderAttributes = Mage::getModel('rewardpointsreferfriends/rule_condition_order')->loadAttributeOptions()->getAttributeOption();
$attributes = array();
foreach ($orderAttributes as $attribute => $label) {
$attributes[] = array('value' => 'rewardpointsreferfriends/rule_condition_order|' . $attribute, 'label' => $label);
}
$conditions = parent::getNewChildSelectOptions();
$conditions = array_merge_recursive($conditions, array(array('value' => 'salesrule/rule_condition_product_found', 'label' => Mage::helper('rewardpointsreferfriends')->__('Product attribute combination')), array('value' => 'salesrule/rule_condition_product_subselect', 'label' => Mage::helper('rewardpointsreferfriends')->__('Products subselection')), array('value' => 'rewardpointsreferfriends/rule_condition_combine', 'label' => Mage::helper('rewardpointsreferfriends')->__('Conditions combination')), array('value' => $attributes, 'label' => Mage::helper('rewardpointsreferfriends')->__('Cart Order Attribute'))));
$additional = new Varien_Object();
Mage::dispatchEvent('rewardpointsreferfriends_rule_condition_combine', array('additional' => $additional));
if ($additionalConditions = $additional->getConditions()) {
$conditions = array_merge_recursive($conditions, $additionalConditions);
}
return $conditions;
}
开发者ID:sshegde123,项目名称:wmp8,代码行数:20,代码来源:Combine.php
示例15: getNewChildSelectOptions
public function getNewChildSelectOptions()
{
$addressCondition = Mage::getModel('salesrule/rule_condition_address');
$addressAttributes = $addressCondition->loadAttributeOptions()->getAttributeOption();
$attributes = array();
foreach ($addressAttributes as $code => $label) {
$attributes[] = array('value' => 'salesrule/rule_condition_address|' . $code, 'label' => $label);
}
$conditions = parent::getNewChildSelectOptions();
$conditions = array_merge_recursive($conditions, array(array('value' => 'amacart/rule_condition_carts', 'label' => Mage::helper('amacart')->__('Number of recovered cards this month')), array('value' => 'salesrule/rule_condition_product_subselect', 'label' => Mage::helper('salesrule')->__('Products subselection')), array('value' => $this->getType(), 'label' => Mage::helper('salesrule')->__('Conditions combination')), array('label' => Mage::helper('salesrule')->__('Cart Attribute'), 'value' => $attributes)));
$additional = new Varien_Object();
Mage::dispatchEvent('salesrule_rule_condition_combine', array('additional' => $additional));
if ($additionalConditions = $additional->getConditions()) {
$conditions = array_merge_recursive($conditions, $additionalConditions);
}
return $conditions;
}
开发者ID:rcclaudrey,项目名称:dev,代码行数:17,代码来源:Combine.php
示例16: getNewChildSelectOptions
/**
* Retrieve the product options for the select field.
*
* @see Mage_Rule_Model_Condition_Abstract::getNewChildSelectOptions()
* @return array Conditions as array
*/
public function getNewChildSelectOptions()
{
$productCondition = Mage::getModel('dynamiccategory/rule_condition_product');
$productAttributes = $productCondition->loadAttributeOptions()->getAttributeOption();
$pAttributes = array();
$iAttributes = array();
foreach ($productAttributes as $code => $label) {
if (strpos($code, 'quote_item_') === 0) {
$iAttributes[] = array('value' => 'dynamiccategory/rule_condition_product|' . $code, 'label' => $label);
} else {
$pAttributes[] = array('value' => 'dynamiccategory/rule_condition_product|' . $code, 'label' => $label);
}
}
$conditions = parent::getNewChildSelectOptions();
$conditions = array_merge_recursive($conditions, array(array('value' => 'dynamiccategory/rule_condition_product_combine', 'label' => Mage::helper('dynamiccategory')->__('Conditions Combination')), array('label' => Mage::helper('dynamiccategory')->__('Product Attribute'), 'value' => $pAttributes)));
return $conditions;
}
开发者ID:amorkan,项目名称:firegento-dynamiccategory,代码行数:23,代码来源:Combine.php
示例17: getNewChildSelectOptions
public function getNewChildSelectOptions()
{
$addressCondition = Mage::getModel('Mage_SalesRule_Model_Rule_Condition_Address');
$addressAttributes = $addressCondition->loadAttributeOptions()->getAttributeOption();
$attributes = array();
foreach ($addressAttributes as $code => $label) {
$attributes[] = array('value' => 'Mage_SalesRule_Model_Rule_Condition_Address|' . $code, 'label' => $label);
}
$conditions = parent::getNewChildSelectOptions();
$conditions = array_merge_recursive($conditions, array(array('value' => 'Mage_SalesRule_Model_Rule_Condition_Product_Found', 'label' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Product attribute combination')), array('value' => 'Mage_SalesRule_Model_Rule_Condition_Product_Subselect', 'label' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Products subselection')), array('value' => 'Mage_SalesRule_Model_Rule_Condition_Combine', 'label' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Conditions combination')), array('label' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Cart Attribute'), 'value' => $attributes)));
$additional = new Varien_Object();
Mage::dispatchEvent('salesrule_rule_condition_combine', array('additional' => $additional));
if ($additionalConditions = $additional->getConditions()) {
$conditions = array_merge_recursive($conditions, $additionalConditions);
}
return $conditions;
}
开发者ID:nemphys,项目名称:magento2,代码行数:17,代码来源:Combine.php
示例18: getNewChildSelectOptions
public function getNewChildSelectOptions()
{
$productCondition = Mage::getModel('hipay/rule_condition_product');
$productAttributes = $productCondition->loadAttributeOptions()->getAttributeOption();
$pAttributes = array();
$iAttributes = array();
foreach ($productAttributes as $code => $label) {
if (strpos($code, 'order_item_') === 0) {
$iAttributes[] = array('value' => 'hipay/rule_condition_product|' . $code . '|' . $this->getPaymentMethodCode(), 'label' => $label);
} else {
$pAttributes[] = array('value' => 'hipay/rule_condition_product|' . $code . '|' . $this->getPaymentMethodCode(), 'label' => $label);
}
}
$conditions = parent::getNewChildSelectOptions();
$conditions = array_merge_recursive($conditions, array(array('value' => 'hipay/rule_condition_product_combine||' . $this->getPaymentMethodCode(), 'label' => Mage::helper('catalog')->__('Conditions Combination')), array('label' => Mage::helper('hipay')->__('Order Attribute'), 'value' => $iAttributes), array('label' => Mage::helper('catalog')->__('Product Attribute'), 'value' => $pAttributes)));
return $conditions;
}
开发者ID:hipay,项目名称:hipay-fullservice-sdk-magento1,代码行数:17,代码来源:Combine.php
示例19: getNewChildSelectOptions
public function getNewChildSelectOptions()
{
$addressCondition = Mage::getModel('hhennes_autogroups/rule_condition_address');
$addressAttributes = $addressCondition->loadAttributeOptions()->getAttributeOption();
$attributes = array();
foreach ($addressAttributes as $code => $label) {
$attributes[] = array('value' => 'hhennes_autogroups/rule_condition_address|' . $code, 'label' => $label);
}
$customerCondition = Mage::getModel('hhennes_autogroups/rule_condition_customer');
$customerAttributes = $customerCondition->loadAttributeOptions()->getAttributeOption();
$CustomersAttributes = array();
foreach ($customerAttributes as $code => $label) {
$CustomersAttributes[] = array('value' => 'hhennes_autogroups/rule_condition_customer|' . $code, 'label' => $label);
}
$conditions = parent::getNewChildSelectOptions();
$conditions = array_merge_recursive($conditions, array(array('label' => Mage::helper('hhennes_autogroups')->__('Address Attributes'), 'value' => $attributes), array('label' => Mage::helper('hhennes_autogroups')->__('Customer Attributes'), 'value' => $CustomersAttributes)));
return $conditions;
}
开发者ID:nenes25,项目名称:magento_customerautogroups,代码行数:18,代码来源:Combine.php
示例20: getNewChildSelectOptions
public function getNewChildSelectOptions()
{
$productCondition = Mage::getModel('salesrule/rule_condition_product');
$productAttributes = $productCondition->loadAttributeOptions()->getAttributeOption();
$pAttributes = array();
$pAttributes[] = array('value' => 'productlabels/rule_condition_product|is_new', 'label' => 'Is New');
$pAttributes[] = array('value' => 'productlabels/rule_condition_product|is_special', 'label' => 'Is Special Price');
$pAttributes[] = array('value' => 'productlabels/rule_condition_product|qty', 'label' => 'Qty');
$pAttributes[] = array('value' => 'productlabels/rule_condition_product|out_of_stock', 'label' => 'Is Out Of Stock');
$pAttributes[] = array('value' => 'productlabels/rule_condition_product|best_seller', 'label' => 'Amount Best Seller');
$iAttributes = array();
foreach ($productAttributes as $code => $label) {
if (strpos($code, 'quote_item_') === 0) {
$iAttributes[] = array('value' => 'salesrule/rule_condition_product|' . $code, 'label' => $label);
} else {
$pAttributes[] = array('value' => 'salesrule/rule_condition_product|' . $code, 'label' => $label);
}
}
$conditions = parent::getNewChildSelectOptions();
$conditions = array_merge_recursive($conditions, array(array('value' => 'salesrule/rule_condition_product_combine', 'label' => Mage::helper('catalog')->__('Conditions Combination')), array('label' => Mage::helper('catalog')->__('Product Attribute'), 'value' => $pAttributes)));
return $conditions;
}
开发者ID:novayadi85,项目名称:galatema,代码行数:22,代码来源:Combine.php
注:本文中的Mage_Rule_Model_Condition_Combine类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论