Version Notes
Start selling internationally. Get bulk discounted DHL Express rates, displayed in real-time to your customers
Download this release
Release Info
Developer | Cedcoss |
Extension | InXpress |
Version | 0.1.3 |
Comparing to | |
See all releases |
Code changes from version 0.1.2 to 0.1.3
app/code/local/Cedcoss/Inxpress/Model/Carrier/Inxpress.php
CHANGED
@@ -42,12 +42,32 @@ class Cedcoss_Inxpress_Model_Carrier_Inxpress extends Mage_Shipping_Model_Carrie
|
|
42 |
{
|
43 |
$code='X';
|
44 |
}
|
45 |
-
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
if($price)
|
48 |
{
|
49 |
-
if((isset($variable))&&($variable!=''))
|
50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
}
|
52 |
else
|
53 |
{
|
@@ -87,9 +107,17 @@ class Cedcoss_Inxpress_Model_Carrier_Inxpress extends Mage_Shipping_Model_Carrie
|
|
87 |
}
|
88 |
|
89 |
|
90 |
-
public function calcRate($account,$code,$country,$weight)
|
91 |
{
|
92 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
|
94 |
$ch = curl_init();
|
95 |
curl_setopt($ch, CURLOPT_URL,$url);
|
42 |
{
|
43 |
$code='X';
|
44 |
}
|
45 |
+
if(!empty($dimweight))
|
46 |
+
{
|
47 |
+
$price=$this->calcRate(Mage::getStoreConfig('carriers/inxpress/account'),$code,$request->getDestCountryId(),$weight,$dimweight[0]['length'],$dimweight[0]['width'],$dimweight[0]['height'],$request->getDestPostcode(),$item->getProduct()->getWeight());
|
48 |
+
}
|
49 |
+
else
|
50 |
+
{
|
51 |
+
$price=$this->calcRate(Mage::getStoreConfig('carriers/inxpress/account'),$code,$request->getDestCountryId(),$weight,0,0,0,$request->getDestPostcode(),$item->getProduct()->getWeight());
|
52 |
+
}
|
53 |
if($price)
|
54 |
{
|
55 |
+
if((isset($variable))&&($variable!=''))
|
56 |
+
{
|
57 |
+
if($variable>=$item->getQty())
|
58 |
+
{
|
59 |
+
$shippingPrice=($shippingPrice+$price['price']);
|
60 |
+
}
|
61 |
+
else if($variable<$item->getQty())
|
62 |
+
{
|
63 |
+
$qty=ceil(($item->getQty())/$variable);
|
64 |
+
$shippingPrice=($shippingPrice+$price['price'])*$qty;
|
65 |
+
}
|
66 |
+
}
|
67 |
+
else
|
68 |
+
{
|
69 |
+
$shippingPrice=($shippingPrice+$price['price'])*$item->getQty();
|
70 |
+
}
|
71 |
}
|
72 |
else
|
73 |
{
|
107 |
}
|
108 |
|
109 |
|
110 |
+
public function calcRate($account,$code,$country,$weight,$length,$width,$height,$zip,$pro_weight)
|
111 |
{
|
112 |
+
if(($pro_weight>$weight)||($length==0)||($width==0)||($height==0))
|
113 |
+
{
|
114 |
+
$url = Mage::getStoreConfig('carriers/inxpress/gateway_url').'?acc='.$account.'&dst='.$country.'&prd='.$code.'&wgt='.$weight.'&pst='.$zip;
|
115 |
+
}
|
116 |
+
else
|
117 |
+
{
|
118 |
+
$url = Mage::getStoreConfig('carriers/inxpress/gateway_url').'?acc='.$account.'&dst='.$country.'&prd='.$code.'&wgt='.$weight.'&pst='.$zip.'&pcs='.$length.'|'.$width.'|'.$height.'|'.$pro_weight;
|
119 |
+
}
|
120 |
+
|
121 |
|
122 |
$ch = curl_init();
|
123 |
curl_setopt($ch, CURLOPT_URL,$url);
|
app/code/local/Cedcoss/Inxpress/controllers/ActivateController.php
CHANGED
@@ -1,30 +1,30 @@
|
|
1 |
-
<?php
|
2 |
-
class Cedcoss_Inxpress_ActivateController extends Mage_Core_Controller_Front_Action
|
3 |
-
{
|
4 |
-
public function indexAction()
|
5 |
-
{
|
6 |
-
try
|
7 |
-
{
|
8 |
-
if(isset($_POST['key']))
|
9 |
-
{
|
10 |
-
if($_POST['key']==Mage::getStoreConfig('carriers/inxpress/key'))
|
11 |
-
{
|
12 |
-
$inxpresskey = new Mage_Core_Model_Config();
|
13 |
-
|
14 |
-
$inxpresskey ->saveConfig('carriers/inxpress/active', 1, 'default', 0);
|
15 |
-
$inxpresskey ->saveConfig('carriers/inxpress/account', $_POST['account_no'], 'default', 0);
|
16 |
-
$inxpresskey ->saveConfig('carriers/inxpress/inexpressid', $_POST['inxpress_account_no'], 'default', 0);
|
17 |
-
$inxpresskey ->saveConfig('carriers/inxpress/gateway_url', 'http://www.ixpapi.com/ixpapp/rates.php', 'default', 0);
|
18 |
-
echo "Configuration Data Has Been Saved Successfully!!!!";die;
|
19 |
-
}
|
20 |
-
}
|
21 |
-
}
|
22 |
-
catch(Exception $e)
|
23 |
-
{
|
24 |
-
echo $e;die;
|
25 |
-
}
|
26 |
-
}
|
27 |
-
|
28 |
-
|
29 |
-
}
|
30 |
-
|
1 |
+
<?php
|
2 |
+
class Cedcoss_Inxpress_ActivateController extends Mage_Core_Controller_Front_Action
|
3 |
+
{
|
4 |
+
public function indexAction()
|
5 |
+
{
|
6 |
+
try
|
7 |
+
{
|
8 |
+
if(isset($_POST['key']))
|
9 |
+
{
|
10 |
+
if($_POST['key']==Mage::getStoreConfig('carriers/inxpress/key'))
|
11 |
+
{
|
12 |
+
$inxpresskey = new Mage_Core_Model_Config();
|
13 |
+
|
14 |
+
$inxpresskey ->saveConfig('carriers/inxpress/active', 1, 'default', 0);
|
15 |
+
$inxpresskey ->saveConfig('carriers/inxpress/account', $_POST['account_no'], 'default', 0);
|
16 |
+
$inxpresskey ->saveConfig('carriers/inxpress/inexpressid', $_POST['inxpress_account_no'], 'default', 0);
|
17 |
+
$inxpresskey ->saveConfig('carriers/inxpress/gateway_url', 'http://www.ixpapi.com/ixpapp/rates.php', 'default', 0);
|
18 |
+
echo "Configuration Data Has Been Saved Successfully!!!!";die;
|
19 |
+
}
|
20 |
+
} else { echo "Key Is Not Provided";die; }
|
21 |
+
}
|
22 |
+
catch(Exception $e)
|
23 |
+
{
|
24 |
+
echo $e;die;
|
25 |
+
}
|
26 |
+
}
|
27 |
+
|
28 |
+
|
29 |
+
}
|
30 |
+
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>InXpress</name>
|
4 |
-
<version>0.1.
|
5 |
<stability>stable</stability>
|
6 |
<license>0.3osl</license>
|
7 |
<channel>community</channel>
|
@@ -20,9 +20,9 @@ As the largest small business solution of DHL Express, we are an authorized rese
|
|
20 |
</description>
|
21 |
<notes>Start selling internationally. Get bulk discounted DHL Express rates, displayed in real-time to your customers</notes>
|
22 |
<authors><author><name>Cedcoss</name><user>Cedcoss</user><email>developer@cedcoss.com</email></author></authors>
|
23 |
-
<date>2014-08-
|
24 |
-
<time>
|
25 |
-
<contents><target name="magelocal"><dir name="Cedcoss"><dir name="Inxpress"><dir name="Block"><dir name="Adminhtml"><dir name="Bundle"><dir name="Catalog"><dir name="Product"><dir name="Edit"><dir name="Tab"><file name="Attributes.php" hash="e357b4ecb18315fda2c47e8030012e5e"/></dir></dir></dir></dir></dir><dir name="Catalog"><dir name="Product"><dir name="Edit"><dir name="Tab"><file name="Attributes.php" hash="4b35e1ff0c375a66c1285ede3d038418"/><file name="Variant.php" hash="91d23debf200dadd80e146ecfd26b4fc"/></dir></dir></dir></dir><file name="Csvimport.php" hash="1bc5779bfce7d8d1129ca6dfb752b5a8"/><dir name="Dhl"><dir name="Edit"><file name="Form.php" hash="1e2c5798c4bd2d61032c9e1608574f2e"/><dir name="Tab"><file name="General.php" hash="7253685240f6d7bc4baf19708b4cc862"/></dir><file name="Tabs.php" hash="b40f6379e3f57a2f98c815d2a7244d3f"/></dir><file name="Edit.php" hash="d88689fc94b81d615a4f64b537b26257"/><file name="Grid.php" hash="879c4707e10eff48b36285796a64f2d0"/></dir><file name="Dhl.php" hash="339a84506adaec2025a8f68306bcdd30"/><dir name="Inxpress"><dir name="Edit"><file name="Form.php" hash="bcb5b83c72fde8d0709b7ac90490e71c"/><dir name="Tab"><file name="General.php" hash="85e9cac1678a06ea9ed2046e683e5469"/></dir><file name="Tabs.php" hash="37abefbd4ad54f6d05d21a2a3a9a48a4"/></dir><file name="Edit.php" hash="6a0abed926a0bfb013a5d3391df2b79c"/><file name="Grid.php" hash="57b14c1199df3ca0616f5b85677c740b"/></dir><file name="Inxpress.php" hash="1718c828a6d840e302ef9818fba73fd1"/><file name="Variant.php" hash="d249a67a9b93505d0ced3022dbb27646"/></dir></dir><dir name="Helper"><file name="Data.php" hash="02786dd8930932a9627eb5ac600ddb73"/></dir><dir name="Model"><dir name="Carrier"><file name="Inxpress.php" hash="
|
26 |
<compatible/>
|
27 |
<dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
|
28 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>InXpress</name>
|
4 |
+
<version>0.1.3</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>0.3osl</license>
|
7 |
<channel>community</channel>
|
20 |
</description>
|
21 |
<notes>Start selling internationally. Get bulk discounted DHL Express rates, displayed in real-time to your customers</notes>
|
22 |
<authors><author><name>Cedcoss</name><user>Cedcoss</user><email>developer@cedcoss.com</email></author></authors>
|
23 |
+
<date>2014-08-05</date>
|
24 |
+
<time>14:38:10</time>
|
25 |
+
<contents><target name="magelocal"><dir name="Cedcoss"><dir name="Inxpress"><dir name="Block"><dir name="Adminhtml"><dir name="Bundle"><dir name="Catalog"><dir name="Product"><dir name="Edit"><dir name="Tab"><file name="Attributes.php" hash="e357b4ecb18315fda2c47e8030012e5e"/></dir></dir></dir></dir></dir><dir name="Catalog"><dir name="Product"><dir name="Edit"><dir name="Tab"><file name="Attributes.php" hash="4b35e1ff0c375a66c1285ede3d038418"/><file name="Variant.php" hash="91d23debf200dadd80e146ecfd26b4fc"/></dir></dir></dir></dir><file name="Csvimport.php" hash="1bc5779bfce7d8d1129ca6dfb752b5a8"/><dir name="Dhl"><dir name="Edit"><file name="Form.php" hash="1e2c5798c4bd2d61032c9e1608574f2e"/><dir name="Tab"><file name="General.php" hash="7253685240f6d7bc4baf19708b4cc862"/></dir><file name="Tabs.php" hash="b40f6379e3f57a2f98c815d2a7244d3f"/></dir><file name="Edit.php" hash="d88689fc94b81d615a4f64b537b26257"/><file name="Grid.php" hash="879c4707e10eff48b36285796a64f2d0"/></dir><file name="Dhl.php" hash="339a84506adaec2025a8f68306bcdd30"/><dir name="Inxpress"><dir name="Edit"><file name="Form.php" hash="bcb5b83c72fde8d0709b7ac90490e71c"/><dir name="Tab"><file name="General.php" hash="85e9cac1678a06ea9ed2046e683e5469"/></dir><file name="Tabs.php" hash="37abefbd4ad54f6d05d21a2a3a9a48a4"/></dir><file name="Edit.php" hash="6a0abed926a0bfb013a5d3391df2b79c"/><file name="Grid.php" hash="57b14c1199df3ca0616f5b85677c740b"/></dir><file name="Inxpress.php" hash="1718c828a6d840e302ef9818fba73fd1"/><file name="Variant.php" hash="d249a67a9b93505d0ced3022dbb27646"/></dir></dir><dir name="Helper"><file name="Data.php" hash="02786dd8930932a9627eb5ac600ddb73"/></dir><dir name="Model"><dir name="Carrier"><file name="Inxpress.php" hash="32691a268782aad32a2a0d44012c653c"/><file name="Unitofmeasure.php" hash="89c1dd33c6342763606ec340b4f0fc4a"/></dir><file name="Dhl.php" hash="e493deb72b63f843d4d84145f188814a"/><file name="Inxpress.php" hash="c00b406b60986a41713219995929fe35"/><dir name="Mysql4"><dir name="Dhl"><file name="Collection.php" hash="beb11157339512591be47cad496d33d7"/></dir><file name="Dhl.php" hash="cfa31c7a528bd9cd67dbb9f04403f161"/><dir name="Inxpress"><file name="Collection.php" hash="fac10a23aad024cd73ea5ec0f618a488"/></dir><file name="Inxpress.php" hash="7b61c380c27488dc8cd885f58fe541ed"/><file name="Setup.php" hash="1d62889c7eb878fab5538068a659ff5b"/><dir name="Variant"><file name="Collection.php" hash="7a8a248004f2b4e8091b78fa96441136"/></dir><file name="Variant.php" hash="ea8dd752cc63e970ebec9bd927f7da8b"/></dir><file name="Variant.php" hash="a9a343e2fbcf3e26db9146864a7c1a51"/></dir><dir name="controllers"><file name="ActivateController.php" hash="48d1702edd21f9be61fa25c2d6b656fb"/><dir name="Adminhtml"><file name="DhlController.php" hash="5a32c5356ec2949306dd6044fa6e1e82"/><file name="IndexController.php" hash="150de793c305b376a765107a52c0b1e9"/></dir></dir><dir name="etc"><file name="config.xml" hash="87440471684e3b5576c54fca94342256"/><file name="system.xml" hash="3ac3ec9482377ec350a0bce82fb42660"/></dir><dir name="sql"><dir name="inxpress_setup"><file name="mysql4-install-0.1.0.php" hash="afb6f67e348dfb0b7b8e58e4c6058710"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="8c1df72fcc864599d11ef9f3060c3d8a"/><file name="mysql4-upgrade-0.1.1-0.1.2.php" hash="b6f63e3a963950de3bf48545b0c94151"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Cedcoss_Inxpress.xml" hash="ce41d55e28a410c66676332f84947239"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="inxpress.xml" hash="dc9466cb8a17ef0ebfba4fec8780420e"/></dir><dir name="template"><dir name="inxpress"><file name="csvimport.phtml" hash="2b6a7f335c898186f6a09e7f0dd223df"/><file name="popup.phtml" hash="b5d6e69a5632a5fb90f3e1257fe5cb84"/><file name="productedit.phtml" hash="318a4c20dc39574917d589650b8b6d79"/><file name="variant.phtml" hash="394d70580bd33d9af5ac28ff948b0bf6"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="skin"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="inxpress"><dir name="css"><file name="blank.gif" hash="325472601571f31e1bf00674c368d335"/><file name="fancybox_buttons.png" hash="b448080f8615e664b7788c7003803b59"/><file name="fancybox_loading.gif" hash="328cc0f6c78211485058d460e80f4fa8"/><file name="fancybox_loading@2x.gif" hash="f92938639fa894a0e8ded1c3368abe98"/><file name="fancybox_overlay.png" hash="77aeaa52715b898b73c74d68c630330e"/><file name="fancybox_sprite.png" hash="783d4031fe50c3d83c960911e1fbc705"/><file name="fancybox_sprite@2x.png" hash="ed9970ce22242421e66ff150aa97fe5f"/><file name="jquery.fancybox-buttons.css" hash="cac75538c2e3ddfadef839feaca8e356"/><file name="jquery.fancybox-thumbs.css" hash="52ddd84a9f42c1d4cd86d518a7f7e8bc"/><file name="jquery.fancybox.css" hash="6c55951ce1e3115711f63f99b7501f3a"/><file name="styles.css" hash="1c0e23e8c009f75795c4c1096f719e67"/></dir><dir name="images"><file name="gif-load-main.GIF" hash="8fd2f94e2bd93d7106461b08555d27db"/><file name="gif-load.GIF" hash="f4d3de48e22dcdca0ba54d609698828f"/></dir><dir name="js"><file name="jquery-1.10.1.min.js" hash="9b3af8c24f81421aa0bba99aa7b432ca"/><file name="jquery.fancybox-buttons.js" hash="be5c05db2dd0dc4574ede921f5161f83"/><file name="jquery.fancybox-media.js" hash="2788a541e052cb7926b7bde4058f87c1"/><file name="jquery.fancybox-thumbs.js" hash="e26ea36bf8046c223492f1641f9c476e"/><file name="jquery.fancybox.js" hash="e3367a65909f850774a2a54bdbfc821a"/><file name="jquery.fancybox.pack.js" hash="9e53f886fa07fc87b67a0b0b9412a943"/></dir></dir></dir></dir></dir></dir></target></contents>
|
26 |
<compatible/>
|
27 |
<dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
|
28 |
</package>
|