Shopgo_ShippingCore - Version 1.3.8

Version Notes

Fixed in_array check issue

Download this release

Release Info

Developer Moe Ghashim
Extension Shopgo_ShippingCore
Version 1.3.8
Comparing to
See all releases


Code changes from version 1.3.7 to 1.3.8

app/code/community/Shopgo/ShippingCore/Helper/Abstract.php CHANGED
@@ -258,10 +258,10 @@ abstract class Shopgo_ShippingCore_Helper_Abstract extends Shopgo_Core_Helper_Ab
258
  * Get/Set/Unset cash on delivery filtering enabled shipping methods session values
259
  *
260
  * @param string $action
261
- * @param mixed $value
262
  * @return mixed
263
  */
264
- public function codFilteringEnabledShippingMethods($action = 'get', $value = null)
265
  {
266
  $result = null;
267
  $session = Mage::getSingleton('checkout/session');
258
  * Get/Set/Unset cash on delivery filtering enabled shipping methods session values
259
  *
260
  * @param string $action
261
+ * @param array $value
262
  * @return mixed
263
  */
264
+ public function codFilteringEnabledShippingMethods($action = 'get', $value = array())
265
  {
266
  $result = null;
267
  $session = Mage::getSingleton('checkout/session');
app/code/community/Shopgo/ShippingCore/Model/Observer.php CHANGED
@@ -96,17 +96,16 @@ class Shopgo_ShippingCore_Model_Observer
96
 
97
  $codFilteringEnabledShippingMethods = $helper->codFilteringEnabledShippingMethods();
98
 
99
- if (!in_array($shippingMethod, $codFilteringEnabledShippingMethods)) {
100
- return;
101
- }
102
 
103
- $codMethods = $helper->getCodMethodList();
 
104
 
105
- $result = $observer->getEvent()->getResult();
106
- $method = $observer->getEvent()->getMethodInstance();
107
-
108
- $result->isAvailable =
109
- !in_array($method->getCode(), $codMethods)
110
- ? false : true;
111
  }
112
  }
96
 
97
  $codFilteringEnabledShippingMethods = $helper->codFilteringEnabledShippingMethods();
98
 
99
+ if (is_array($codFilteringEnabledShippingMethods)
100
+ && in_array($shippingMethod, $codFilteringEnabledShippingMethods)) {
101
+ $codMethods = $helper->getCodMethodList();
102
 
103
+ $result = $observer->getEvent()->getResult();
104
+ $method = $observer->getEvent()->getMethodInstance();
105
 
106
+ $result->isAvailable =
107
+ !in_array($method->getCode(), $codMethods)
108
+ ? false : true;
109
+ }
 
 
110
  }
111
  }
app/code/community/Shopgo/ShippingCore/etc/config.xml CHANGED
@@ -20,7 +20,7 @@
20
  <config>
21
  <modules>
22
  <Shopgo_ShippingCore>
23
- <version>1.3.7</version>
24
  </Shopgo_ShippingCore>
25
  </modules>
26
  <global>
20
  <config>
21
  <modules>
22
  <Shopgo_ShippingCore>
23
+ <version>1.3.8</version>
24
  </Shopgo_ShippingCore>
25
  </modules>
26
  <global>
package.xml CHANGED
@@ -1,21 +1,44 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Shopgo_ShippingCore</name>
4
- <version>1.3.7</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>A shipping core module that other ShopGo shipping modules depend on. It contains reusable code functions.</summary>
10
- <description>&lt;p&gt;ShopGo Shipping Core is a utility module that contains functions used by other ShopGo shipping modules.&lt;/p&gt;&#xD;
11
- &lt;p&gt;This module combines all ShopGo's shipping modules shared/reusable code in one place, in order to reduce code redundancy and the number of conflicts between some modules (Especially shipping ones).&lt;/p&gt;&#xD;
12
- You could also get the latest version of the module from:&#xD;
13
- &lt;a href="https://github.com/shopgo-me/shipping-core"&gt;https://github.com/shopgo-me/shipping-core&lt;/a&gt;</description>
14
- <notes>The first release of ShopGo Shipping Core module.</notes>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  <authors><author><name>ShopGo</name><user>ShopGo</user><email>support@shopgo.me</email></author></authors>
16
- <date>2015-07-09</date>
17
- <time>22:25:33</time>
18
- <contents><target name="magecommunity"><dir name="Shopgo"><dir name="ShippingCore"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><file name="DwaButton.php" hash="f92bf59b64d4ab8ff65313effc8fbfd5"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Abstract.php" hash="cf1d76cc4e397b20437387e68ea850cb"/><file name="Data.php" hash="79ad030f4b4455e85bb766c432f6778b"/></dir><dir name="Model"><dir name="Carrier"><file name="Abstract.php" hash="e21fa98a3a4311c82d91d8009e70c56d"/><file name="Aramex.php" hash="61cc9e68243496863866a4fc0c6faa53"/><file name="Skynet.php" hash="2c149c343e522c87da941351e4202cdd"/></dir><file name="Core.php" hash="f895741166d0e6bc6264a80ca7edb46a"/><file name="Dwa.php" hash="d0f17e5e5dbc058e9f140409af31ee50"/><dir name="Magento"><dir name="Shipping"><file name="Info.php" hash="77708e567685d0dd94f31b9b43ec0ce7"/></dir></dir><file name="Observer.php" hash="b42b6fa0a958a1eb11fad4b3aa31d939"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Activepaymentmethod.php" hash="14545cdd75cf2ff4138a19ab0cdae3b6"/><file name="Allowedcurrencies.php" hash="4b7776c0f674d39c6e9adddcb7d53234"/><file name="Attributeset.php" hash="4e764d2b2be458151e381f2b1e7cabc6"/><file name="Attributesetgroup.php" hash="9e3e6b25951acdb014d6e9d7633bb709"/><file name="Codcurrency.php" hash="d41fc6f0acf1ecf4c39802545610b338"/><file name="Height.php" hash="385876f1fc49747d49d45f8ad7ebe35c"/><file name="Length.php" hash="a94e492f1e97a835d5a4161973a9c919"/><file name="Width.php" hash="73e3ed9364e5e347b9e38a2f7b838562"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><file name="ShipmentController.php" hash="4167c3313c46c23d9d0a717cc8062b59"/></dir></dir><dir name="Shopgo"><file name="ShippingcoreController.php" hash="590ec968bb5b6daebd0c640826b55ea2"/></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="92557f6dbe9747c0da89eb1ee8ffbb7c"/><file name="config.xml" hash="ef730c677ced947d1e47d8b1e684d48b"/><file name="system.xml" hash="bdc72b68e16ede0c6a9a1d96d2860f7c"/></dir><dir name="sql"><dir name="shippingcore_setup"><file name="mysql4-install-1.1.2.php" hash="9bee70d471520da341081b267633987c"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="shopgo"><file name="shipping_core.xml" hash="be6da9a49309d76666e521f5f9838a96"/></dir></dir><dir name="template"><dir name="shopgo"><dir name="shipping_core"><dir name="sales"><dir name="order"><dir name="shipment"><dir name="create"><file name="form.phtml" hash="f5ab96dfcd5996b66a89a059882a596e"/><file name="items.phtml" hash="4a00a29303c47c91fa83afcbb29935c7"/></dir></dir></dir></dir><dir name="system"><dir name="config"><file name="dwa_button.phtml" hash="706179d3120c218faf9a1e815642394b"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="shopgo"><file name="shipping_core.xml" hash="fe05da7d61e0d6392654981524b3c91e"/></dir></dir><dir name="template"><dir name="shopgo"><dir name="shipping_core"><dir name="checkout"><dir name="cart"><file name="shipping.phtml" hash="fd2b00efe72f6ff91eb77076ceaafc51"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Shopgo_ShippingCore.xml" hash="74b12adf823de62e688e8452525304f7"/></dir></target></contents>
19
  <compatible/>
20
  <dependencies><required><php><min>5.3.0</min><max>7.0.0</max></php><package><name>Shopgo_Core</name><channel>community</channel><min>1.0.6</min><max/></package><package><name>Shopgo_AdvIfconfig</name><channel>community</channel><min>1.0.3</min><max/></package></required></dependencies>
21
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Shopgo_ShippingCore</name>
4
+ <version>1.3.8</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>A shipping core module that other ShopGo shipping modules depend on. It contains reusable code functions.</summary>
10
+ <description>&lt;p&gt;ShopGo Shipping Core is a utility module that contains functions used by other ShopGo shipping modules.&lt;br /&gt;&#xD;
11
+ The main purpose of this module is to encourage code re-usability (Put it simply, the module combines all ShopGo's shipping modules shared/reusable code in one place) and to reduce number of possible conflicts between some modules (Especially shipping ones) as much as possible.&lt;/p&gt;&#xD;
12
+ &lt;h3&gt;What is ShopGo?&lt;/h3&gt;&#xD;
13
+ &lt;p&gt;ShopGo is a hosted and localized eCommerce platform designed to enable merchants (Mainly in the MENA region) to create e-stores and become e-tailers, in just a few simple steps.&lt;/p&gt;&#xD;
14
+ &lt;h3&gt;How does it work?&lt;/h3&gt;&#xD;
15
+ &lt;p&gt;This can be used in various ways inside ShopGo's shipping modules.&lt;br /&gt;&#xD;
16
+ For example, ShopGo's shipping modules data helpers could extend the abstract helper class of shipping core, in order to use the helpful functions that it provides, instead of writing them from scratch for each module.&lt;br /&gt;&#xD;
17
+ Shipping core also adds useful features such as dimensional weight attributes, which can be used by other custom shipping modules, in order avoid unnecessary conflicts between them.&lt;/p&gt;&#xD;
18
+ &lt;h3&gt;Features&lt;/h3&gt;&#xD;
19
+ &lt;ul&gt;&#xD;
20
+ &lt;li&gt;Advanced currency convert function.&lt;/li&gt;&#xD;
21
+ &lt;li&gt;Make it easier to customize admin panel's sales &amp;gt; orders &amp;gt; ship page for ShopGo's shipping modules.&lt;/li&gt;&#xD;
22
+ &lt;li&gt;Dimensional weight attributes installer.&lt;/li&gt;&#xD;
23
+ &lt;li&gt;Payment methods filter for COD shipments.&lt;/li&gt;&#xD;
24
+ &lt;li&gt;Reduce possible number of conflicts between modules by doing shipping modules classes overriding in one place.&lt;/li&gt;&#xD;
25
+ &lt;/ul&gt;&#xD;
26
+ &lt;h3&gt;Dependencies&lt;/h3&gt;&#xD;
27
+ &lt;ul&gt;&#xD;
28
+ &lt;li&gt;ShopGo Core&lt;/li&gt;&#xD;
29
+ &lt;li&gt;(ShopGo) Advanced Ifconfig&lt;/li&gt;&#xD;
30
+ &lt;/ul&gt;&#xD;
31
+ &lt;h3&gt;Notes&lt;/h3&gt;&#xD;
32
+ &lt;ul&gt;&#xD;
33
+ &lt;li&gt;Make sure that all dependencies mentioned above are installed before installing this module. Otherwise, it won't work.&lt;/li&gt;&#xD;
34
+ &lt;/ul&gt;&#xD;
35
+ &lt;p&gt;&lt;strong&gt;You could also get the latest version of this module from:&lt;/strong&gt;&lt;br /&gt;&#xD;
36
+ &lt;a href="https://github.com/shopgo-me/shipping-core"&gt;https://github.com/shopgo-me/shipping-core&lt;/a&gt;&lt;/p&gt;</description>
37
+ <notes>Fixed in_array check issue</notes>
38
  <authors><author><name>ShopGo</name><user>ShopGo</user><email>support@shopgo.me</email></author></authors>
39
+ <date>2015-08-05</date>
40
+ <time>10:30:03</time>
41
+ <contents><target name="magecommunity"><dir name="Shopgo"><dir name="ShippingCore"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><file name="DwaButton.php" hash="f92bf59b64d4ab8ff65313effc8fbfd5"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Abstract.php" hash="58bac02566f44183e716dcc3f115953f"/><file name="Data.php" hash="79ad030f4b4455e85bb766c432f6778b"/></dir><dir name="Model"><dir name="Carrier"><file name="Abstract.php" hash="e21fa98a3a4311c82d91d8009e70c56d"/><file name="Aramex.php" hash="61cc9e68243496863866a4fc0c6faa53"/><file name="Skynet.php" hash="2c149c343e522c87da941351e4202cdd"/></dir><file name="Core.php" hash="f895741166d0e6bc6264a80ca7edb46a"/><file name="Dwa.php" hash="d0f17e5e5dbc058e9f140409af31ee50"/><dir name="Magento"><dir name="Shipping"><file name="Info.php" hash="77708e567685d0dd94f31b9b43ec0ce7"/></dir></dir><file name="Observer.php" hash="43bb5b95702e0107d3df216ca2a9cbcd"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Activepaymentmethod.php" hash="14545cdd75cf2ff4138a19ab0cdae3b6"/><file name="Allowedcurrencies.php" hash="4b7776c0f674d39c6e9adddcb7d53234"/><file name="Attributeset.php" hash="4e764d2b2be458151e381f2b1e7cabc6"/><file name="Attributesetgroup.php" hash="9e3e6b25951acdb014d6e9d7633bb709"/><file name="Codcurrency.php" hash="d41fc6f0acf1ecf4c39802545610b338"/><file name="Height.php" hash="385876f1fc49747d49d45f8ad7ebe35c"/><file name="Length.php" hash="a94e492f1e97a835d5a4161973a9c919"/><file name="Width.php" hash="73e3ed9364e5e347b9e38a2f7b838562"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><file name="ShipmentController.php" hash="4167c3313c46c23d9d0a717cc8062b59"/></dir></dir><dir name="Shopgo"><file name="ShippingcoreController.php" hash="590ec968bb5b6daebd0c640826b55ea2"/></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="92557f6dbe9747c0da89eb1ee8ffbb7c"/><file name="config.xml" hash="48b86bc4b90ad13e632ef120965e7536"/><file name="system.xml" hash="bdc72b68e16ede0c6a9a1d96d2860f7c"/></dir><dir name="sql"><dir name="shippingcore_setup"><file name="mysql4-install-1.1.2.php" hash="9bee70d471520da341081b267633987c"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="shopgo"><file name="shipping_core.xml" hash="be6da9a49309d76666e521f5f9838a96"/></dir></dir><dir name="template"><dir name="shopgo"><dir name="shipping_core"><dir name="sales"><dir name="order"><dir name="shipment"><dir name="create"><file name="form.phtml" hash="f5ab96dfcd5996b66a89a059882a596e"/><file name="items.phtml" hash="4a00a29303c47c91fa83afcbb29935c7"/></dir></dir></dir></dir><dir name="system"><dir name="config"><file name="dwa_button.phtml" hash="706179d3120c218faf9a1e815642394b"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="shopgo"><file name="shipping_core.xml" hash="fe05da7d61e0d6392654981524b3c91e"/></dir></dir><dir name="template"><dir name="shopgo"><dir name="shipping_core"><dir name="checkout"><dir name="cart"><file name="shipping.phtml" hash="fd2b00efe72f6ff91eb77076ceaafc51"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Shopgo_ShippingCore.xml" hash="74b12adf823de62e688e8452525304f7"/></dir></target></contents>
42
  <compatible/>
43
  <dependencies><required><php><min>5.3.0</min><max>7.0.0</max></php><package><name>Shopgo_Core</name><channel>community</channel><min>1.0.6</min><max/></package><package><name>Shopgo_AdvIfconfig</name><channel>community</channel><min>1.0.3</min><max/></package></required></dependencies>
44
  </package>