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
|
262 |
* @return mixed
|
263 |
*/
|
264 |
-
public function codFilteringEnabledShippingMethods($action = 'get', $value =
|
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 (
|
100 |
-
|
101 |
-
|
102 |
|
103 |
-
|
|
|
104 |
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
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.
|
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.
|
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><p>ShopGo Shipping Core is a utility module that contains functions used by other ShopGo shipping modules.<
|
11 |
-
|
12 |
-
|
13 |
-
<
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
<authors><author><name>ShopGo</name><user>ShopGo</user><email>support@shopgo.me</email></author></authors>
|
16 |
-
<date>2015-
|
17 |
-
<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="
|
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><p>ShopGo Shipping Core is a utility module that contains functions used by other ShopGo shipping modules.<br />
|
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.</p>
|
12 |
+
<h3>What is ShopGo?</h3>
|
13 |
+
<p>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.</p>
|
14 |
+
<h3>How does it work?</h3>
|
15 |
+
<p>This can be used in various ways inside ShopGo's shipping modules.<br />
|
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.<br />
|
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.</p>
|
18 |
+
<h3>Features</h3>
|
19 |
+
<ul>
|
20 |
+
<li>Advanced currency convert function.</li>
|
21 |
+
<li>Make it easier to customize admin panel's sales &gt; orders &gt; ship page for ShopGo's shipping modules.</li>
|
22 |
+
<li>Dimensional weight attributes installer.</li>
|
23 |
+
<li>Payment methods filter for COD shipments.</li>
|
24 |
+
<li>Reduce possible number of conflicts between modules by doing shipping modules classes overriding in one place.</li>
|
25 |
+
</ul>
|
26 |
+
<h3>Dependencies</h3>
|
27 |
+
<ul>
|
28 |
+
<li>ShopGo Core</li>
|
29 |
+
<li>(ShopGo) Advanced Ifconfig</li>
|
30 |
+
</ul>
|
31 |
+
<h3>Notes</h3>
|
32 |
+
<ul>
|
33 |
+
<li>Make sure that all dependencies mentioned above are installed before installing this module. Otherwise, it won't work.</li>
|
34 |
+
</ul>
|
35 |
+
<p><strong>You could also get the latest version of this module from:</strong><br />
|
36 |
+
<a href="https://github.com/shopgo-me/shipping-core">https://github.com/shopgo-me/shipping-core</a></p></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>
|