1

enter image description here

how to remove product attribute from conditional select box

2

You can remove like this

go to

app\code\core\Mage\SalesRule\Model\Rule\Condition\Product.php

open this file and find this code

$attributes['quote_item_price'] = Mage::helper('salesrule')->__('Price in cart');

just comment this line. attribute will be removed.

Note: Please override the core file. Do not change in core file. Clear cache

0

Override this model function: Mage_SalesRule_Model_Rule_Condition_Product_Combine::getNewChildSelectOptions() to this:

/**
 * Generate a conditions data
 * @return array
 */
public function getNewChildSelectOptions()
{
    $conditions = parent::getNewChildSelectOptions();
    $conditions = array_merge_recursive(
        $conditions,
        array(
            array(
                'label' => Mage::helper('catalog')->__('Conditions Combination'),
                'value' => 'salesrule/rule_condition_product_combine'
            ),
            array(
                'label' => Mage::helper('catalog')->__('Cart Item Attribute'),
                'value' => $this->_getAttributeConditions(self::PRODUCT_ATTRIBUTES_TYPE_QUOTE_ITEM)
            ),
            // comment here
            /*
            array(
                'label' => Mage::helper('catalog')->__('Product Attribute'),
                'value' => $this->_getAttributeConditions(self::PRODUCT_ATTRIBUTES_TYPE_PRODUCT),
            ),
            */
            array(
                'label' => $this->_getHelper()->__('Product Attribute Assigned'),
                'value' => $this->_getAttributeConditions(self::PRODUCT_ATTRIBUTES_TYPE_ISSET)
            )
        )
    );
    return $conditions;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.