minimum_order_fee - Version 0.1.6

Version Notes

Added a new option to select minimum order fee calculation

Download this release

Release Info

Developer Commerce Bees
Extension minimum_order_fee
Version 0.1.6
Comparing to
See all releases


Code changes from version 0.1.5 to 0.1.6

CommerceBees_Minimumorder_Fee_Extension_Guide_V0.1.1 .pdf ADDED
Binary file
app/code/community/Ameex/MinimumorderFee/Model/Calculation.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Ameex_MinimumorderFee_Model_Calculation{
3
+ public function toOptionArray()
4
+ {
5
+ return array(
6
+ array('value'=>1,'label'=>Mage::helper('minimumorderfee')->__('Subtotal')),
7
+ array('value'=>2,'label'=>Mage::helper('minimumorderfee')->__('Subtotal + Tax')),
8
+ array('value'=>3,'label'=>Mage::helper('minimumorderfee')->__('Subtotal After Discount'))
9
+ );
10
+ }
11
+ }
app/code/community/Ameex/MinimumorderFee/Model/Sales/Quote/Address/Total/Minimumorderfee.php CHANGED
@@ -14,9 +14,23 @@ class Ameex_MinimumorderFee_Model_Sales_Quote_Address_Total_Minimumorderfee exte
14
  }
15
  $quote = $address->getQuote();
16
  $minimumorderfee=Mage::getStoreConfig('sales/minimum_order/minimumfee');
17
- $subtotal=$address->getSubtotal();
18
  $isMinAmt= Mage::getStoreConfig('sales/minimum_order/amount', Mage::app()->getStore()->getId());
19
  $isMinAmtActive= Mage::getStoreConfig('sales/minimum_order/active', Mage::app()->getStore()->getId());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  if($isMinAmtActive==1 && $subtotal<$isMinAmt){
21
  $feecalculation=Mage::getStoreConfig('sales/minimum_order/feecalculation', Mage::app()->getStore()->getId());
22
  switch($feecalculation){
14
  }
15
  $quote = $address->getQuote();
16
  $minimumorderfee=Mage::getStoreConfig('sales/minimum_order/minimumfee');
 
17
  $isMinAmt= Mage::getStoreConfig('sales/minimum_order/amount', Mage::app()->getStore()->getId());
18
  $isMinAmtActive= Mage::getStoreConfig('sales/minimum_order/active', Mage::app()->getStore()->getId());
19
+ $subtotalcalculation=Mage::getStoreConfig('sales/minimum_order/subtotalcalculation', Mage::app()->getStore()->getId());
20
+ switch($subtotalcalculation)
21
+ {
22
+ case 1:
23
+ $subtotal=$address->getSubtotal();
24
+ break;
25
+ case 2:
26
+ $firstsubtotal=$address->getSubtotal();
27
+ $tax=$address->getTaxAmount();
28
+ $subtotal=$firstsubtotal+$tax;
29
+ break;
30
+ case 3:
31
+ $subtotal=$address->getSubtotalWithDiscount();
32
+ break;
33
+ }
34
  if($isMinAmtActive==1 && $subtotal<$isMinAmt){
35
  $feecalculation=Mage::getStoreConfig('sales/minimum_order/feecalculation', Mage::app()->getStore()->getId());
36
  switch($feecalculation){
app/code/community/Ameex/MinimumorderFee/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Ameex_MinimumorderFee>
5
- <version>0.1.5</version>
6
  </Ameex_MinimumorderFee>
7
  </modules>
8
  <frontend>
2
  <config>
3
  <modules>
4
  <Ameex_MinimumorderFee>
5
+ <version>0.1.6</version>
6
  </Ameex_MinimumorderFee>
7
  </modules>
8
  <frontend>
app/code/community/Ameex/MinimumorderFee/etc/system.xml CHANGED
@@ -22,6 +22,16 @@
22
  <show_in_website>1</show_in_website>
23
  <show_in_store>1</show_in_store>
24
  </feecalculation>
 
 
 
 
 
 
 
 
 
 
25
  <details translate="label">
26
  <label>Text to display in checkout page</label>
27
  <frontend_type>textarea</frontend_type>
22
  <show_in_website>1</show_in_website>
23
  <show_in_store>1</show_in_store>
24
  </feecalculation>
25
+ <subtotalcalculation translate="label">
26
+ <label>Minimum order fee calculation</label>
27
+ <frontend_type>select</frontend_type>
28
+ <source_model>minimumorderfee/calculation</source_model>
29
+ <comment>Minimum fee calculation based on</comment>
30
+ <sort_order>10</sort_order>
31
+ <show_in_default>1</show_in_default>
32
+ <show_in_website>1</show_in_website>
33
+ <show_in_store>1</show_in_store>
34
+ </subtotalcalculation>
35
  <details translate="label">
36
  <label>Text to display in checkout page</label>
37
  <frontend_type>textarea</frontend_type>
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>minimum_order_fee</name>
4
- <version>0.1.5</version>
5
  <stability>stable</stability>
6
  <license>Open Software License (OSL)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>MinimumorderFee Module is used to apply fee for the minimum order.</summary>
10
  <description>This module is used to add some fee for the minimum order. It checks the subtotal, if the subtotal is less than minimum order amount, it adds some fee to the grand total.</description>
11
- <notes>undefined variable $storeId get solved</notes>
12
  <authors><author><name>commercebees</name><user>CommerceBees</user><email>commercebees@ameexusa.com</email></author></authors>
13
- <date>2016-01-06</date>
14
- <time>15:08:52</time>
15
- <contents><target name="magecommunity"><dir><dir name="Ameex"><dir name="MinimumorderFee"><dir name="Block"><dir name="Checkout"><dir name="Total"><file name="Minimumorderfee.php" hash="2ac6dba02061a92ddbbb7f6c52f40efd"/></dir></dir><dir name="Sales"><dir name="Order"><dir name="Totals"><file name="Minimumorderfee.php" hash="453e083a54c94ef309326685b3dfde9b"/></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="b77a1ffaa1a6e8644f5a6d8e61215d97"/></dir><dir name="Model"><dir name="Sales"><dir name="Order"><dir name="Creditmemo"><dir name="Total"><file name="Minimumorderfee.php" hash="e865b993fdcdeb5fa07fb76a7d0be5ce"/></dir></dir><dir name="Invoice"><dir name="Total"><file name="Minimumorderfee.php" hash="3ef96c49bc61697f1f8fb844e113b7b0"/></dir></dir></dir><dir name="Quote"><dir name="Address"><dir name="Total"><file name="Minimumorderfee.php" hash="ec874a449b527a4400aacb41a2ff7708"/></dir></dir><file name="Address.php" hash="5b6d17fd695c869e921a15aaa3a7df1a"/></dir></dir><file name="Value.php" hash="ad6d8ab9e8779f47b13c227c3c027031"/></dir><dir name="controllers"><file name="CartController.php" hash="d04f3175a847d7ec4aa3eb4d31a66109"/></dir><dir name="etc"><file name="config.xml" hash="b8eb9ebbacc307f4a158689f612b0f96"/><file name="system.xml" hash="5abbb158a4862956338429bc2f4023a7"/></dir><dir name="sql"><dir name="ameex_minimumorderfee_setup"><file name="Upgrade-0.1.0-0.1.1.php" hash="dcebf42adc69443d3db85f9664bb5449"/><file name="install-0.1.0.php" hash="6255d9eb79ccae8f5ffe6d6202d1df4c"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="minimumorderfee.xml" hash="a925b6be53c38c50549d2f496c49a4f8"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="minimumorderfee.xml" hash="203d1cb98bc986252c0b2d52cc0312eb"/></dir><dir name="template"><dir name="checkout"><dir name="total"><file name="minimumorderfee.phtml" hash="136d9fa337c7b2b4c0218adaf6930241"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="Ameex_MinimumorderFee.xml" hash="2e7539c1ae8b3c207ce3f79a47df9428"/></dir></dir></target><target name="mage"><dir name="."><file name="CommerceBees_Minimumorder_Fee_Extension_Guide_V0.1.1 .pdf" hash=""/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>minimum_order_fee</name>
4
+ <version>0.1.6</version>
5
  <stability>stable</stability>
6
  <license>Open Software License (OSL)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>MinimumorderFee Module is used to apply fee for the minimum order.</summary>
10
  <description>This module is used to add some fee for the minimum order. It checks the subtotal, if the subtotal is less than minimum order amount, it adds some fee to the grand total.</description>
11
+ <notes>Added a new option to select minimum order fee calculation</notes>
12
  <authors><author><name>commercebees</name><user>CommerceBees</user><email>commercebees@ameexusa.com</email></author></authors>
13
+ <date>2016-01-07</date>
14
+ <time>09:20:14</time>
15
+ <contents><target name="magecommunity"><dir><dir name="Ameex"><dir name="MinimumorderFee"><dir><dir name="Block"><dir name="Checkout"><dir name="Total"><file name="Minimumorderfee.php" hash="2ac6dba02061a92ddbbb7f6c52f40efd"/></dir></dir><dir name="Sales"><dir name="Order"><dir name="Totals"><file name="Minimumorderfee.php" hash="453e083a54c94ef309326685b3dfde9b"/></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="b77a1ffaa1a6e8644f5a6d8e61215d97"/></dir><dir name="Model"><file name="Calculation.php" hash="9614043c12b871ca481b655852273c9c"/><dir name="Sales"><dir name="Order"><dir name="Creditmemo"><dir name="Total"><file name="Minimumorderfee.php" hash="e865b993fdcdeb5fa07fb76a7d0be5ce"/></dir></dir><dir name="Invoice"><dir name="Total"><file name="Minimumorderfee.php" hash="3ef96c49bc61697f1f8fb844e113b7b0"/></dir></dir></dir><dir name="Quote"><dir name="Address"><dir name="Total"><file name="Minimumorderfee.php" hash="29fc31f031a0a03a9c60043bc4cb0957"/></dir></dir><file name="Address.php" hash="5b6d17fd695c869e921a15aaa3a7df1a"/></dir></dir><file name="Value.php" hash="ad6d8ab9e8779f47b13c227c3c027031"/></dir><dir name="controllers"><file name="CartController.php" hash="d04f3175a847d7ec4aa3eb4d31a66109"/></dir><dir name="etc"><file name="config.xml" hash="debf01feabe5b26e255e196c37d11b67"/><file name="system.xml" hash="7f2338005c278d534ba9fd26df257a9c"/></dir><dir name="sql"><dir name="ameex_minimumorderfee_setup"><file name="Upgrade-0.1.0-0.1.1.php" hash="dcebf42adc69443d3db85f9664bb5449"/><file name="install-0.1.0.php" hash="6255d9eb79ccae8f5ffe6d6202d1df4c"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="Ameex_MinimumorderFee.xml" hash="2e7539c1ae8b3c207ce3f79a47df9428"/></dir></dir></target><target name="magedesign"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="minimumorderfee.xml" hash="a925b6be53c38c50549d2f496c49a4f8"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="minimumorderfee.xml" hash="203d1cb98bc986252c0b2d52cc0312eb"/></dir><dir name="template"><dir name="checkout"><dir name="total"><file name="minimumorderfee.phtml" hash="136d9fa337c7b2b4c0218adaf6930241"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="."><file name="CommerceBees_Minimumorder_Fee_Extension_Guide_V0.1.1 .pdf" hash="103ff1b355410d85712c7300c2150f7f"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>