AntonioLoiaconoDesign_CalculateDiscount - Version 1.2.0

Version Notes

- Fix more bugs.

Download this release

Release Info

Developer alditalia
Extension AntonioLoiaconoDesign_CalculateDiscount
Version 1.2.0
Comparing to
See all releases


Code changes from version 1.1.0 to 1.2.0

app/code/community/AntonioLoiaconoDesign/CalculateDiscount/Model/Observer.php CHANGED
@@ -25,7 +25,7 @@ class AntonioLoiaconoDesign_CalculateDiscount_Model_Observer
25
  $discountAttribute = Mage::getStoreConfig('antonioloiaconodesign_calculatediscount/general/attributeofdiscount');
26
 
27
  if ($product->getFinalPrice() < $product->getPrice() && $product->getVisibility() != Mage_Catalog_Model_Product_Visibility::VISIBILITY_NOT_VISIBLE){
28
- $discountPer = round(($product->getFinalPrice() / $product->getPrice() * 100), 0, PHP_ROUND_HALF_DOWN);
29
  $discountConditions = Mage::getStoreConfig('antonioloiaconodesign_calculatediscount/general/discountconditions');
30
  if ($discountConditions) {
31
  $discountConditions = unserialize($discountConditions);
25
  $discountAttribute = Mage::getStoreConfig('antonioloiaconodesign_calculatediscount/general/attributeofdiscount');
26
 
27
  if ($product->getFinalPrice() < $product->getPrice() && $product->getVisibility() != Mage_Catalog_Model_Product_Visibility::VISIBILITY_NOT_VISIBLE){
28
+ $discountPer = round(($product->getPrice() - $product->getFinalPrice()) / $product->getPrice() * 100, 0, PHP_ROUND_HALF_DOWN);
29
  $discountConditions = Mage::getStoreConfig('antonioloiaconodesign_calculatediscount/general/discountconditions');
30
  if ($discountConditions) {
31
  $discountConditions = unserialize($discountConditions);
app/code/community/AntonioLoiaconoDesign/CalculateDiscount/controllers/Adminhtml/CalculatediscountController.php CHANGED
@@ -34,7 +34,7 @@ class AntonioLoiaconoDesign_CalculateDiscount_Adminhtml_CalculatediscountControl
34
 
35
  if ($product->getFinalPrice() < $product->getPrice()) {
36
 
37
- $discountPer = round(($product->getFinalPrice() / $product->getPrice() * 100), 0, PHP_ROUND_HALF_DOWN);
38
  $discountConditions = Mage::getStoreConfig('antonioloiaconodesign_calculatediscount/general/discountconditions');
39
  if ($discountConditions) {
40
  $discountConditions = unserialize($discountConditions);
34
 
35
  if ($product->getFinalPrice() < $product->getPrice()) {
36
 
37
+ $discountPer = round(($product->getPrice() - $product->getFinalPrice()) / $product->getPrice() * 100, 0, PHP_ROUND_HALF_DOWN);
38
  $discountConditions = Mage::getStoreConfig('antonioloiaconodesign_calculatediscount/general/discountconditions');
39
  if ($discountConditions) {
40
  $discountConditions = unserialize($discountConditions);
app/code/community/AntonioLoiaconoDesign/CalculateDiscount/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <AntonioLoiaconoDesign_CalculateDiscount>
5
- <version>1.1.0</version>
6
  </AntonioLoiaconoDesign_CalculateDiscount>
7
  </modules>
8
  <global>
2
  <config>
3
  <modules>
4
  <AntonioLoiaconoDesign_CalculateDiscount>
5
+ <version>1.2.0</version>
6
  </AntonioLoiaconoDesign_CalculateDiscount>
7
  </modules>
8
  <global>
package.xml CHANGED
@@ -1,19 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>AntonioLoiaconoDesign_CalculateDiscount</name>
4
- <version>1.1.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>The extension of the calculation discount will be useful to the one who will want to obtain a filter based on the percentage of discount in the frontend.</summary>
10
  <description>The extension of the calculation discount lets choose an attribute used for the discount. For each option dropdown of the attribute it is possible to associate a range of percentages that will be visible in frontend if the attribute makes itself filterable with results.</description>
11
- <notes>- Fix of the calculation of the discount rate: more accurate calculation.&#xD;
12
- - Calculation of the discount rate is removed for "Not Visible Individually&#x201D; products.</notes>
13
  <authors><author><name>alditalia</name><user>alditalia</user><email>a.loiacono@live.it</email></author></authors>
14
- <date>2016-05-31</date>
15
- <time>09:44:46</time>
16
- <contents><target name="magecommunity"><dir name="AntonioLoiaconoDesign"><dir name="CalculateDiscount"><dir name="Block"><dir name="Config"><file name="DiscountConditions.php" hash="ea2c2594c7623d440d51daf3a3d3e210"/><dir name="Adminhtml"><dir name="Form"><dir name="Field"><file name="Discount.php" hash="04fdf4b428de3f987c282a1dde99f9d5"/></dir></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="CalculatediscountController.php" hash="d769f6e6daa6511e2900e44da0c0245e"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="4034f1c2ab351864c50c09ae97dca679"/><file name="config.xml" hash="0225208bb8e164dee8130a6df5aa3693"/><file name="system.xml" hash="20cf733937cf47f94fcf4998fc879a4b"/></dir><dir name="Helper"><file name="Data.php" hash="fcdff20954c5e5f57203236d3c90b204"/></dir><dir name="Model"><file name="Observer.php" hash="9da3cfecb802896f9b2cb46786f8176d"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="AntonioLoiaconoDesign_CalculateDiscount.xml" hash="31047778a163b19ed5c8b2bfeea2d337"/></dir></target></contents>
17
  <compatible/>
18
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
19
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>AntonioLoiaconoDesign_CalculateDiscount</name>
4
+ <version>1.2.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>The extension of the calculation discount will be useful to the one who will want to obtain a filter based on the percentage of discount in the frontend.</summary>
10
  <description>The extension of the calculation discount lets choose an attribute used for the discount. For each option dropdown of the attribute it is possible to associate a range of percentages that will be visible in frontend if the attribute makes itself filterable with results.</description>
11
+ <notes>- Fix more bugs.</notes>
 
12
  <authors><author><name>alditalia</name><user>alditalia</user><email>a.loiacono@live.it</email></author></authors>
13
+ <date>2016-06-03</date>
14
+ <time>07:51:10</time>
15
+ <contents><target name="magecommunity"><dir name="AntonioLoiaconoDesign"><dir name="CalculateDiscount"><dir name="Block"><dir name="Config"><file name="DiscountConditions.php" hash="ea2c2594c7623d440d51daf3a3d3e210"/><dir name="Adminhtml"><dir name="Form"><dir name="Field"><file name="Discount.php" hash="04fdf4b428de3f987c282a1dde99f9d5"/></dir></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="CalculatediscountController.php" hash="7cd7917b54f2fa5d2bb035b1dd106ae6"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="4034f1c2ab351864c50c09ae97dca679"/><file name="config.xml" hash="b54e421f38f93ab19cf89f6ed5cf6401"/><file name="system.xml" hash="20cf733937cf47f94fcf4998fc879a4b"/></dir><dir name="Helper"><file name="Data.php" hash="fcdff20954c5e5f57203236d3c90b204"/></dir><dir name="Model"><file name="Observer.php" hash="938a36239ae5a6a3e82aa2d9473eeaff"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="AntonioLoiaconoDesign_CalculateDiscount.xml" hash="31047778a163b19ed5c8b2bfeea2d337"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>