From 7efe1ac265b70034b085b4432e36eb2c43d17136 Mon Sep 17 00:00:00 2001 From: skiv Date: Thu, 15 Nov 2012 16:08:00 +0400 Subject: [PATCH] Attributes --- src/classes/XLite/View/Model/Attribute.php | 7 +++++-- src/skins/admin/en/attributes/style.css | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/classes/XLite/View/Model/Attribute.php b/src/classes/XLite/View/Model/Attribute.php index 2237404fb1..57e3a35c80 100644 --- a/src/classes/XLite/View/Model/Attribute.php +++ b/src/classes/XLite/View/Model/Attribute.php @@ -74,8 +74,11 @@ protected function getFormFieldsForSectionDefault() if ($this->getModelObject()->getId()) { $this->schemaDefault['type'][self::SCHEMA_COMMENT] = 'Before editing attriubutes specific for the chosen type you should save the changes'; - if ($this->getModelObject()->getAttributeValuesCount()) { - $this->schemaDefault['type'][self::SCHEMA_COMMENT] .= '
There are products using this attribute!'; + if ( + $this->getModelObject()->getAttributeValuesCount() + || $this->getModelObject()->getProductClass()->getProductsCount() + ) { + $this->schemaDefault['type'][self::SCHEMA_COMMENT] .= '

Changing the type of a product attribute after having defined values for this attribute for some products will result in losing the defined attribute values'; } if ( diff --git a/src/skins/admin/en/attributes/style.css b/src/skins/admin/en/attributes/style.css index d6a6d9020f..0036ccd427 100644 --- a/src/skins/admin/en/attributes/style.css +++ b/src/skins/admin/en/attributes/style.css @@ -222,7 +222,7 @@ div.group table.list th.actions.left { } .ajax-container-loadable .select-attributetypes div.table-value .form-field-comment { - background: url("../images/icon_warning_round.png") no-repeat scroll 0px center transparent; + background: url("../images/icon_warning_round.png") no-repeat scroll 0 0 transparent; padding-left: 30px; color: #456583; float: left; @@ -273,6 +273,7 @@ div.group table.list th.actions.left { text-align: center; width: 440px; margin-top: 10px; + padding: 0 30px; } .ajax-container-loadable .model-form-buttons {