Version Notes
Currently active are modules for BPAY, direct deposit, Australia Post, the addition of regions and postcodes, and the addition of ABN and phone number to the general configuration values (although currently not in use).
Download this release
Release Info
Developer | Magento Core Team |
Extension | Fontis_Australia |
Version | 1.2.3 |
Comparing to | |
See all releases |
Code changes from version 1.2.2 to 1.2.3
app/code/community/Fontis/Australia/Model/Mysql4/Shipping/Carrier/Eparcel.php
CHANGED
@@ -12,7 +12,9 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* Originally based on Magento Tablerate Shipping code.
|
|
|
|
|
16 |
*
|
17 |
* @category Fontis
|
18 |
* @package Fontis_Australia
|
@@ -21,13 +23,6 @@
|
|
21 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
22 |
*/
|
23 |
|
24 |
-
/**
|
25 |
-
* Shipping table rates
|
26 |
-
*
|
27 |
-
* @category Mage
|
28 |
-
* @package Mage_Shipping
|
29 |
-
* @author Magento Core Team <core@magentocommerce.com>
|
30 |
-
*/
|
31 |
class Fontis_Australia_Model_Mysql4_Shipping_Carrier_Eparcel extends Mage_Core_Model_Mysql4_Abstract
|
32 |
{
|
33 |
protected function _construct()
|
@@ -35,77 +30,12 @@ class Fontis_Australia_Model_Mysql4_Shipping_Carrier_Eparcel extends Mage_Core_M
|
|
35 |
$this->_init('australia/eparcel', 'pk');
|
36 |
}
|
37 |
|
38 |
-
/*public function getRate(Mage_Shipping_Model_Rate_Request $request)
|
39 |
-
{
|
40 |
-
Mage::log(var_export($request->getConditionName(), true));
|
41 |
-
|
42 |
-
try
|
43 |
-
{
|
44 |
-
|
45 |
-
$read = $this->_getReadAdapter();
|
46 |
-
$write = $this->_getWriteAdapter();
|
47 |
-
|
48 |
-
$select = $read->select()->from($this->getMainTable());
|
49 |
-
|
50 |
-
$select->where(
|
51 |
-
$read->quoteInto(" (dest_country_id=? ", $request->getDestCountryId()).
|
52 |
-
$read->quoteInto(" AND dest_region_id=? ", $request->getDestRegionId()).
|
53 |
-
$read->quoteInto(" AND dest_zip=?) ", $request->getDestPostcode()).
|
54 |
-
|
55 |
-
$read->quoteInto(" OR (dest_country_id=? ", $request->getDestCountryId()).
|
56 |
-
$read->quoteInto(" AND dest_region_id=? AND dest_zip='') ", $request->getDestRegionId()).
|
57 |
-
|
58 |
-
$read->quoteInto(" OR (dest_country_id=? AND dest_region_id='0' AND dest_zip='') ", $request->getDestCountryId()).
|
59 |
-
|
60 |
-
$read->quoteInto(" OR (dest_country_id=? AND dest_region_id='0' ", $request->getDestCountryId()).
|
61 |
-
$read->quoteInto(" AND dest_zip=?) ", $request->getDestPostcode()).
|
62 |
-
|
63 |
-
" OR (dest_country_id='0' AND dest_region_id='0' AND dest_zip='')"
|
64 |
-
);
|
65 |
-
|
66 |
-
if (is_array($request->getConditionName())) {
|
67 |
-
$i = 0;
|
68 |
-
foreach ($request->getConditionName() as $conditionName) {
|
69 |
-
if ($i == 0) {
|
70 |
-
$select->where('condition_name=?', $conditionName);
|
71 |
-
} else {
|
72 |
-
$select->orWhere('condition_name=?', $conditionName);
|
73 |
-
}
|
74 |
-
$select->where('condition_from_value<=?', $request->getData($conditionName));
|
75 |
-
$i++;
|
76 |
-
}
|
77 |
-
} else {
|
78 |
-
$select->where('condition_name=?', $request->getConditionName());
|
79 |
-
$select->where('condition_from_value<=?', $request->getData($request->getConditionName()));
|
80 |
-
}
|
81 |
-
$select->where('website_id=?', $request->getWebsiteId());
|
82 |
-
|
83 |
-
$select->order('dest_country_id DESC');
|
84 |
-
$select->order('dest_region_id DESC');
|
85 |
-
$select->order('dest_zip DESC');
|
86 |
-
$select->order('condition_from_value DESC');
|
87 |
-
$select->limit(1);
|
88 |
-
|
89 |
-
// pdo has an issue. we cannot use bind
|
90 |
-
$row = $read->fetchRow($select);
|
91 |
-
Mage::log($row);
|
92 |
-
|
93 |
-
return $row;
|
94 |
-
|
95 |
-
}
|
96 |
-
catch(Exception $e)
|
97 |
-
{
|
98 |
-
Mage::log($e->getMessage());
|
99 |
-
}
|
100 |
-
}*/
|
101 |
-
|
102 |
public function getRate(Mage_Shipping_Model_Rate_Request $request)
|
103 |
{
|
104 |
$read = $this->_getReadAdapter();
|
105 |
$write = $this->_getWriteAdapter();
|
106 |
|
107 |
$postcode = $request->getDestPostcode();
|
108 |
-
//$table = Mage::getSingleton('core/resource')->getTableName('matrixrate_shipping/matrixrate');
|
109 |
$table = $this->getMainTable();
|
110 |
|
111 |
$insuranceStep = (float)Mage::getConfig()->getNode('default/carriers/eparcel/insurance_step');
|
@@ -121,7 +51,6 @@ class Fontis_Australia_Model_Mysql4_Shipping_Carrier_Eparcel extends Mage_Core_M
|
|
121 |
Mage::log($request->getDestRegionId());
|
122 |
Mage::log($postcode);
|
123 |
Mage::log(var_export($request->getConditionName(), true));
|
124 |
-
//Mage::log();
|
125 |
|
126 |
for ($j=0;$j<5;$j++)
|
127 |
{
|
@@ -190,8 +119,6 @@ class Fontis_Australia_Model_Mysql4_Shipping_Carrier_Eparcel extends Mage_Core_M
|
|
190 |
|
191 |
// pdo has an issue. we cannot use bind
|
192 |
|
193 |
-
//Mage::log(var_export($select, true));
|
194 |
-
|
195 |
$newdata=array();
|
196 |
Mage::log($select->__toString());
|
197 |
$row = $read->fetchAll($select);
|
@@ -301,23 +228,10 @@ class Fontis_Australia_Model_Mysql4_Shipping_Carrier_Eparcel extends Mage_Core_M
|
|
301 |
->addCountryFilter($countryCodesIso2)
|
302 |
->load();
|
303 |
|
304 |
-
//print("<pre>");
|
305 |
-
//print_r($regionCollection->getItems());
|
306 |
-
//print("</pre>");
|
307 |
-
//die;
|
308 |
-
|
309 |
-
/*foreach ($regionCollection->getItems() as $region) {
|
310 |
-
$regionCodesToIds[$countryCodesToIds[$region->getData('country_id')]][$region->getData('code')] = $region->getData('region_id');
|
311 |
-
}*/
|
312 |
foreach ($regionCollection->getItems() as $region) {
|
313 |
$regionCodesToIds[$region->getData('code')] = $region->getData('region_id');
|
314 |
}
|
315 |
|
316 |
-
//print("<pre>");
|
317 |
-
//print_r($regionCodesToIds);
|
318 |
-
//print("</pre>");
|
319 |
-
//die;
|
320 |
-
|
321 |
foreach ($csvLines as $k=>$csvLine) {
|
322 |
$csvLine = $this->_getCsvValues($csvLine);
|
323 |
|
@@ -330,16 +244,6 @@ class Fontis_Australia_Model_Mysql4_Shipping_Carrier_Eparcel extends Mage_Core_M
|
|
330 |
$countryId = $countryCodesToIds[$csvLine[0]];
|
331 |
}
|
332 |
|
333 |
-
/*if (empty($regionCodesToIds[$countryCodesToIds[$csvLine[0]]])
|
334 |
-
|| !array_key_exists($csvLine[1], $regionCodesToIds[$countryCodesToIds[$csvLine[0]]])) {
|
335 |
-
$regionId = '0';
|
336 |
-
if ($csvLine[1] != '*' && $csvLine[1] != '') {
|
337 |
-
$exceptions[] = Mage::helper('shipping')->__('Invalid Region/State "%s" in the Row #%s', $csvLine[1], ($k+1));
|
338 |
-
}
|
339 |
-
} else {
|
340 |
-
$regionId = $regionCodesToIds[$countryCodesToIds[$csvLine[0]]][$csvLine[1]];
|
341 |
-
}*/
|
342 |
-
|
343 |
if (empty($regionCodesToIds) || !array_key_exists($csvLine[1], $regionCodesToIds)) {
|
344 |
$regionId = '0';
|
345 |
if ($csvLine[1] != '*' && $csvLine[1] != '') {
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
*
|
15 |
+
* Originally based on Magento Tablerate Shipping code and Auctionmaid Matrixrate.
|
16 |
+
* @copyright Copyright (c) 2008 Auction Maid (http://www.auctionmaid.com)
|
17 |
+
* @author Karen Baker <enquiries@auctionmaid.com>
|
18 |
*
|
19 |
* @category Fontis
|
20 |
* @package Fontis_Australia
|
23 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
24 |
*/
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
class Fontis_Australia_Model_Mysql4_Shipping_Carrier_Eparcel extends Mage_Core_Model_Mysql4_Abstract
|
27 |
{
|
28 |
protected function _construct()
|
30 |
$this->_init('australia/eparcel', 'pk');
|
31 |
}
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
public function getRate(Mage_Shipping_Model_Rate_Request $request)
|
34 |
{
|
35 |
$read = $this->_getReadAdapter();
|
36 |
$write = $this->_getWriteAdapter();
|
37 |
|
38 |
$postcode = $request->getDestPostcode();
|
|
|
39 |
$table = $this->getMainTable();
|
40 |
|
41 |
$insuranceStep = (float)Mage::getConfig()->getNode('default/carriers/eparcel/insurance_step');
|
51 |
Mage::log($request->getDestRegionId());
|
52 |
Mage::log($postcode);
|
53 |
Mage::log(var_export($request->getConditionName(), true));
|
|
|
54 |
|
55 |
for ($j=0;$j<5;$j++)
|
56 |
{
|
119 |
|
120 |
// pdo has an issue. we cannot use bind
|
121 |
|
|
|
|
|
122 |
$newdata=array();
|
123 |
Mage::log($select->__toString());
|
124 |
$row = $read->fetchAll($select);
|
228 |
->addCountryFilter($countryCodesIso2)
|
229 |
->load();
|
230 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
231 |
foreach ($regionCollection->getItems() as $region) {
|
232 |
$regionCodesToIds[$region->getData('code')] = $region->getData('region_id');
|
233 |
}
|
234 |
|
|
|
|
|
|
|
|
|
|
|
235 |
foreach ($csvLines as $k=>$csvLine) {
|
236 |
$csvLine = $this->_getCsvValues($csvLine);
|
237 |
|
244 |
$countryId = $countryCodesToIds[$csvLine[0]];
|
245 |
}
|
246 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
247 |
if (empty($regionCodesToIds) || !array_key_exists($csvLine[1], $regionCodesToIds)) {
|
248 |
$regionId = '0';
|
249 |
if ($csvLine[1] != '*' && $csvLine[1] != '') {
|
app/code/community/Fontis/Australia/Model/Shipping/Carrier/Eparcel.php
CHANGED
@@ -12,7 +12,9 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* Originally based on Magento Tablerate Shipping code.
|
|
|
|
|
16 |
*
|
17 |
* @category Fontis
|
18 |
* @package Fontis_Australia
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
*
|
15 |
+
* Originally based on Magento Tablerate Shipping code and Auctionmaid Matrixrate.
|
16 |
+
* @copyright Copyright (c) 2008 Auction Maid (http://www.auctionmaid.com)
|
17 |
+
* @author Karen Baker <enquiries@auctionmaid.com>
|
18 |
*
|
19 |
* @category Fontis
|
20 |
* @package Fontis_Australia
|
app/code/community/Fontis/Australia/etc/config.xml
CHANGED
@@ -23,7 +23,7 @@
|
|
23 |
<config>
|
24 |
<modules>
|
25 |
<Fontis_Australia>
|
26 |
-
<version>1.2.
|
27 |
<depends>
|
28 |
<Mage_Shipping />
|
29 |
<Mage_Payment />
|
23 |
<config>
|
24 |
<modules>
|
25 |
<Fontis_Australia>
|
26 |
+
<version>1.2.3</version>
|
27 |
<depends>
|
28 |
<Mage_Shipping />
|
29 |
<Mage_Payment />
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Fontis_Australia</name>
|
4 |
-
<version>1.2.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL 3.0)</license>
|
7 |
<channel>community</channel>
|
@@ -10,9 +10,9 @@
|
|
10 |
<description>This extension is intended to provide most of the functionality needed to run a Magento store in Australia. This includes all essential payment and shipping methods as well as small localisations such as adding the store's ABN, adding Australian states and territories to the region directory and adding in a postcode database.</description>
|
11 |
<notes>Currently active are modules for BPAY, direct deposit, Australia Post, the addition of regions and postcodes, and the addition of ABN and phone number to the general configuration values (although currently not in use).</notes>
|
12 |
<authors><author><name>Chris Norton</name><user>auto-converted</user><email>chris.norton@fontis.com.au</email></author><author><name>Lloyd Hazlett</name><user>auto-converted</user><email>hazzard43@fastmail.fm</email></author><author><name>Fontis</name><user>auto-converted</user><email>magento@fontis.com.au</email></author></authors>
|
13 |
-
<date>2009-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="fontis"><dir name="australia"><dir name="payment"><dir name="bpay"><file name="form.phtml" hash="2bd318e4e8ac220a6b2f8339d5cf090d"/><file name="info.phtml" hash="70dae47552b94f5773afb59d00555a4b"/></dir><dir name="directdeposit"><file name="form.phtml" hash="1d01443b2e0f3147bf65dd9c799d4744"/><file name="info.phtml" hash="70d76862e026d4e8d76e6c32a36a5d74"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="fontis"><dir name="australia"><dir name="payment"><dir name="bpay"><file name="form.phtml" hash="2bd318e4e8ac220a6b2f8339d5cf090d"/><file name="info.phtml" hash="f578ec338f8b333f20af6253676fa167"/></dir><dir name="directdeposit"><file name="form.phtml" hash="1ad42dfd4409c49166e864469b24b898"/><file name="info.phtml" hash="70d76862e026d4e8d76e6c32a36a5d74"/></dir></dir><file name="postcode-checkout.phtml" hash="51867acd43c4f8c982ab1fea103a579f"/><file name="postcode.phtml" hash="b0d7bfa170c7ca3bd4a256f0404d7189"/><file name="postcode.phtml.~1~" hash="85dbbd2b416f85f230dcce12e52cb397"/></dir></dir></dir></dir></dir></dir></target><target name="magecommunity"><dir name="Fontis"><dir name="Australia"><dir name="Block"><dir name="Bpay"><file name="Form.php" hash="958e11d14d7c87054a68d34b60c498d6"/><file name="Info.php" hash="a28f40be3c76637eb43ba80c61031512"/></dir><dir name="Directdeposit"><file name="Form.php" hash="13589d5d85499678bdc62fde04107095"/><file name="Info.php" hash="0f31ac7451127c87813c823423a9057b"/></dir><file name="Autocomplete.php" hash="4f33f809dae969781ead580b13e9bd3a"/></dir><dir name="controllers"><file name="AjaxController.php" hash="5fb086e3236446b6a6f10f4c78eb3fcb"/></dir><dir name="etc"><file name="config.xml" hash="
|
16 |
<compatible/>
|
17 |
<dependencies/>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Fontis_Australia</name>
|
4 |
+
<version>1.2.3</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL 3.0)</license>
|
7 |
<channel>community</channel>
|
10 |
<description>This extension is intended to provide most of the functionality needed to run a Magento store in Australia. This includes all essential payment and shipping methods as well as small localisations such as adding the store's ABN, adding Australian states and territories to the region directory and adding in a postcode database.</description>
|
11 |
<notes>Currently active are modules for BPAY, direct deposit, Australia Post, the addition of regions and postcodes, and the addition of ABN and phone number to the general configuration values (although currently not in use).</notes>
|
12 |
<authors><author><name>Chris Norton</name><user>auto-converted</user><email>chris.norton@fontis.com.au</email></author><author><name>Lloyd Hazlett</name><user>auto-converted</user><email>hazzard43@fastmail.fm</email></author><author><name>Fontis</name><user>auto-converted</user><email>magento@fontis.com.au</email></author></authors>
|
13 |
+
<date>2009-08-24</date>
|
14 |
+
<time>06:52:06</time>
|
15 |
+
<contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="fontis"><dir name="australia"><dir name="payment"><dir name="bpay"><file name="form.phtml" hash="2bd318e4e8ac220a6b2f8339d5cf090d"/><file name="info.phtml" hash="70dae47552b94f5773afb59d00555a4b"/></dir><dir name="directdeposit"><file name="form.phtml" hash="1d01443b2e0f3147bf65dd9c799d4744"/><file name="info.phtml" hash="70d76862e026d4e8d76e6c32a36a5d74"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="fontis"><dir name="australia"><dir name="payment"><dir name="bpay"><file name="form.phtml" hash="2bd318e4e8ac220a6b2f8339d5cf090d"/><file name="info.phtml" hash="f578ec338f8b333f20af6253676fa167"/></dir><dir name="directdeposit"><file name="form.phtml" hash="1ad42dfd4409c49166e864469b24b898"/><file name="info.phtml" hash="70d76862e026d4e8d76e6c32a36a5d74"/></dir></dir><file name="postcode-checkout.phtml" hash="51867acd43c4f8c982ab1fea103a579f"/><file name="postcode.phtml" hash="b0d7bfa170c7ca3bd4a256f0404d7189"/><file name="postcode.phtml.~1~" hash="85dbbd2b416f85f230dcce12e52cb397"/></dir></dir></dir></dir></dir></dir></target><target name="magecommunity"><dir name="Fontis"><dir name="Australia"><dir name="Block"><dir name="Bpay"><file name="Form.php" hash="958e11d14d7c87054a68d34b60c498d6"/><file name="Info.php" hash="a28f40be3c76637eb43ba80c61031512"/></dir><dir name="Directdeposit"><file name="Form.php" hash="13589d5d85499678bdc62fde04107095"/><file name="Info.php" hash="0f31ac7451127c87813c823423a9057b"/></dir><file name="Autocomplete.php" hash="4f33f809dae969781ead580b13e9bd3a"/></dir><dir name="controllers"><file name="AjaxController.php" hash="5fb086e3236446b6a6f10f4c78eb3fcb"/></dir><dir name="etc"><file name="config.xml" hash="65abfd7b682bd959420c48609c860fe7"/><file name="system.xml" hash="55e1454a117345d75972ce83501f1cf1"/></dir><dir name="Helper"><file name="Data.php" hash="e493486d7a5ccd5589d99d08b136b819"/></dir><dir name="Model"><dir name="Config"><file name="CustomerGroupAccess.php" hash="e531a8049b9a877e01c2b806b065dbef"/><file name="CustomerGroups.php" hash="8014e56b1141cb9bbb63f807ec1c87a5"/></dir><dir name="Mysql4"><dir name="Shipping"><dir name="Carrier"><dir name="Eparcel"><file name="Collection.php" hash="87f450c6b318060b83e7d7d0662cdf50"/></dir><file name="Eparcel.php" hash="9614eed4296b17a429db745c289d42cf"/></dir></dir></dir><dir name="Payment"><file name="Bpay.php" hash="56d5b9d3e17cbc9ff4316fef2574401a"/><file name="Directdeposit.php" hash="21c4febe6d321450fba4de5e655093c8"/></dir><dir name="Shipping"><dir name="Carrier"><file name="Australiapost.php" hash="a5555c24db85f036ed32f38b13b6d101"/><file name="Eparcel.php" hash="b65cd938b27b4666e22b6833ca738226"/></dir><dir name="Config"><file name="Eparcel.php" hash="8c754cdc86316dbee53db68f0e2652bc"/><file name="Eparcelcondition.php" hash="b8cc830ab6e0e397d32bf574f60b0500"/><file name="Weightunits.php" hash="e13ba9de393ae67420f863d4008c3c72"/></dir></dir><dir name="Tax"><file name="Gst.php" hash="d7e024971dab498e80de8c957d2911f2"/></dir></dir><dir name="sql"><dir name="australia_setup"><file name="mysql4-install-0.7.0.php" hash="f475b13bb5319599c4a852cfb8788f9a"/><file name="mysql4-upgrade-1.2.1-1.2.2.php" hash="2eeefbf77b10d568f435711d368a5295"/><file name="postcodes.txt" hash="21083a0f94e200259c9b4540666b251e"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Fontis_Australia.xml" hash="a60b83cf1b1b449a16fe09da16342a4d"/></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies/>
|
18 |
</package>
|