Version Notes
This update addresses some compatibility issues with PHP that should now be resolved. Feel free to replace current files as no new files are added.
Download this release
Release Info
Developer | SaveTheMage |
Extension | Bulk_Update_All_Product_Prices |
Version | 1.2.0 |
Comparing to | |
See all releases |
Code changes from version 1.1.2 to 1.2.0
- app/code/local/SaveTheMage/BulkUpdateAllProductPrices/Model/Worker.php +105 -0
- app/code/local/SaveTheMage/BulkUpdateAllProductPrices/controllers/AdminControllersHere/BulkUpdateAllProductPricesController.php +24 -140
- app/code/local/SaveTheMage/BulkUpdateAllProductPrices/etc/config.xml +9 -2
- app/design/adminhtml/default/default/template/SaveTheMage/tab_container_FormBulkUpdateAllProductPrices.phtml +8 -8
- package.xml +6 -6
app/code/local/SaveTheMage/BulkUpdateAllProductPrices/Model/Worker.php
ADDED
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Description of Worker
|
4 |
+
*
|
5 |
+
* @author Rezoanul Alam @ www.savethemage.com
|
6 |
+
*/
|
7 |
+
class SaveTheMage_BulkUpdateAllProductPrices_Model_Worker {
|
8 |
+
|
9 |
+
public function UpdatePrice($storeId, $priceToUpdate, $specialPriceToUpdate, $addOrSubtract, $percentOrFlat){
|
10 |
+
|
11 |
+
$_productCollection = array();
|
12 |
+
|
13 |
+
if( $storeId > -1 ){
|
14 |
+
$_productCollection = Mage::getModel('catalog/product')->setStoreId( $storeId )->getCollection();
|
15 |
+
}
|
16 |
+
else{
|
17 |
+
$_productCollection = Mage::getModel('catalog/product')->getCollection();
|
18 |
+
}
|
19 |
+
|
20 |
+
|
21 |
+
foreach( $_productCollection as $_product ){
|
22 |
+
|
23 |
+
$productId = $_product->getId();
|
24 |
+
$productObj = Mage::getModel('catalog/product')->load( $productId );
|
25 |
+
|
26 |
+
if( $priceToUpdate > 0 ){
|
27 |
+
$this->_updateThePrice($productObj, $percentOrFlat, $addOrSubtract, $priceToUpdate );
|
28 |
+
}
|
29 |
+
|
30 |
+
if( $specialPriceToUpdate > 0 ){
|
31 |
+
$this->_updateTheSpecialPrice($productObj, $percentOrFlat, $addOrSubtract, $specialPriceToUpdate );
|
32 |
+
}
|
33 |
+
|
34 |
+
}
|
35 |
+
|
36 |
+
}
|
37 |
+
|
38 |
+
private function _updateThePrice($productObj, $percentOrFlat, $addOrSubtract, $priceToUpdate ){
|
39 |
+
|
40 |
+
$price = $productObj->getPrice();
|
41 |
+
|
42 |
+
if( $price > 0 ){
|
43 |
+
|
44 |
+
switch( $percentOrFlat )
|
45 |
+
{
|
46 |
+
case "Percent":
|
47 |
+
|
48 |
+
if( $addOrSubtract == "ADD" ){
|
49 |
+
$price = $price + ( $price * ( $priceToUpdate / 100 ) );
|
50 |
+
}
|
51 |
+
else{
|
52 |
+
$price = $price - ( $price * ( $priceToUpdate / 100 ) );
|
53 |
+
}
|
54 |
+
break;
|
55 |
+
case "Flat":
|
56 |
+
if( $addOrSubtract == "ADD" ){
|
57 |
+
$price = $price + $priceToUpdate;
|
58 |
+
}
|
59 |
+
else{
|
60 |
+
$price = $price - $priceToUpdate;
|
61 |
+
}
|
62 |
+
break;
|
63 |
+
|
64 |
+
}
|
65 |
+
|
66 |
+
$productObj->setPrice( $price );
|
67 |
+
$productObj->save();
|
68 |
+
}
|
69 |
+
}
|
70 |
+
|
71 |
+
private function _updateTheSpecialPrice($productObj, $percentOrFlat, $addOrSubtract, $specialPriceToUpdate ){
|
72 |
+
|
73 |
+
$price = $productObj->getSpecialPrice();
|
74 |
+
|
75 |
+
if( $price > 0 ){
|
76 |
+
|
77 |
+
switch( $percentOrFlat )
|
78 |
+
{
|
79 |
+
case "Percent":
|
80 |
+
|
81 |
+
if( $addOrSubtract == "ADD" ){
|
82 |
+
$price = $price + ( $price * ( $specialPriceToUpdate / 100 ) );
|
83 |
+
}
|
84 |
+
else{
|
85 |
+
$price = $price - ( $price * ( $specialPriceToUpdate / 100 ) );
|
86 |
+
}
|
87 |
+
break;
|
88 |
+
case "Flat":
|
89 |
+
if( $addOrSubtract == "ADD" ){
|
90 |
+
$price = $price + $specialPriceToUpdate;
|
91 |
+
}
|
92 |
+
else{
|
93 |
+
$price = $price - $specialPriceToUpdate;
|
94 |
+
}
|
95 |
+
break;
|
96 |
+
|
97 |
+
}
|
98 |
+
|
99 |
+
$productObj->setSpecialPrice( $price );
|
100 |
+
$productObj->save();
|
101 |
+
}
|
102 |
+
}
|
103 |
+
}
|
104 |
+
|
105 |
+
?>
|
app/code/local/SaveTheMage/BulkUpdateAllProductPrices/controllers/AdminControllersHere/BulkUpdateAllProductPricesController.php
CHANGED
@@ -27,159 +27,43 @@ class SaveTheMage_BulkUpdateAllProductPrices_AdminControllersHere_BulkUpdateAllP
|
|
27 |
$PriceAdjustmentValue = $post->getParam('PriceAdjustmentValue'); //Done
|
28 |
$SpecialPriceAdjustmentValue = $post->getParam('SpecialPriceAdjustmentValue'); //Done
|
29 |
|
30 |
-
|
31 |
-
$prefix = Mage::getConfig()->getTablePrefix();
|
32 |
-
|
33 |
-
$msg = "";
|
34 |
-
|
35 |
-
//Check if price need to update or not
|
36 |
-
if( !empty( $PriceAdjustmentValue ) )
|
37 |
{
|
38 |
-
|
39 |
-
$sqlWhere = "val.attribute_id = (
|
40 |
-
SELECT attribute_id FROM " . $prefix . "eav_attribute eav
|
41 |
-
WHERE eav.entity_type_id in ( 4 , 10 )
|
42 |
-
AND eav.attribute_code = 'price'
|
43 |
-
)";
|
44 |
-
|
45 |
-
if( $storeId > -1 ) // For particular store
|
46 |
-
{
|
47 |
-
$sqlWhere = $sqlWhere . " AND val.store_id = $storeId";
|
48 |
-
|
49 |
-
}
|
50 |
-
|
51 |
-
$sqlPrice = "UPDATE " . $prefix ."catalog_product_entity_decimal val";
|
52 |
-
switch( $PercentOrFlat )
|
53 |
-
{
|
54 |
-
case "Percent":
|
55 |
-
|
56 |
-
$PriceAdjustmentValue = ( $PriceAdjustmentValue ) / 100 ;
|
57 |
-
|
58 |
-
if($AddOrSubtract == "ADD")
|
59 |
-
{
|
60 |
-
$sqlPrice .= " SET val.value = ( val.value + ( val.value * $PriceAdjustmentValue ) )";
|
61 |
-
}
|
62 |
-
else if($AddOrSubtract = "SUBTRACT")
|
63 |
-
{
|
64 |
-
$sqlPrice .= " SET val.value = ( val.value - ( val.value * $PriceAdjustmentValue ) )";
|
65 |
-
}
|
66 |
-
else
|
67 |
-
{
|
68 |
-
Mage::throwException($this->__('Invalid Operation.'));
|
69 |
-
}
|
70 |
-
break;
|
71 |
-
|
72 |
-
case "Flat":
|
73 |
-
|
74 |
-
if($AddOrSubtract == "ADD")
|
75 |
-
{
|
76 |
-
$sqlPrice .= " SET val.value = ( val.value + $PriceAdjustmentValue )";
|
77 |
-
}
|
78 |
-
else if($AddOrSubtract = "SUBTRACT")
|
79 |
-
{
|
80 |
-
$sqlPrice .= " SET val.value = ( val.value - $PriceAdjustmentValue )";
|
81 |
-
}
|
82 |
-
else
|
83 |
-
{
|
84 |
-
Mage::throwException($this->__('Invalid Operation.'));
|
85 |
-
}
|
86 |
-
break;
|
87 |
-
|
88 |
-
default:
|
89 |
-
Mage::throwException($this->__('Invalid Percent or Flat value.'));
|
90 |
}
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
//Run the query here
|
95 |
-
$write = Mage::getSingleton('core/resource')->getConnection('core_write');
|
96 |
-
$write->query( $sqlPrice );
|
97 |
-
|
98 |
-
$msg = "Price updated for all products successfully.";
|
99 |
}
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
$sqlSpecialWhere = "val.attribute_id = (
|
106 |
-
SELECT attribute_id FROM " . $prefix . "eav_attribute eav
|
107 |
-
WHERE eav.entity_type_id in ( 4 , 10 )
|
108 |
-
AND eav.attribute_code = 'special_price'
|
109 |
-
)";
|
110 |
|
111 |
-
|
|
|
112 |
{
|
113 |
-
|
114 |
-
|
115 |
}
|
116 |
-
|
117 |
-
$sqlSpecialPrice = "UPDATE " . $prefix ."catalog_product_entity_decimal val";
|
118 |
-
switch( $PercentOrFlat )
|
119 |
-
{
|
120 |
-
case "Percent":
|
121 |
-
|
122 |
-
$SpecialPriceAdjustmentValue = ( $SpecialPriceAdjustmentValue ) / 100 ;
|
123 |
-
|
124 |
-
if($AddOrSubtract == "ADD")
|
125 |
-
{
|
126 |
-
$sqlSpecialPrice .= " SET val.value = ( val.value + ( val.value * $SpecialPriceAdjustmentValue ) )";
|
127 |
-
}
|
128 |
-
else if($AddOrSubtract = "SUBTRACT")
|
129 |
-
{
|
130 |
-
$sqlSpecialPrice .= " SET val.value = ( val.value - ( val.value * $SpecialPriceAdjustmentValue ) )";
|
131 |
-
}
|
132 |
-
else
|
133 |
-
{
|
134 |
-
Mage::throwException($this->__('Invalid Operation.'));
|
135 |
-
}
|
136 |
-
break;
|
137 |
-
|
138 |
-
case "Flat":
|
139 |
|
140 |
-
|
141 |
-
|
142 |
-
$sqlSpecialPrice .= " SET val.value = ( val.value + $SpecialPriceAdjustmentValue )";
|
143 |
-
}
|
144 |
-
else if($AddOrSubtract = "SUBTRACT")
|
145 |
-
{
|
146 |
-
$sqlSpecialPrice .= " SET val.value = ( val.value - $SpecialPriceAdjustmentValue ) ";
|
147 |
-
}
|
148 |
-
else
|
149 |
-
{
|
150 |
-
Mage::throwException($this->__('Invalid Operation.'));
|
151 |
-
}
|
152 |
-
break;
|
153 |
|
154 |
-
|
155 |
-
|
|
|
|
|
|
|
|
|
|
|
156 |
}
|
157 |
|
158 |
-
$sqlSpecialPrice = $sqlSpecialPrice . " WHERE " . $sqlSpecialWhere;
|
159 |
-
|
160 |
-
//Run the query here
|
161 |
-
$write = Mage::getSingleton('core/resource')->getConnection('core_write');
|
162 |
-
$write->query( $sqlSpecialPrice );
|
163 |
-
|
164 |
-
if(!empty( $msg ))
|
165 |
-
$msg = "Special Price and " . $msg;
|
166 |
-
else
|
167 |
-
$msg = "Special Price for all products updated successfully.";
|
168 |
-
}
|
169 |
|
170 |
-
if( !empty( $msg ) )
|
171 |
-
{
|
172 |
-
$message = $this->__( $msg );
|
173 |
-
Mage::getSingleton('adminhtml/session')->addSuccess($message);
|
174 |
-
}
|
175 |
-
else
|
176 |
-
{
|
177 |
-
Mage::getSingleton('adminhtml/session')->addError("Price or Special price is required.");
|
178 |
-
}
|
179 |
-
|
180 |
} catch (Exception $e) {
|
181 |
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
182 |
}
|
183 |
-
|
184 |
}
|
|
|
185 |
}
|
27 |
$PriceAdjustmentValue = $post->getParam('PriceAdjustmentValue'); //Done
|
28 |
$SpecialPriceAdjustmentValue = $post->getParam('SpecialPriceAdjustmentValue'); //Done
|
29 |
|
30 |
+
if( $PriceAdjustmentValue == 0 && $SpecialPriceAdjustmentValue == 0 )
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
{
|
32 |
+
Mage::getSingleton('adminhtml/session')->addError("Price or Special price is required.");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
}
|
34 |
+
else if( $PercentOrFlat != 'Percent' && $PercentOrFlat !="Flat" ){
|
35 |
+
Mage::getSingleton('adminhtml/session')->addError("Percent or Flat is required.");
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
}
|
37 |
+
else if( $AddOrSubtract !='ADD' && $AddOrSubtract !='SUBTRACT' ){
|
38 |
+
Mage::getSingleton('adminhtml/session')->addError("Add or Subtract is required.");
|
39 |
+
}
|
40 |
+
else{
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
|
42 |
+
$model = Mage::getModel('savethemagebulkupdateallproductprices/Worker');
|
43 |
+
if( empty( $model ) )
|
44 |
{
|
45 |
+
require_once ( Mage::getBaseDir('app') . '/code/local/SaveTheMage/BulkUpdateAllProductPrices/Model/Worker.php');
|
46 |
+
$model = new SaveTheMage_BulkUpdateAllProductPrices_Model_Worker();
|
47 |
}
|
48 |
+
if( !empty( $model ) ){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
+
//UpdatePrice($storeId, $priceToUpdate, $specialPriceToUpdate, $addOrSubtract, $percentOrFlat)
|
51 |
+
$model->UpdatePrice($storeId, $PriceAdjustmentValue, $SpecialPriceAdjustmentValue, $AddOrSubtract, $PercentOrFlat);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
+
$msg = "Price or Special Price Updated successfully";
|
54 |
+
$message = $this->__( $msg );
|
55 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($message);
|
56 |
+
}
|
57 |
+
else{
|
58 |
+
Mage::getSingleton('adminhtml/session')->addError("Can't perform the operation right now, please contact with support@savethemage.com.");
|
59 |
+
}
|
60 |
}
|
61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
} catch (Exception $e) {
|
64 |
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
65 |
}
|
66 |
+
$this->_redirect('*/*');
|
67 |
}
|
68 |
+
|
69 |
}
|
app/code/local/SaveTheMage/BulkUpdateAllProductPrices/etc/config.xml
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
<config>
|
4 |
<modules>
|
5 |
<SaveTheMage_BulkUpdateAllProductPrices>
|
6 |
-
<version>1.1.
|
7 |
</SaveTheMage_BulkUpdateAllProductPrices>
|
8 |
</modules>
|
9 |
|
@@ -18,6 +18,13 @@
|
|
18 |
<class>SaveTheMage_BulkUpdateAllProductPrices_Helper</class>
|
19 |
</BulkUpdateAllProductPricesHelper1>
|
20 |
</helpers>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
</global>
|
22 |
|
23 |
<admin>
|
@@ -28,7 +35,7 @@
|
|
28 |
<module>SaveTheMage_BulkUpdateAllProductPrices_AdminControllersHere</module>
|
29 |
<frontName>BulkUpdateAllProductPrices</frontName>
|
30 |
<modules>
|
31 |
-
<
|
32 |
</modules>
|
33 |
</args>
|
34 |
</BulkUpdateAllProductPrices>
|
3 |
<config>
|
4 |
<modules>
|
5 |
<SaveTheMage_BulkUpdateAllProductPrices>
|
6 |
+
<version>1.1.2</version>
|
7 |
</SaveTheMage_BulkUpdateAllProductPrices>
|
8 |
</modules>
|
9 |
|
18 |
<class>SaveTheMage_BulkUpdateAllProductPrices_Helper</class>
|
19 |
</BulkUpdateAllProductPricesHelper1>
|
20 |
</helpers>
|
21 |
+
<models>
|
22 |
+
<!-- ... -->
|
23 |
+
<savethemagebulkupdateallproductprices>
|
24 |
+
<class>SaveTheMage_BulkUpdateAllProductPrices_Model</class>
|
25 |
+
</savethemagebulkupdateallproductprices>
|
26 |
+
<!-- ... -->
|
27 |
+
</models>
|
28 |
</global>
|
29 |
|
30 |
<admin>
|
35 |
<module>SaveTheMage_BulkUpdateAllProductPrices_AdminControllersHere</module>
|
36 |
<frontName>BulkUpdateAllProductPrices</frontName>
|
37 |
<modules>
|
38 |
+
<BulkUpdateAllProductPrices after="SaveTheMage_BulkUpdateAllProductPrices_AdminControllersHere">Mage_Adminhtml</BulkUpdateAllProductPrices>
|
39 |
</modules>
|
40 |
</args>
|
41 |
</BulkUpdateAllProductPrices>
|
app/design/adminhtml/default/default/template/SaveTheMage/tab_container_FormBulkUpdateAllProductPrices.phtml
CHANGED
@@ -68,16 +68,16 @@
|
|
68 |
</table>
|
69 |
</div>
|
70 |
<div class="entry-edit">
|
71 |
-
<form id="edit_form" name="edit_form" method="post" action="
|
72 |
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
73 |
-
<h4 class="fieldset-legend"
|
74 |
|
75 |
<strong id="message" class="label" style="color: #EA7601">You are about to ADD in all Product Prices in All Stores</strong>
|
76 |
|
77 |
<fieldset id="my-fieldset1">
|
78 |
<table cellspacing="0" class="form-list" style='border: 1px solid'>
|
79 |
<tr>
|
80 |
-
<td class="label"
|
81 |
<td class="input-ele">
|
82 |
|
83 |
<?php
|
@@ -114,7 +114,7 @@
|
|
114 |
?>
|
115 |
<?php if (count($_allStores) > 0): ?>
|
116 |
<select class="required-entry" name="storeId" id="storeId">
|
117 |
-
<option value="
|
118 |
<?php foreach($_allStores as $_eachStoreId): ?>
|
119 |
<option value="<?php echo Mage::app()->getStore($_eachStoreId)->getId() ?>">
|
120 |
<?php echo Mage::app()->getStore($_eachStoreId)->getName() ?>
|
@@ -133,7 +133,7 @@
|
|
133 |
<fieldset id="my-fieldset2">
|
134 |
<table cellspacing="0" class="form-list" style='border: 1px solid'>
|
135 |
<tr>
|
136 |
-
<td class="label"
|
137 |
<td class="input-ele">
|
138 |
<select id="AddOrSubtract" name="AddOrSubtract" class="required-entry">
|
139 |
<option value="ADD" selected>Add </option>
|
@@ -147,7 +147,7 @@
|
|
147 |
<fieldset id="my-fieldset3">
|
148 |
<table cellspacing="0" class="form-list" style='border: 1px solid'>
|
149 |
<tr>
|
150 |
-
<td class="label"
|
151 |
<td class="input-ele">
|
152 |
<select id="PercentOrFlat" name="PercentOrFlat" class="required-entry">
|
153 |
<option value="Flat" selected>Flat </option>
|
@@ -163,7 +163,7 @@
|
|
163 |
<tr>
|
164 |
<td class="label">
|
165 |
<div>
|
166 |
-
|
167 |
<div>
|
168 |
<p>( This will be the number as a flat values or percentage that will be used to adjust all product pricing in the
|
169 |
store. )</p>
|
@@ -172,7 +172,7 @@
|
|
172 |
<td class="input-ele"><input type='number' class="input-text <!--required-entry-->" name="PriceAdjustmentValue" id='PriceAdjustmentValue'/></td>
|
173 |
</tr>
|
174 |
<tr>
|
175 |
-
<td class="label"
|
176 |
<td class="input-ele"><input type='number' class="input-text" name="SpecialPriceAdjustmentValue" id="SpecialPriceAdjustmentValue"/></td>
|
177 |
</tr>
|
178 |
</table>
|
68 |
</table>
|
69 |
</div>
|
70 |
<div class="entry-edit">
|
71 |
+
<form id="edit_form" name="edit_form" method="post" action="<?php echo $this->getUrl('*/*/post') ?>">
|
72 |
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
73 |
+
<h4 class="fieldset-legend"><?php echo $this->__('Bulk Adjust All Product Prices')?></h4>
|
74 |
|
75 |
<strong id="message" class="label" style="color: #EA7601">You are about to ADD in all Product Prices in All Stores</strong>
|
76 |
|
77 |
<fieldset id="my-fieldset1">
|
78 |
<table cellspacing="0" class="form-list" style='border: 1px solid'>
|
79 |
<tr>
|
80 |
+
<td class="label"><?php echo $this->__('Choose Store:')?> <span class="required">*</span></td>
|
81 |
<td class="input-ele">
|
82 |
|
83 |
<?php
|
114 |
?>
|
115 |
<?php if (count($_allStores) > 0): ?>
|
116 |
<select class="required-entry" name="storeId" id="storeId">
|
117 |
+
<option value="-1"> All Stores </option>
|
118 |
<?php foreach($_allStores as $_eachStoreId): ?>
|
119 |
<option value="<?php echo Mage::app()->getStore($_eachStoreId)->getId() ?>">
|
120 |
<?php echo Mage::app()->getStore($_eachStoreId)->getName() ?>
|
133 |
<fieldset id="my-fieldset2">
|
134 |
<table cellspacing="0" class="form-list" style='border: 1px solid'>
|
135 |
<tr>
|
136 |
+
<td class="label"><?php echo $this->__('Add Or Subtract:')?> <span class="required">*</span></td>
|
137 |
<td class="input-ele">
|
138 |
<select id="AddOrSubtract" name="AddOrSubtract" class="required-entry">
|
139 |
<option value="ADD" selected>Add </option>
|
147 |
<fieldset id="my-fieldset3">
|
148 |
<table cellspacing="0" class="form-list" style='border: 1px solid'>
|
149 |
<tr>
|
150 |
+
<td class="label"><?php echo $this->__('Percent or Flat:')?> <span class="required">*</span></td>
|
151 |
<td class="input-ele">
|
152 |
<select id="PercentOrFlat" name="PercentOrFlat" class="required-entry">
|
153 |
<option value="Flat" selected>Flat </option>
|
163 |
<tr>
|
164 |
<td class="label">
|
165 |
<div>
|
166 |
+
<?php echo $this->__('Price Adjustment Value:')?></div>
|
167 |
<div>
|
168 |
<p>( This will be the number as a flat values or percentage that will be used to adjust all product pricing in the
|
169 |
store. )</p>
|
172 |
<td class="input-ele"><input type='number' class="input-text <!--required-entry-->" name="PriceAdjustmentValue" id='PriceAdjustmentValue'/></td>
|
173 |
</tr>
|
174 |
<tr>
|
175 |
+
<td class="label"><?php echo $this->__('Special Price Adjustment Value:')?></td>
|
176 |
<td class="input-ele"><input type='number' class="input-text" name="SpecialPriceAdjustmentValue" id="SpecialPriceAdjustmentValue"/></td>
|
177 |
</tr>
|
178 |
</table>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Bulk_Update_All_Product_Prices</name>
|
4 |
-
<version>1.
|
5 |
<stability>stable</stability>
|
6 |
<license>(GPL)</license>
|
7 |
<channel>community</channel>
|
@@ -14,11 +14,11 @@ Changes can be made per store view. 
|
|
14 |
You can ADD a flat value or percentage to all products prices.
|
15 |

|
16 |
You can also SUBTRACT a flat value or percentage from all product prices.</description>
|
17 |
-
<notes>This
|
18 |
-
<authors><author><name>
|
19 |
-
<date>2013-05-
|
20 |
-
<time>
|
21 |
-
<contents><target name="magelocal"><dir name="SaveTheMage"><dir name="BulkUpdateAllProductPrices"><dir name="Block"><file name="BlockForFormBulkUpdateAllProductPrices.php" hash="d0c50d3220e883b24d6853f3166d5889"/><file name="ShowTabsAdminBlock.php" hash="3a239e073360ad05262bd3803df9a512"/></dir><dir name="Helper"><file name="Data.php" hash="9c5adce1896448a6302cc7275be25953"/></dir><dir name="controllers"><dir name="AdminControllersHere"><file name="BulkUpdateAllProductPricesController.php" hash="
|
22 |
<compatible/>
|
23 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
24 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Bulk_Update_All_Product_Prices</name>
|
4 |
+
<version>1.2.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>(GPL)</license>
|
7 |
<channel>community</channel>
|
14 |
You can ADD a flat value or percentage to all products prices.
|
15 |

|
16 |
You can also SUBTRACT a flat value or percentage from all product prices.</description>
|
17 |
+
<notes>This update addresses some compatibility issues with PHP that should now be resolved. Feel free to replace current files as no new files are added.</notes>
|
18 |
+
<authors><author><name>SaveTheMage</name><user>SaveTheMage</user><email>support@savethemage.com</email></author></authors>
|
19 |
+
<date>2013-05-15</date>
|
20 |
+
<time>01:25:29</time>
|
21 |
+
<contents><target name="magelocal"><dir name="SaveTheMage"><dir name="BulkUpdateAllProductPrices"><dir name="Block"><file name="BlockForFormBulkUpdateAllProductPrices.php" hash="d0c50d3220e883b24d6853f3166d5889"/><file name="ShowTabsAdminBlock.php" hash="3a239e073360ad05262bd3803df9a512"/></dir><dir name="Helper"><file name="Data.php" hash="9c5adce1896448a6302cc7275be25953"/></dir><dir name="Model"><file name="Worker.php" hash="9195e94fb14660414b8013a8177c8bb0"/></dir><dir name="controllers"><dir name="AdminControllersHere"><file name="BulkUpdateAllProductPricesController.php" hash="33f3ce7ebc1b918d9ae7c049b0972a68"/></dir></dir><dir name="etc"><file name="config.xml" hash="3480d0d89283f9f193198498ca27343e"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="SaveTheMage"><file name="tab_container_FormBulkUpdateAllProductPrices.phtml" hash="eb4aa7f9bacccbcbd3846371a3f9d316"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="SaveTheMage_BulkUpdateAllProductPrices.xml" hash="1edafa25e3f8f9643300103599becbea"/></dir></target></contents>
|
22 |
<compatible/>
|
23 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
24 |
</package>
|