Beispiel #1
0
 public function __construct()
 {
     parent::__construct();
     $percent = Amasty_Rules_Helper_Data::TYPE_XY_PERCENT;
     $fixed = Amasty_Rules_Helper_Data::TYPE_XY_FIXED;
     // ampromo - is correct name, it is for comatibility with Auto Add Promo Items
     $this->_formScripts[] = " \n\t\t\tfunction ampromo_hide() {\n\t\t\t\t\$('rule_discount_qty').up().up().show();\n\t\t\t\t\$('rule_discount_step').up().up().show();\n\t\t\t\t\$('rule_apply_to_shipping').up().up().show();\n\t\t\t\t\$('rule_actions_fieldset').up().show();\n\t\t\t\t\n\t\t\t\t\$('rule_promo_sku').up().up().hide();\n\t\t\t\t\$('rule_promo_cats').up().up().hide();\n\t\t\t\n\t\t\t\tif ('ampromo_cart' == \$('rule_simple_action').value) {\n\t\t\t\t    \$('rule_actions_fieldset').up().hide(); \n\t\t\t\t\t\$('rule_discount_qty').up().up().hide();\n\t\t\t\t\t\$('rule_discount_step').up().up().hide();\n\t\t\t\t\t\n\t\t\t\t\t\$('rule_apply_to_shipping').up().up().hide();\n\t\t\t\t\t\$('rule_promo_sku').up().up().show();\n\t\t\t\t} \n\t\t\t\tif ('ampromo_items' == \$('rule_simple_action').value){\n\t\t\t\t\t\$('rule_apply_to_shipping').up().up().hide();\n\t\t\t\t\t\$('rule_promo_sku').up().up().show();\n\t\t\t\t}\n\t\t\t\tif ('{$percent}' == \$('rule_simple_action').value || '{$fixed}' == \$('rule_simple_action').value){\n\t\t\t\t\t\$('rule_promo_sku').up().up().show();\n\t\t\t\t\t\$('rule_promo_cats').up().up().show();\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\tampromo_hide(); \n        ";
 }
Beispiel #2
0
 public function __construct()
 {
     parent::__construct();
     $this->_formScripts[] = " \n\t\t\tfunction ampromo_hide() {\n\t\t\t\t\$('rule_discount_qty').up().up().show();\n\t\t\t\t\$('rule_discount_step').up().up().show();\n                                var s = \$('rule_apply_to_shipping');\n                                if (s) s.up().up().show();\n\t\t\t\t\$('rule_actions_fieldset').up().show();\n\t\t\t\t\$('rule_promo_sku').up().up().hide();\n\t\t\t\n\t\t\t\tif ('ampromo_cart' == \$('rule_simple_action').value) {\n\t\t\t\t    \$('rule_actions_fieldset').up().hide(); \n\t\t\t\t\t\$('rule_discount_qty').up().up().hide();\n\t\t\t\t\t\$('rule_discount_step').up().up().hide();\n\t\t\t\t\t\n\t\t\t\t\tif (s) s.up().up().hide();\n\t\t\t\t\t\$('rule_promo_sku').up().up().show();\n\t\t\t\t} \n\t\t\t\tif ('ampromo_items' == \$('rule_simple_action').value){\n\t\t\t\t\tif (s) s.up().up().hide();\n\t\t\t\t\t\$('rule_promo_sku').up().up().show();\n\t\t\t\t}\n\t\t\t}\n\t\t\tampromo_hide();\n        ";
 }