Asperience_Productextend - Version 0.1.5

Version Notes

If you have ideas for improvements or find bugs, please send them to Jean-Sébastien Hederer at contact@asperience.fr, with Asperience_Productextend as part of the subject line.

Download this release

Release Info

Developer Jean-Sébastien Hederer
Extension Asperience_Productextend
Version 0.1.5
Comparing to
See all releases


Code changes from version 0.1.4 to 0.1.5

app/code/community/Asperience/Productextend/Block/Adminhtml/Catalog/Product/Edit/Tab/Price/Promotion.php CHANGED
@@ -10,7 +10,7 @@ class Asperience_Productextend_Block_Adminhtml_Catalog_Product_Edit_Tab_Price_Pr
10
 
11
  public function __construct()
12
  {
13
- $this->setTemplate('productextend/catalog/product/edit/price/promotion.phtml');
14
  }
15
 
16
  public function getProduct()
10
 
11
  public function __construct()
12
  {
13
+ $this->setTemplate('asperience/productextend/catalog/product/edit/price/promotion.phtml');
14
  }
15
 
16
  public function getProduct()
app/code/community/Asperience/Productextend/Block/Adminhtml/Promotion.php CHANGED
@@ -12,7 +12,7 @@ class Asperience_Productextend_Block_Adminhtml_Promotion extends Mage_Adminhtml_
12
  {
13
  $this->_controller = 'adminhtml_promotion';
14
  $this->_blockGroup = 'productextend';
15
- $this->_headerText = Mage::helper('productextend')->__('Promotions history');
16
  parent::__construct();
17
  $this->_removeButton('add');
18
  }
12
  {
13
  $this->_controller = 'adminhtml_promotion';
14
  $this->_blockGroup = 'productextend';
15
+ $this->_headerText = Mage::helper('productextend')->__('Price changes history');
16
  parent::__construct();
17
  $this->_removeButton('add');
18
  }
app/code/community/Asperience/Productextend/Block/Adminhtml/Promotion/Grid.php CHANGED
@@ -12,7 +12,7 @@ class Asperience_Productextend_Block_Adminhtml_Promotion_Grid extends Mage_Admin
12
  {
13
  parent::__construct();
14
  $this->setId('promotionGrid');
15
- $this->setDefaultSort('promo_id');
16
  $this->setDefaultDir('DESC');
17
  $this->setSaveParametersInSession(true);
18
  }
@@ -70,7 +70,7 @@ class Asperience_Productextend_Block_Adminhtml_Promotion_Grid extends Mage_Admin
70
  ));
71
 
72
  $this->addColumn('special_price', array(
73
- 'header' => Mage::helper('productextend')->__('Special price'),
74
  'type' => 'price',
75
  'currency_code' => $store->getBaseCurrency()->getCode(),
76
  'index' => 'special_price',
@@ -89,7 +89,13 @@ class Asperience_Productextend_Block_Adminhtml_Promotion_Grid extends Mage_Admin
89
  'index' => 'special_to_date',
90
  'type' => 'datetime',
91
  ));
92
-
 
 
 
 
 
 
93
  $this->addColumn('site', array(
94
  'header' => Mage::helper('productextend')->__('Website'),
95
  'width' => '100px',
@@ -97,7 +103,19 @@ class Asperience_Productextend_Block_Adminhtml_Promotion_Grid extends Mage_Admin
97
  'sortable' => false,
98
  'index' => 'website_id',
99
  'type' => 'options',
100
- 'options' => Mage::getModel('core/website')->getCollection()->toOptionHash(),
 
 
 
 
 
 
 
 
 
 
 
 
101
  ));
102
 
103
  $this->addColumn('created_time', array(
@@ -129,4 +147,4 @@ class Asperience_Productextend_Block_Adminhtml_Promotion_Grid extends Mage_Admin
129
  return $this;
130
  }
131
 
132
- }
12
  {
13
  parent::__construct();
14
  $this->setId('promotionGrid');
15
+ $this->setDefaultSort('created_time');
16
  $this->setDefaultDir('DESC');
17
  $this->setSaveParametersInSession(true);
18
  }
70
  ));
71
 
72
  $this->addColumn('special_price', array(
73
+ 'header' => Mage::helper('productextend')->__('Special Price'),
74
  'type' => 'price',
75
  'currency_code' => $store->getBaseCurrency()->getCode(),
76
  'index' => 'special_price',
89
  'index' => 'special_to_date',
90
  'type' => 'datetime',
91
  ));
92
+
93
+ $this->addColumn('tier_price', array(
94
+ 'header' => Mage::helper('productextend')->__('Tier price changes'),
95
+ 'align' => 'left',
96
+ 'index' => 'tier_price',
97
+ ));
98
+
99
  $this->addColumn('site', array(
100
  'header' => Mage::helper('productextend')->__('Website'),
101
  'width' => '100px',
103
  'sortable' => false,
104
  'index' => 'website_id',
105
  'type' => 'options',
106
+ // 'options' => Mage::getModel('core/website')->getCollection()->toOptionHash(),
107
+ 'options' => Mage::getSingleton('adminhtml/system_store')->getWebsiteOptionHash(true),
108
+ ));
109
+
110
+ $this->addColumn('store', array(
111
+ 'header' => Mage::helper('productextend')->__('Store'),
112
+ 'width' => '100px',
113
+ 'align' =>'left',
114
+ 'sortable' => false,
115
+ 'index' => 'store_id',
116
+ 'type' => 'options',
117
+ // 'options' => Mage::getModel('core/store')->getCollection()->toOptionHash(),
118
+ 'options' => Mage::getSingleton('adminhtml/system_store')->getStoreOptionHash(true),
119
  ));
120
 
121
  $this->addColumn('created_time', array(
147
  return $this;
148
  }
149
 
150
+ }
app/code/community/Asperience/Productextend/Model/Mysql4/Promotion.php CHANGED
@@ -17,7 +17,8 @@ class Asperience_Productextend_Model_Mysql4_Promotion extends Mage_Core_Model_My
17
  {
18
  $select = $this->_getReadAdapter()->select()
19
  ->from(array('main_table'=>$this->getTable('promotion')))
20
- ->where('product_id=?', $productId);
 
21
  return $this->_getReadAdapter()->fetchCol($select);
22
  }
23
  }
17
  {
18
  $select = $this->_getReadAdapter()->select()
19
  ->from(array('main_table'=>$this->getTable('promotion')))
20
+ ->where('product_id=?', $productId)
21
+ ->order('created_time DESC');
22
  return $this->_getReadAdapter()->fetchCol($select);
23
  }
24
  }
app/code/community/Asperience/Productextend/Model/Observer.php CHANGED
@@ -11,9 +11,11 @@ class Asperience_Productextend_Model_Observer
11
 
12
  protected $_oldProduct = array();
13
  protected $_changeStatus = False;
 
14
  protected $_isNew = False;
15
  protected $_isNewPrice = False;
16
  protected $_isNewPriceSpecial = False;
 
17
 
18
  public function formatPrice($price)
19
  {
@@ -26,7 +28,6 @@ class Asperience_Productextend_Model_Observer
26
 
27
  public function productPrepareForm($observer)
28
  {
29
- // Mage::log($observer->getEvent()->getForm());
30
  $form = $observer->getEvent()->getForm();
31
  if ($promotion = $form->getElement('promotion_list')) {
32
  $promotion->setRenderer(
@@ -38,7 +39,7 @@ class Asperience_Productextend_Model_Observer
38
 
39
  protected function _sendMail($product)
40
  {
41
- if($product) {
42
  try {
43
  $translate = Mage::getSingleton('core/translate');
44
  $translate->setTranslateInline(false);
@@ -51,71 +52,91 @@ class Asperience_Productextend_Model_Observer
51
  'user' => Mage::getSingleton('admin/session')->getUser()->getUsername(),
52
  'date' => Mage::helper('core')->formatDate(null, 'full'),
53
  'comment' => '',
54
- 'title' => $this->__('Product Modification :')
 
 
55
  );
56
-
57
  //S'il y a un nouveau produit
58
  if($this->_isNew){
59
- $dataMail['title'] = $this->__('New product :');
60
- if(!$product->isGrouped()){
61
- $dataMail['comment'] .= $this->__('Price : ');
62
- $dataMail['comment'] .= $this->formatPrice($product->getPrice());
63
- if($this->_isNewPriceSpecial){
64
- $dataMail['comment'] .= '<br />'.$this->__('Special Price : ');
65
- $dataMail['comment'] .= $this->formatPrice($product->getSpecialPrice());
 
 
66
  }
67
- }
68
- }elseif($this->_changeStatus || $this->_isNewPrice || $this->_isNewPriceSpecial){
69
  //Si le statut du produit change
70
- if($this->_changeStatus){
71
  $dataMail['comment'] .= $this->__('Product Status Change : ');
72
  $dataMail['comment'] .= Mage::getSingleton('catalog/product_status')->getOptionText($this->_oldProduct['status']);
73
  $dataMail['comment'] .= ' -> '.Mage::getSingleton('catalog/product_status')->getOptionText($product->getStatus()).'<br />';
74
  }
75
- //Si le prix du produit existant a changé
76
- if($this->_isNewPrice){
 
77
  $dataMail['comment'] .= $this->__('Price : ');
78
  $dataMail['comment'] .= $this->formatPrice($this->_oldProduct['price']);
79
  $dataMail['comment'] .= ' -> '.$this->formatPrice($product->getPrice()).'<br />';
80
  }
 
81
  //Si le prix spécial du produit existant a changé
82
- if($this->_isNewPriceSpecial){
83
  $dataMail['comment'] .= $this->__('Special Price : ');
84
  $dataMail['comment'] .= $this->formatPrice($this->_oldProduct['special_price']);
85
- $dataMail['comment'] .= ' -> '.$this->formatPrice($product->getSpecialPrice());
 
 
 
 
 
 
86
  }
87
- }else{
88
- throw new Exception();
 
 
 
 
 
89
  }
90
 
91
- $postObject = new Varien_Object();
92
- $postObject->setData($dataMail);
93
-
94
- //Configuration des destinataires
95
- $emails = explode(',', Mage::getStoreConfig(Asperience_Productextend_Model_Promotion::XML_PATH_EMAIL_RECIPIENT));
96
- //Configuration du mail
97
- $mailTemplate = Mage::getModel('core/email_template');
98
- /* @var $mailTemplate Mage_Core_Model_Email_Template */
99
-
100
- foreach ($emails as $email) {
101
- $mailTemplate->setDesignConfig(array('area' => 'backend'))
102
- ->sendTransactional(
103
- Mage::getStoreConfig(Asperience_Productextend_Model_Promotion::XML_PATH_EMAIL_TEMPLATE),
104
- Mage::getStoreConfig(Asperience_Productextend_Model_Promotion::XML_PATH_EMAIL_SENDER),
105
- $email,
106
- null,
107
- array('data' => $postObject)
108
- );
109
-
110
- if (!$mailTemplate->getSentSuccess()) {
111
- throw new Exception();
112
- break;
113
- }
114
- }
115
-
116
- $translate->setTranslateInline(true);
 
 
 
117
 
118
  }catch (Exception $e) {
 
119
  Mage::getSingleton('core/session')->addError($this->__('An error arose during the sending of emails.'));
120
  }
121
  }
@@ -124,66 +145,115 @@ class Asperience_Productextend_Model_Observer
124
  public function savePromoAfter($observer)
125
  {
126
  $product = $observer->getEvent()->getProduct();
127
-
128
- //Si le produit est actif
129
- if($product->getStatus()==1 || Asperience_Productextend_Model_Promotion::XML_PATH_ALLOW_INACTIVE){
130
-
131
- //Si le produit est nouveau
132
- if($this->_isNew){
133
- //Si le nouveau produit est une promotion
134
- if(!$product->isGrouped() && $product->getSpecialPrice()){
135
- $this->_isNewPriceSpecial = True;
136
- }
137
- }else {
138
- //Si le produit change de statut
139
- if($this->_oldProduct['status'] != $product->getStatus()){
140
- $this->_changeStatus = True;
141
- }
142
- //Si le prix du produit existant à changé
143
- if($product->getPrice() != $this->_oldProduct['price']){
144
- $this->_isNewPrice = True;
145
- }
146
- //Si le prix spécial du produit existant est nouveau ou changé
147
- if($product->getSpecialPrice() && ($product->getSpecialPrice() != $this->_oldProduct['special_price'] ||
148
- $product->getSpecialFromDate() != $this->_oldProduct['special_date'])){
149
- $this->_isNewPriceSpecial = True;
150
- }
151
  }
152
-
153
- //S'il y a un nouveau produit ou un changement de prix: envoie de mail
154
- if($this->_isNew ||
155
- $this->_changeStatus && Mage::getStoreConfig(Asperience_Productextend_Model_Promotion::XML_PATH_ALLOW_STATUS)||
156
- $this->_isNewPrice && Mage::getStoreConfig(Asperience_Productextend_Model_Promotion::XML_PATH_ALLOW_PRICE)||
157
- $this->_isNewPriceSpecial && Mage::getStoreConfig(Asperience_Productextend_Model_Promotion::XML_PATH_ALLOW_SPE_PRICE)){
158
- $this->_sendMail($product);
 
 
 
 
 
 
 
 
 
 
159
  }
160
- }
161
-
162
- //s'il y a une promo: mise en base de données
163
- if($this->_isNewPriceSpecial && Mage::getStoreConfig(Asperience_Productextend_Model_Promotion::XML_PATH_ALLOW_SAVE)){
164
- Mage::getModel('productextend/promotion')->savePromo($product);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
165
  }
166
  }
167
 
168
  public function beforeSave($observer)
169
  {
170
  $product = $observer->getEvent()->getProduct();
171
- $productId = $product->getId();
172
-
173
- //Le produit existe
174
- if($productId){
175
- $product = Mage::getModel('catalog/product')
176
  ->load($productId);
177
- $this->_oldProduct = array(
178
- 'price' => $product->getPrice(),
179
- 'special_price' => $product->getSpecialPrice(),
180
- 'special_date' => $product->getSpecialFromDate(),
181
- 'status' => $product->getStatus()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
182
  );
183
- //Le produit est nouveau
184
- } elseif(Mage::getStoreConfig(Asperience_Productextend_Model_Promotion::XML_PATH_ALLOW_NEW)){
185
- $this->_isNew = True;
186
  }
187
  }
188
-
189
- }
11
 
12
  protected $_oldProduct = array();
13
  protected $_changeStatus = False;
14
+ protected $_isChange = False;
15
  protected $_isNew = False;
16
  protected $_isNewPrice = False;
17
  protected $_isNewPriceSpecial = False;
18
+ protected $_isNewTierPrice = False;
19
 
20
  public function formatPrice($price)
21
  {
28
 
29
  public function productPrepareForm($observer)
30
  {
 
31
  $form = $observer->getEvent()->getForm();
32
  if ($promotion = $form->getElement('promotion_list')) {
33
  $promotion->setRenderer(
39
 
40
  protected function _sendMail($product)
41
  {
42
+ if($product && ($product->getStatus() == 1 || Mage::getStoreConfig(Asperience_Productextend_Model_Promotion::XML_PATH_ALLOW_INACTIVE))) {
43
  try {
44
  $translate = Mage::getSingleton('core/translate');
45
  $translate->setTranslateInline(false);
52
  'user' => Mage::getSingleton('admin/session')->getUser()->getUsername(),
53
  'date' => Mage::helper('core')->formatDate(null, 'full'),
54
  'comment' => '',
55
+ 'title' => $this->__('Product Modification :'),
56
+ 'website' => $product->getWebsiteId(),
57
+ 'store' => $product->getStoreId(),
58
  );
 
59
  //S'il y a un nouveau produit
60
  if($this->_isNew){
61
+ if(Mage::getStoreConfig(Asperience_Productextend_Model_Promotion::XML_PATH_ALLOW_NEW)) {
62
+ $dataMail['title'] = $this->__('New product :');
63
+ if(!$product->isGrouped()){
64
+ $dataMail['comment'] .= $this->__('Price : ');
65
+ $dataMail['comment'] .= $this->formatPrice($product->getPrice());
66
+ if($this->_isNewPriceSpecial && Mage::getStoreConfig(Asperience_Productextend_Model_Promotion::XML_PATH_ALLOW_SPE_PRICE)){
67
+ $dataMail['comment'] .= '<br />'.$this->__('Special Price : ');
68
+ $dataMail['comment'] .= $this->formatPrice($product->getSpecialPrice());
69
+ }
70
  }
71
+ }
72
+ }else {
73
  //Si le statut du produit change
74
+ if($this->_changeStatus && Mage::getStoreConfig(Asperience_Productextend_Model_Promotion::XML_PATH_ALLOW_STATUS)){
75
  $dataMail['comment'] .= $this->__('Product Status Change : ');
76
  $dataMail['comment'] .= Mage::getSingleton('catalog/product_status')->getOptionText($this->_oldProduct['status']);
77
  $dataMail['comment'] .= ' -> '.Mage::getSingleton('catalog/product_status')->getOptionText($product->getStatus()).'<br />';
78
  }
79
+
80
+ //Si le prix du produit existant a changé
81
+ if($this->_isNewPrice && Mage::getStoreConfig(Asperience_Productextend_Model_Promotion::XML_PATH_ALLOW_PRICE)){
82
  $dataMail['comment'] .= $this->__('Price : ');
83
  $dataMail['comment'] .= $this->formatPrice($this->_oldProduct['price']);
84
  $dataMail['comment'] .= ' -> '.$this->formatPrice($product->getPrice()).'<br />';
85
  }
86
+
87
  //Si le prix spécial du produit existant a changé
88
+ if($this->_isNewPriceSpecial && Mage::getStoreConfig(Asperience_Productextend_Model_Promotion::XML_PATH_ALLOW_SPE_PRICE)){
89
  $dataMail['comment'] .= $this->__('Special Price : ');
90
  $dataMail['comment'] .= $this->formatPrice($this->_oldProduct['special_price']);
91
+ $dataMail['comment'] .= ' -> '.$this->formatPrice($product->getSpecialPrice()).'<br/>';
92
+ $dataMail['comment'] .= $this->__('Special Price From Date : ');
93
+ $dataMail['comment'] .= Mage::helper('core')->formatDate($this->_oldProduct['special_from_date']);
94
+ $dataMail['comment'] .= ' -> '.Mage::helper('core')->formatDate($product->getSpecialFromDate()).'<br/>';
95
+ $dataMail['comment'] .= $this->__('Special Price To Date : ');
96
+ $dataMail['comment'] .= Mage::helper('core')->formatDate($this->_oldProduct['special_to_date']);
97
+ $dataMail['comment'] .= ' -> '.Mage::helper('core')->formatDate($product->getSpecialToDate()).'<br/>';
98
  }
99
+
100
+ //Si le prix tiers du produit existant a changé
101
+ if($this->_isNewTierPrice && Mage::getStoreConfig(Asperience_Productextend_Model_Promotion::XML_PATH_ALLOW_TIER_PRICE)){
102
+ $dataMail['comment'] .= $this->__('Tier Price : ');
103
+ $dataMail['comment'] .= $this->formatPrice($this->_oldProduct['tier_price']);
104
+ $dataMail['comment'] .= ' -> '.$this->formatPrice($product->getData('tier_price'));
105
+ }
106
  }
107
 
108
+ if($dataMail['comment'] != '') {
109
+ $postObject = new Varien_Object();
110
+ $postObject->setData($dataMail);
111
+
112
+ //Configuration des destinataires
113
+ $emails = explode(',', Mage::getStoreConfig(Asperience_Productextend_Model_Promotion::XML_PATH_EMAIL_RECIPIENT));
114
+ //Configuration du mail
115
+ $mailTemplate = Mage::getModel('core/email_template');
116
+ /* @var $mailTemplate Mage_Core_Model_Email_Template */
117
+
118
+ foreach ($emails as $email) {
119
+ $mailTemplate->setDesignConfig(array('area' => 'backend'))
120
+ ->sendTransactional(
121
+ Mage::getStoreConfig(Asperience_Productextend_Model_Promotion::XML_PATH_EMAIL_TEMPLATE),
122
+ Mage::getStoreConfig(Asperience_Productextend_Model_Promotion::XML_PATH_EMAIL_SENDER),
123
+ $email,
124
+ null,
125
+ array('data' => $postObject)
126
+ );
127
+
128
+ if (!$mailTemplate->getSentSuccess()) {
129
+ throw new Exception();
130
+ break;
131
+ }
132
+ }
133
+
134
+ $translate->setTranslateInline(true);
135
+
136
+ }
137
 
138
  }catch (Exception $e) {
139
+ Mage::log($e);
140
  Mage::getSingleton('core/session')->addError($this->__('An error arose during the sending of emails.'));
141
  }
142
  }
145
  public function savePromoAfter($observer)
146
  {
147
  $product = $observer->getEvent()->getProduct();
148
+ $tprice_change = "";
149
+ $this->_isChange = False;
150
+ //Si le produit est nouveau
151
+ if($this->_isNew){
152
+ //Si le nouveau produit est une promotion
153
+ if(!$product->isGrouped() && $product->getSpecialPrice()){
154
+ $this->_isNewPriceSpecial = True;
155
+ $this->_isChange = True;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
156
  }
157
+ } else {
158
+ //Si le produit change de statut
159
+ if($product->getStatus() != $this->_oldProduct['status']){
160
+ $this->_changeStatus = True;
161
+ $this->_isChange = True;
162
+ }
163
+ //Si le prix du produit existant à changé
164
+ if($product->getPrice() != $this->_oldProduct['price']){
165
+ $this->_isNewPrice = True;
166
+ $this->_isChange = True;
167
+ }
168
+ //Si le prix spécial du produit existant est nouveau ou changé
169
+ if($product->getSpecialPrice() && ($product->getSpecialPrice() != $this->_oldProduct['special_price'] ||
170
+ $product->getSpecialFromDate() != $this->_oldProduct['special_from_date'] ||
171
+ $product->getSpecialToDate() != $this->_oldProduct['special_to_date'])){
172
+ $this->_isNewPriceSpecial = True;
173
+ $this->_isChange = True;
174
  }
175
+
176
+ //Analyse Tier Price
177
+ $product_data = $product->getData('tier_price');
178
+ $tprice_change = '';
179
+ if($product_data || $this->_oldProduct['tier_price']){
180
+ foreach($product_data as $key => $tprice) {
181
+ if($tprice['delete'] == 1) {
182
+ $changes_txt = '';
183
+ foreach ($tprice as $key => $value) { if($key != 'delete') $changes_txt .= "$key => $value<br/>"; };
184
+ $tprice_change .= _('Delete level:<br/>').$changes_txt;
185
+ $this->_isNewTierPrice = True;
186
+ $this->_isChange = True;
187
+ } elseif(!array_key_exists($key , $this->_oldProduct['tier_price'])) {
188
+ $changes_txt = '';
189
+ foreach ($tprice as $key => $value) { if($key != 'delete') $changes_txt .= "$key => $value<br/>"; };
190
+ $tprice_change .= _('Add level:<br/>').$changes_txt;
191
+ $this->_isNewTierPrice = True;
192
+ $this->_isChange = True;
193
+ } else {
194
+ $change = False;
195
+ $changes_txt = '';
196
+ foreach($tprice as $index => $data) {
197
+ if($index != 'delete' && $this->_oldProduct['tier_price'][$key][$index] != $data) {
198
+ $change = True;
199
+ $changes_txt .= _('Key:').$key._(' Index:').$index.':'.$this->_oldProduct['tier_price'][$key][$index].'=>'.$data.'<br/>';
200
+ }
201
+ }
202
+ if($change) {
203
+ $this->_isNewTierPrice = True;
204
+ $this->_isChange = True;
205
+ $tprice_change = _('Change level:<br/>').$changes_txt;
206
+ }
207
+ }
208
+ }
209
+ }
210
+ }
211
+
212
+ //S'il y a un changement: envoi de mail
213
+ if($this->_isChange) {
214
+ $this->_sendMail($product);
215
+ }
216
+
217
+ //Changement: mise en base de données
218
+ if($this->_isChange && Mage::getStoreConfig(Asperience_Productextend_Model_Promotion::XML_PATH_ALLOW_SAVE)){
219
+ Mage::getModel('productextend/promotion')->savePromo($product,$this->_oldProduct,$tprice_change,$this);
220
  }
221
  }
222
 
223
  public function beforeSave($observer)
224
  {
225
  $product = $observer->getEvent()->getProduct();
226
+ $productId = $product->getId();
227
+ if($productId){
228
+ //Le produit existe
229
+ $product = Mage::getModel('catalog/product')
 
230
  ->load($productId);
231
+
232
+ // Obtient une liste de colonnes
233
+ $tier_price = $product->getData('tier_price');
234
+ $website_id = array();
235
+ $cust_group = array();
236
+ $price_qty = array();
237
+ foreach ($tier_price as $key => $row) {
238
+ $website_id[$key] = $row['website_id'];
239
+ $cust_group[$key] = $row['cust_group'];
240
+ $price_qty[$key] = $row['price_qty'];
241
+ }
242
+
243
+ // Trie les données
244
+ array_multisort($website_id, SORT_ASC, $cust_group, SORT_ASC, $price_qty, SORT_ASC, $tier_price);
245
+ $this->_oldProduct = array(
246
+ 'store_id' => $product->getStoreId(),
247
+ 'price' => $product->getPrice(),
248
+ 'special_price' => $product->getSpecialPrice(),
249
+ 'special_from_date' => $product->getSpecialFromDate(),
250
+ 'special_to_date' => $product->getSpecialToDate(),
251
+ 'status' => $product->getStatus(),
252
+ 'tier_price' => $tier_price
253
  );
254
+ } else {
255
+ //Le produit est nouveau
256
+ $this->_isNew = True;
257
  }
258
  }
259
+ }
 
app/code/community/Asperience/Productextend/Model/Promotion.php CHANGED
@@ -18,6 +18,7 @@ class Asperience_Productextend_Model_Promotion extends Mage_Core_Model_Abstract
18
  const XML_PATH_ALLOW_NEW = 'catalog/productextend/allow_new';
19
  const XML_PATH_ALLOW_PRICE = 'catalog/productextend/allow_price';
20
  const XML_PATH_ALLOW_SPE_PRICE = 'catalog/productextend/allow_price_special';
 
21
  const XML_PATH_ALLOW_SAVE = 'catalog/productextend/allow_save';
22
 
23
  protected $_promoCollection = null;
@@ -28,18 +29,18 @@ class Asperience_Productextend_Model_Promotion extends Mage_Core_Model_Abstract
28
  $this->_init('productextend/promotion');
29
  }
30
 
31
- public function savePromo($product){
32
- $this->setProductId($product->getId())
33
- ->setPrice($product->getPrice())
34
- ->setTypeId($product->getTypeId())
35
- ->setSpecialPrice($product->getSpecialPrice())
36
  ->setSpecialFromDate($product->getSpecialFromDate())
37
  ->setSpecialToDate($product->getSpecialToDate())
 
 
 
38
  ->setUser(Mage::getSingleton('admin/session')->getUser()->getUsername())
39
  ->setCreatedTime(date("Y-m-d G:i:s", Mage::getModel('core/date')->timestamp(time())));
40
- if($webId = $product->getWebsiteIds()){
41
- $this->setWebsiteId($webId[0]);
42
- }
43
  $this->save();
44
  }
45
 
@@ -50,7 +51,6 @@ class Asperience_Productextend_Model_Promotion extends Mage_Core_Model_Abstract
50
  ->loadAllPromoByProduct($productId);
51
  }
52
  return $this->_promoCollection;
53
-
54
  }
55
 
56
  }
18
  const XML_PATH_ALLOW_NEW = 'catalog/productextend/allow_new';
19
  const XML_PATH_ALLOW_PRICE = 'catalog/productextend/allow_price';
20
  const XML_PATH_ALLOW_SPE_PRICE = 'catalog/productextend/allow_price_special';
21
+ const XML_PATH_ALLOW_TIER_PRICE = 'catalog/productextend/allow_price_tier';
22
  const XML_PATH_ALLOW_SAVE = 'catalog/productextend/allow_save';
23
 
24
  protected $_promoCollection = null;
29
  $this->_init('productextend/promotion');
30
  }
31
 
32
+ public function savePromo($product,$old_product,$tprice_change,$observer){
33
+ $this->setProductId($product->getId())
34
+ ->setPrice($product->getPrice())
35
+ ->setTypeId($product->getTypeId())
36
+ ->setSpecialPrice($product->getSpecialPrice())
37
  ->setSpecialFromDate($product->getSpecialFromDate())
38
  ->setSpecialToDate($product->getSpecialToDate())
39
+ ->setTierPrice($tprice_change)
40
+ ->setWebsiteId(Mage::app()->getStore($product->getStoreId())->getWebsiteId())
41
+ ->setStoreId($product->getStoreId())
42
  ->setUser(Mage::getSingleton('admin/session')->getUser()->getUsername())
43
  ->setCreatedTime(date("Y-m-d G:i:s", Mage::getModel('core/date')->timestamp(time())));
 
 
 
44
  $this->save();
45
  }
46
 
51
  ->loadAllPromoByProduct($productId);
52
  }
53
  return $this->_promoCollection;
 
54
  }
55
 
56
  }
app/code/community/Asperience/Productextend/etc/config.xml CHANGED
@@ -10,7 +10,7 @@
10
  <config>
11
  <modules>
12
  <Asperience_Productextend>
13
- <version>0.1.4</version>
14
  </Asperience_Productextend>
15
  </modules>
16
 
@@ -33,7 +33,7 @@
33
  <sort_order>32</sort_order>
34
  <children>
35
  <promos module="productextend">
36
- <title>Promotions history</title>
37
  <sort_order>11</sort_order>
38
  <action>productextend/adminhtml_promotion</action>
39
  </promos>
@@ -65,7 +65,7 @@
65
  <layout>
66
  <updates>
67
  <productextend>
68
- <file>productextend.xml</file>
69
  </productextend>
70
  </updates>
71
  </layout>
@@ -186,8 +186,9 @@
186
  <allow_new><![CDATA[1]]></allow_new>
187
  <allow_price><![CDATA[1]]></allow_price>
188
  <allow_price_special><![CDATA[1]]></allow_price_special>
 
189
  <allow_save><![CDATA[1]]></allow_save>
190
- <recipient_email><![CDATA[test@example.com]]></recipient_email>
191
  <email_price_template>catalog_productextend_email_price_template</email_price_template>
192
  <sender_email_identity>general</sender_email_identity>
193
  </productextend>
10
  <config>
11
  <modules>
12
  <Asperience_Productextend>
13
+ <version>0.1.5</version>
14
  </Asperience_Productextend>
15
  </modules>
16
 
33
  <sort_order>32</sort_order>
34
  <children>
35
  <promos module="productextend">
36
+ <title>Price changes history</title>
37
  <sort_order>11</sort_order>
38
  <action>productextend/adminhtml_promotion</action>
39
  </promos>
65
  <layout>
66
  <updates>
67
  <productextend>
68
+ <file>asperience/productextend.xml</file>
69
  </productextend>
70
  </updates>
71
  </layout>
186
  <allow_new><![CDATA[1]]></allow_new>
187
  <allow_price><![CDATA[1]]></allow_price>
188
  <allow_price_special><![CDATA[1]]></allow_price_special>
189
+ <allow_tier_price><![CDATA[1]]></allow_tier_price>
190
  <allow_save><![CDATA[1]]></allow_save>
191
+ <recipient_email><![CDATA[commercial@asperience.fr]]></recipient_email>
192
  <email_price_template>catalog_productextend_email_price_template</email_price_template>
193
  <sender_email_identity>general</sender_email_identity>
194
  </productextend>
app/code/community/Asperience/Productextend/etc/system.xml CHANGED
@@ -64,6 +64,15 @@
64
  <show_in_website>1</show_in_website>
65
  <show_in_store>1</show_in_store>
66
  </allow_price_special>
 
 
 
 
 
 
 
 
 
67
  <allow_save translate="label">
68
  <label>Save products in promotions history</label>
69
  <frontend_type>select</frontend_type>
@@ -105,4 +114,4 @@
105
  </groups>
106
  </catalog>
107
  </sections>
108
- </config>
64
  <show_in_website>1</show_in_website>
65
  <show_in_store>1</show_in_store>
66
  </allow_price_special>
67
+ <allow_tier_price translate="label">
68
+ <label>Allow alert when product tier price changes</label>
69
+ <frontend_type>select</frontend_type>
70
+ <source_model>adminhtml/system_config_source_yesno</source_model>
71
+ <sort_order>6</sort_order>
72
+ <show_in_default>1</show_in_default>
73
+ <show_in_website>1</show_in_website>
74
+ <show_in_store>1</show_in_store>
75
+ </allow_tier_price>
76
  <allow_save translate="label">
77
  <label>Save products in promotions history</label>
78
  <frontend_type>select</frontend_type>
114
  </groups>
115
  </catalog>
116
  </sections>
117
+ </config>
app/code/community/Asperience/Productextend/sql/productextend_setup/mysql4-upgrade-0.1.1-0.1.5.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @category ASPerience
4
+ * @package Asperience_Productextend
5
+ * @author ASPerience - www.asperience.fr
6
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
7
+ */
8
+
9
+ $installer = $this;
10
+
11
+ $installer->startSetup();
12
+
13
+ $installer->run("ALTER TABLE {$this->getTable('history_promotion')} ADD `tier_price` TEXT NOT NULL AFTER `special_to_date`");
14
+ $installer->run("ALTER TABLE {$this->getTable('history_promotion')} ADD `store_id` smallint(5) unsigned default '0' AFTER `website_id`");
15
+
16
+ $installer->endSetup();
app/design/adminhtml/default/default/layout/productextend.xml DELETED
@@ -1,16 +0,0 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * @category ASPerience
5
- * @package Asperience_Productextend
6
- * @author ASPerience - www.asperience.fr
7
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
- */
9
- -->
10
- <layout version="0.1.0">
11
- <productextend_adminhtml_promotion_index>
12
- <reference name="content">
13
- <block type="productextend/adminhtml_promotion" name="promotion" />
14
- </reference>
15
- </productextend_adminhtml_promotion_index>
16
- </layout>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/template/productextend/catalog/product/edit/price/promotion.phtml DELETED
@@ -1,42 +0,0 @@
1
- <?php
2
- /**
3
- * @category ASPerience
4
- * @package Asperience_Productextend
5
- * @author ASPerience - www.asperience.fr
6
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
7
- */
8
- ?>
9
-
10
- <tr>
11
- <td class="label"><?php echo $this->getElement()->getLabel() ?></td>
12
-
13
- <?php if($_promotions = $this->loadPromotions()): ?>
14
- <td colspan="10" class="grid tier">
15
- <table cellspacing="0" style="border:solid 1px #CBD3D4">
16
- <tr class="headings">
17
- <th><?php echo Mage::helper('productextend')->__('User') ?></th>
18
- <th><?php echo Mage::helper('productextend')->__('Price') ?></th>
19
- <th><?php echo Mage::helper('productextend')->__('Special price') ?></th>
20
- <th><?php echo Mage::helper('productextend')->__('Special Price From Date') ?></th>
21
- <th><?php echo Mage::helper('productextend')->__('Special Price To Date') ?></th>
22
- <th><?php echo Mage::helper('productextend')->__('Website') ?></th>
23
- <th class="last"><?php echo Mage::helper('productextend')->__('Created At') ?></th>
24
- </tr>
25
- <?php foreach($_promotions as $_promoId):
26
- $_promo = $this->getPromotion($_promoId) ?>
27
- <tr >
28
- <td><?php echo $_promo->getUser() ?></td>
29
- <td><?php echo Mage::helper('core')->currency($_promo->getPrice()) ?></td>
30
- <td><?php echo Mage::helper('core')->currency($_promo->getSpecialPrice()) ?></td>
31
- <td><?php echo Mage::helper('core')->formatDate($_promo->getSpecialFromDate()) ?></td>
32
- <td><?php echo Mage::helper('core')->formatDate($_promo->getSpecialToDate()) ?></td>
33
- <td><?php echo Mage::app()->getWebsite($_promo->getWebsiteId())->getName() ?></td>
34
- <td><?php echo $_promo->getCreatedTime() ?></td>
35
- </tr>
36
- <?php endforeach; ?>
37
- </table>
38
- </td>
39
- <?php else: ?>
40
- <td colspan="10" class="grid tier"><?php echo Mage::helper('productextend')->__('This product is not listed in the promotions history.')?></td>
41
- <?php endif; ?>
42
- </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/locale/fr_FR/Asperience_Productextend.csv CHANGED
@@ -1,15 +1,28 @@
1
- "Promotions history","Historique des promotions"
2
  "Product Alerts in internal","Alertes du produit en interne"
3
  "Deleted product","Produit supprimé"
4
  "An error arose during the sending of emails.","Une erreur est survenue lors de l'envoi d'emails."
 
 
5
  "Allow alert when there is a new product","Autoriser l'alerte quand il y a un nouveau produit"
 
6
  "Allow alert when product special price changes","Autoriser l'alerte quand le prix spécial du produit change"
7
- "Allow alerts when the product is inactive","Autoriser les alertes quand le produit est désactivé"
8
  "Allow alert when product status changes","Autoriser l'alerte quand le statut du produit change"
 
 
 
 
9
  "Save products in promotions history","Enregistrer les promotions dans l'historique"
10
  "New product :","Nouveau produit :"
11
  "Product Modification :","Modification du produit :"
12
  "Product Status Change : ","Changement de Statut : "
13
  "Price : ","Prix : "
14
- "Special Price : ","Prix spécial : "
 
 
15
  "This product is not listed in the promotions history.","Ce produit n'est pas répertorié dans l'historique des promotions."
 
 
 
 
 
1
+ "Price changes history","Historique des changements de prix"
2
  "Product Alerts in internal","Alertes du produit en interne"
3
  "Deleted product","Produit supprimé"
4
  "An error arose during the sending of emails.","Une erreur est survenue lors de l'envoi d'emails."
5
+ "Allow alert when product status changes","Autoriser l'alerte quand le statut du produit change"
6
+ "Allow alerts when the product is inactive","Autoriser les alertes quand le produit est désactivé"
7
  "Allow alert when there is a new product","Autoriser l'alerte quand il y a un nouveau produit"
8
+ "Allow alert when product price changes","Autoriser l'alerte quand le prix du produit change"
9
  "Allow alert when product special price changes","Autoriser l'alerte quand le prix spécial du produit change"
 
10
  "Allow alert when product status changes","Autoriser l'alerte quand le statut du produit change"
11
+ "Allow alert when product tier price changes","Autoriser l'alerte quand le prix tiers du produit change"
12
+ "Send Emails To","Envoyer les alertes à"
13
+ "Price alert Email Template","Modèle de mail d'alerte"
14
+ "Alert Email Sender","Emetteur des alertes"
15
  "Save products in promotions history","Enregistrer les promotions dans l'historique"
16
  "New product :","Nouveau produit :"
17
  "Product Modification :","Modification du produit :"
18
  "Product Status Change : ","Changement de Statut : "
19
  "Price : ","Prix : "
20
+ "Special Price : ","Prix promo : "
21
+ "Special Price From Date : ","A partir de : "
22
+ "Special Price To Date : ","Jusqu'à : "
23
  "This product is not listed in the promotions history.","Ce produit n'est pas répertorié dans l'historique des promotions."
24
+ "Price","Prix"
25
+ "Special Price","Prix promo"
26
+ "Special Price From Date","A partir de"
27
+ "Special Price To Date","Jusqu'à"
28
+ "Tier price changes","Modifications prix tiers"
package.xml CHANGED
@@ -1,25 +1,26 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Asperience_Productextend</name>
4
- <version>0.1.4</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">Open Software License (OSL 3.0)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Module allowing to send product alerts in internal and to historize promotions.</summary>
10
- <description>This module allows to send alerts during modifications on products. Indeed, an email is sent in internal when:
11
- - A new product is created
12
- - Product price is changed
13
- - Product status is changed
14
- - Product special price is changed
15
-
16
- This module is developed by the ASPerience French company.
17
- http://www.asperience.fr</description>
18
- <notes>If you have ideas for improvements or find bugs, please send them to Ronan Capitaine or Jean-S&#xE9;bastien Hederer at www.asperience.fr, with ASPerience Productextend as part of the subject line.</notes>
19
- <authors><author><name>Jean-S&#xE9;bastien Hederer</name><user>auto-converted</user><email>hedererjs@asperience.fr</email></author><author><name>Ronan Capitaine</name><user>auto-converted</user><email>capitainer@asperience.fr</email></author></authors>
20
- <date>2011-04-21</date>
21
- <time>12:11:36</time>
22
- <contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="productextend.xml" hash="e0a9d36ca38f943ff3946517bc3a9dc0"/></dir><dir name="template"><dir name="productextend"><dir name="catalog"><dir name="product"><dir name="edit"><dir name="price"><file name="promotion.phtml" hash="8f63bea1ed6a6942604a1a69886d75df"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="app"><dir name="etc"><dir name="modules"><file name="Asperience_Productextend.xml" hash="607c5850bc72f2c6fc7452a85657f95a"/></dir></dir></dir></target><target name="magecommunity"><dir name="Asperience"><dir name="Productextend"><dir name="Block"><dir name="Adminhtml"><dir name="Catalog"><dir name="Product"><dir name="Edit"><dir name="Tab"><dir name="Price"><file name="Promotion.php" hash="4feaa043b0afadb736789fb79e3f867f"/></dir></dir></dir></dir></dir><dir name="Promotion"><dir name="Grid"><dir name="Renderer"><file name="Products.php" hash="ae59c7cd384c82fda09baa2fb5174913"/></dir></dir><file name="Grid.php" hash="664b9edd5522c10875b9755ebedac9ff"/></dir><file name="Promotion.php" hash="0823551962e067c77f98137b92220766"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="PromotionController.php" hash="b371ace2eb96bb8a5135aea4032211b9"/></dir></dir><dir name="etc"><file name="config.xml" hash="75b01760b72358b452935dcebff427a3"/><file name="system.xml" hash="1c1a5e9b5881cd74b9c5f667c94499d1"/></dir><dir name="Helper"><file name="Data.php" hash="7a4ab078a15b8576710888b8323e9c79"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Promotion"><file name="Collection.php" hash="b53b2dd050281bc911f6b6c2038e1219"/></dir><file name="Promotion.php" hash="a734f2dd5e568ba6f3b0a58234b6edc8"/></dir><file name="Observer.php" hash="86b3a19231df035fe9ba1d285ab572ca"/><file name="Promotion.php" hash="d4f9bc7884de336f0f6e7568ec05fdc9"/></dir><dir name="sql"><dir name="productextend_setup"><file name="mysql4-install-0.1.0.php" hash="1f4685ed186c53e1530567ce1732bf5c"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="e72704ad932a3a63f134551fadb77d15"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><file name="asperience_product_alert.html" hash="7703bd13f66d22b2a46f8308b02a791b"/></dir></dir><file name="Asperience_Productextend.csv" hash="eebe23a253fa5aff679e36676561280b"/></dir><dir name="fr_FR"><dir name="template"><dir name="email"><file name="asperience_product_alert.html" hash="af405ef11aab0cd5795d0736533007c1"/></dir></dir><file name="Asperience_Productextend.csv" hash="c44ca9dd7aeb4dca59edbe698de7909e"/></dir></target></contents>
 
23
  <compatible/>
24
- <dependencies/>
25
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Asperience_Productextend</name>
4
+ <version>0.1.5</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">Open Software License (OSL 3.0)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Module allowing to send product alerts in internal and to historize promotions.</summary>
10
+ <description>This module allows to send alerts during modifications on products. Indeed, an email is sent for internal users when:&#xD;
11
+ - A new product is created&#xD;
12
+ - Product price is changed&#xD;
13
+ - Product status is changed&#xD;
14
+ - Product special price is changed&#xD;
15
+ - Product tier price is changed&#xD;
16
+ &#xD;
17
+ This module is developed by ASPerience, french company. &#xD;
18
+ &lt;a target="_blank" url="http://www.asperience.fr"&gt;http://www.asperience.fr&lt;/a&gt;</description>
19
+ <notes>If you have ideas for improvements or find bugs, please send them to Jean-S&#xE9;bastien Hederer at contact@asperience.fr, with Asperience_Productextend as part of the subject line.</notes>
20
+ <authors><author><name>Jean-S&#xE9;bastien Hederer</name><user>hedererjs</user><email>hedererjs@asperience.fr</email></author></authors>
21
+ <date>2012-07-15</date>
22
+ <time>19:58:45</time>
23
+ <contents><target name="magecommunity"><dir name="Asperience"><dir name="Productextend"><dir name="Block"><dir name="Adminhtml"><dir name="Catalog"><dir name="Product"><dir name="Edit"><dir name="Tab"><dir name="Price"><file name="Promotion.php" hash="8e09f30000d4d70ac05037eb97418fa3"/></dir></dir></dir></dir></dir><dir name="Promotion"><dir name="Grid"><dir name="Renderer"><file name="Products.php" hash="ae59c7cd384c82fda09baa2fb5174913"/></dir></dir><file name="Grid.php" hash="f6b43a7c2c28051752673b302cadeaad"/></dir><file name="Promotion.php" hash="cb8aaa7b745d6a95a416218123e5b603"/></dir></dir><dir name="Helper"><file name="Data.php" hash="7a4ab078a15b8576710888b8323e9c79"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Promotion"><file name="Collection.php" hash="b53b2dd050281bc911f6b6c2038e1219"/></dir><file name="Promotion.php" hash="3ec67dd19cdebf42a97fe857ac8a62d0"/></dir><file name="Observer.php" hash="109be67d5236d6dbb96389dd9e8a3765"/><file name="Promotion.php" hash="bd8eef8fc50b1f9715f135d4d999a2aa"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="PromotionController.php" hash="b371ace2eb96bb8a5135aea4032211b9"/></dir></dir><dir name="etc"><file name="config.xml" hash="e5bee60802bb43f60794c397204dceb6"/><file name="system.xml" hash="bf4ebc153a332f1d7d7f3cf5c08a2b6e"/></dir><dir name="sql"><dir name="productextend_setup"><file name="mysql4-install-0.1.0.php" hash="1f4685ed186c53e1530567ce1732bf5c"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="e72704ad932a3a63f134551fadb77d15"/><file name="mysql4-upgrade-0.1.1-0.1.5.php" hash="13e779030fabee51448ce6e58bf107eb"/></dir></dir></dir></dir></target><target name="magelocale"><dir><dir name="en_US"><file name="Asperience_Productextend.csv" hash="eebe23a253fa5aff679e36676561280b"/><dir name="template"><dir name="email"><file name="asperience_product_alert.html" hash="7703bd13f66d22b2a46f8308b02a791b"/></dir></dir></dir><dir name="fr_FR"><file name="Asperience_Productextend.csv" hash="f46d2cc7ec43945d442673b6c56e92f3"/><dir name="template"><dir name="email"><file name="asperience_product_alert.html" hash="af405ef11aab0cd5795d0736533007c1"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Asperience_Productextend.xml" hash="607c5850bc72f2c6fc7452a85657f95a"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="productextend.xml" hash=""/></dir></dir></dir></dir></target></contents>
24
  <compatible/>
25
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
26
  </package>