Version Notes
1 - The export csv option is currently disabled. This is so the extension does not conflict with the existing tablerates. There are no plans to resolve this - if you need to view the data look in phpmyadmin.
Download this release
Release Info
Developer | Magento Core Team |
Extension | Auctionmaid_Matrxrate |
Version | 2.0.11 |
Comparing to | |
See all releases |
Code changes from version 2.0.9 to 2.0.11
app/code/community/Auctionmaid/Matrixrate/Model/Carrier/Matrixrate.php
CHANGED
@@ -56,13 +56,31 @@ class Auctionmaid_Matrixrate_Model_Carrier_Matrixrate
|
|
56 |
return false;
|
57 |
}
|
58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
|
60 |
$request->setConditionName($this->getConfigData('condition_name') ? $this->getConfigData('condition_name') : $this->_default_condition_name);
|
61 |
|
62 |
$result = Mage::getModel('shipping/rate_result');
|
63 |
$ratearray = $this->getRate($request);
|
64 |
|
65 |
-
|
|
|
66 |
foreach ($ratearray as $rate)
|
67 |
{
|
68 |
if (!empty($rate) && $rate['price'] >= 0) {
|
@@ -71,18 +89,24 @@ class Auctionmaid_Matrixrate_Model_Carrier_Matrixrate
|
|
71 |
$method->setCarrier('matrixrate');
|
72 |
$method->setCarrierTitle($this->getConfigData('title'));
|
73 |
|
74 |
-
$method->setMethod('
|
75 |
|
76 |
$method->setMethodTitle($rate['delivery_type']);
|
77 |
|
78 |
$shippingPrice = $this->getFinalPriceWithHandlingFee($rate['price']);
|
79 |
-
|
80 |
-
$method->setPrice($shippingPrice);
|
81 |
$method->setCost($rate['cost']);
|
82 |
$method->setDeliveryType($rate['delivery_type']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
|
84 |
$result->append($method);
|
85 |
-
$i++;
|
86 |
}
|
87 |
}
|
88 |
|
@@ -134,7 +158,7 @@ class Auctionmaid_Matrixrate_Model_Carrier_Matrixrate
|
|
134 |
*/
|
135 |
public function getAllowedMethods()
|
136 |
{
|
137 |
-
return array('
|
138 |
}
|
139 |
|
140 |
}
|
56 |
return false;
|
57 |
}
|
58 |
|
59 |
+
$freeBoxes = 0;
|
60 |
+
$found=false;
|
61 |
+
$total=0;
|
62 |
+
foreach ($request->getAllItems() as $item) {
|
63 |
+
if ($item->getFreeShipping() && !$item->getProduct()->isVirtual()) {
|
64 |
+
$freeBoxes+=$item->getQty();
|
65 |
+
}
|
66 |
+
if ($item->getProductType() != Mage_Catalog_Model_Product_Type::TYPE_VIRTUAL ||
|
67 |
+
$item->getProductType() != 'downloadable') {
|
68 |
+
$total=+ $item->getBaseRowTotal();
|
69 |
+
$found=true;
|
70 |
+
}
|
71 |
+
}
|
72 |
+
if ($found) {
|
73 |
+
$request->setPackageValue($total);
|
74 |
+
}
|
75 |
+
$this->setFreeBoxes($freeBoxes);
|
76 |
|
77 |
$request->setConditionName($this->getConfigData('condition_name') ? $this->getConfigData('condition_name') : $this->_default_condition_name);
|
78 |
|
79 |
$result = Mage::getModel('shipping/rate_result');
|
80 |
$ratearray = $this->getRate($request);
|
81 |
|
82 |
+
|
83 |
+
|
84 |
foreach ($ratearray as $rate)
|
85 |
{
|
86 |
if (!empty($rate) && $rate['price'] >= 0) {
|
89 |
$method->setCarrier('matrixrate');
|
90 |
$method->setCarrierTitle($this->getConfigData('title'));
|
91 |
|
92 |
+
$method->setMethod('matrixrate_'.$rate['pk']);
|
93 |
|
94 |
$method->setMethodTitle($rate['delivery_type']);
|
95 |
|
96 |
$shippingPrice = $this->getFinalPriceWithHandlingFee($rate['price']);
|
|
|
|
|
97 |
$method->setCost($rate['cost']);
|
98 |
$method->setDeliveryType($rate['delivery_type']);
|
99 |
+
|
100 |
+
if ($request->getFreeShipping() === true || $request->getPackageQty() == $this->getFreeBoxes()) {
|
101 |
+
$method->setPrice('0.00');
|
102 |
+
$method->setMethodTitle(Mage::helper('shipping')->__('Free Shipping'));
|
103 |
+
$result->append($method);
|
104 |
+
break;
|
105 |
+
}
|
106 |
+
|
107 |
+
$method->setPrice($shippingPrice);
|
108 |
|
109 |
$result->append($method);
|
|
|
110 |
}
|
111 |
}
|
112 |
|
158 |
*/
|
159 |
public function getAllowedMethods()
|
160 |
{
|
161 |
+
return array('matrixrate'=>$this->getConfigData('name'));
|
162 |
}
|
163 |
|
164 |
}
|
app/code/community/Auctionmaid/Matrixrate/Model/Mysql4/Carrier/Matrixrate.php
CHANGED
@@ -147,7 +147,6 @@ class Auctionmaid_Matrixrate_Model_Mysql4_Carrier_Matrixrate extends Mage_Core_M
|
|
147 |
pdo has an issue. we cannot use bind
|
148 |
*/
|
149 |
|
150 |
-
|
151 |
$newdata=array();
|
152 |
$row = $read->fetchAll($select);
|
153 |
if (!empty($row))
|
147 |
pdo has an issue. we cannot use bind
|
148 |
*/
|
149 |
|
|
|
150 |
$newdata=array();
|
151 |
$row = $read->fetchAll($select);
|
152 |
if (!empty($row))
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Auctionmaid_Matrxrate</name>
|
4 |
-
<version>2.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
@@ -20,9 +20,9 @@ Suitable for all countries incl UK, US, AUS, Europe.</summary>
|
|
20 |
- collection only option</description>
|
21 |
<notes>1 - The export csv option is currently disabled. This is so the extension does not conflict with the existing tablerates. There are no plans to resolve this - if you need to view the data look in phpmyadmin.</notes>
|
22 |
<authors><author><name>Karen Baker</name><user>auto-converted</user><email>enquiries@auctionmaid.com</email></author></authors>
|
23 |
-
<date>2009-
|
24 |
-
<time>
|
25 |
-
<contents><target name="magecommunity"><dir name="Auctionmaid"><dir name="Adminhtml"><dir name="Model"><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Shipping"><file name="Matrixrate.php" hash="3845daf2530ea28f4c1c9ef0896e4590"/></dir></dir><dir name="Source"><dir name="Shipping"><file name="Matrixrate.php" hash="bf0ab44901dacc3774a8afab91c08848"/></dir></dir></dir></dir></dir></dir><dir name="docs"><file name="AuctionMaid MatrixRate Shipping Module.pdf" hash="5046ebd65b62a3b66556d8efc8a9976a"/><file name="manual install.sql" hash="2aa137bddf757b7dddf96bbbf8d4019a"/></dir><dir name="example"><dir name="7-col"><file name="export_all_products.csv" hash="ee76a59cc041f80012dc547febaf5393"/><file name="tablerates - item tofrom.csv" hash="c21b4cbf21aefa5cc590ccd2ff073a04"/><file name="tablerates - price tofrom.csv" hash="834af0aeb1aa98abf91f637015f5e3ba"/><file name="tablerates - weight tofrom.csv" hash="c2d26d1097c6a6b1641353b548437421"/></dir><dir name="9-col"><file name="AusRanges.csv" hash="7884e9c2a15f495ce6a80091c38478b5"/><file name="weight postcode range.csv" hash="8b0f12598742f57a5444bfee16219603"/><file name="weight postcode starts with.csv" hash="b83d1c8f6798a42186a63116fc5575b3"/></dir></dir><dir name="Freeoptionalshipping"><dir name="etc"><file name="config.xml" hash="f450793ee1f015b5ea0d84ec910c3d76"/><file name="system.xml" hash="7f1fb48e01e1299bf449a769084bddbc"/></dir><dir name="Model"><dir name="Carrier"><file name="Freeoptionalshipping.php" hash="61a1a724230fab3a9a9fe68ab9ee29cd"/></dir></dir></dir><dir name="Matrixrate"><dir name="etc"><file name="config.xml" hash="2fa5eb007a21cd14c06a51afe267a376"/><file name="system.xml" hash="cf1c8c2b472453da081c12cba74ef4d1"/></dir><dir name="Model"><dir name="Carrier"><file name="Matrixrate.php" hash="
|
26 |
<compatible/>
|
27 |
<dependencies/>
|
28 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Auctionmaid_Matrxrate</name>
|
4 |
+
<version>2.0.11</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
20 |
- collection only option</description>
|
21 |
<notes>1 - The export csv option is currently disabled. This is so the extension does not conflict with the existing tablerates. There are no plans to resolve this - if you need to view the data look in phpmyadmin.</notes>
|
22 |
<authors><author><name>Karen Baker</name><user>auto-converted</user><email>enquiries@auctionmaid.com</email></author></authors>
|
23 |
+
<date>2009-06-26</date>
|
24 |
+
<time>06:38:44</time>
|
25 |
+
<contents><target name="magecommunity"><dir name="Auctionmaid"><dir name="Adminhtml"><dir name="Model"><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Shipping"><file name="Matrixrate.php" hash="3845daf2530ea28f4c1c9ef0896e4590"/></dir></dir><dir name="Source"><dir name="Shipping"><file name="Matrixrate.php" hash="bf0ab44901dacc3774a8afab91c08848"/></dir></dir></dir></dir></dir></dir><dir name="docs"><file name="AuctionMaid MatrixRate Shipping Module.pdf" hash="5046ebd65b62a3b66556d8efc8a9976a"/><file name="manual install.sql" hash="2aa137bddf757b7dddf96bbbf8d4019a"/></dir><dir name="example"><dir name="7-col"><file name="export_all_products.csv" hash="ee76a59cc041f80012dc547febaf5393"/><file name="tablerates - item tofrom.csv" hash="c21b4cbf21aefa5cc590ccd2ff073a04"/><file name="tablerates - price tofrom.csv" hash="834af0aeb1aa98abf91f637015f5e3ba"/><file name="tablerates - weight tofrom.csv" hash="c2d26d1097c6a6b1641353b548437421"/></dir><dir name="9-col"><file name="AusRanges.csv" hash="7884e9c2a15f495ce6a80091c38478b5"/><file name="weight postcode range.csv" hash="8b0f12598742f57a5444bfee16219603"/><file name="weight postcode starts with.csv" hash="b83d1c8f6798a42186a63116fc5575b3"/></dir></dir><dir name="Freeoptionalshipping"><dir name="etc"><file name="config.xml" hash="f450793ee1f015b5ea0d84ec910c3d76"/><file name="system.xml" hash="7f1fb48e01e1299bf449a769084bddbc"/></dir><dir name="Model"><dir name="Carrier"><file name="Freeoptionalshipping.php" hash="61a1a724230fab3a9a9fe68ab9ee29cd"/></dir></dir></dir><dir name="Matrixrate"><dir name="etc"><file name="config.xml" hash="2fa5eb007a21cd14c06a51afe267a376"/><file name="system.xml" hash="cf1c8c2b472453da081c12cba74ef4d1"/></dir><dir name="Model"><dir name="Carrier"><file name="Matrixrate.php" hash="a9e4e35c41464cadef6ae72c34a4d807"/></dir><dir name="Mysql4"><dir name="Carrier"><file name="Matrixrate.php" hash="439f18391bd6c378adcce959dd23d388"/><dir name="Matrixrate"><file name="Collection.php" hash="adf9282dce1467f2d47e68b4ecc49de9"/></dir></dir></dir></dir><dir name="sql"><dir name="matrixrate_setup"><file name="mysql4-install-1.0.5.php" hash="32ea533fd01276e78322ae734446dc93"/><file name="mysql4-install-2.0.0.php" hash="32ea533fd01276e78322ae734446dc93"/><file name="mysql4-install-2.0.1.php" hash="b73c3fbb8af9c75af23beddfd9b8888a"/><file name="mysql4-uninstall-2.0.0.php" hash="7efdd041b23194f1fbb9b0afc657bf1e"/><file name="mysql4-uninstall-2.0.1.php" hash="d6c1d1d151f31a9d4f78e437d1d73e38"/><file name="mysql4-upgrade-2.0.0.php" hash="32ea533fd01276e78322ae734446dc93"/><file name="mysql4-upgrade-2.0.1.php" hash="505940c2071753011f03a92a18fe6141"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Auctionmaid_Freeoptionalshipping.xml" hash="a8bceecaca2402682f1713222ce23b4d"/><file name="Auctionmaid_Matrixrate.xml" hash="bde75a0463f7dc40affc8b2ce812ec91"/></dir></target></contents>
|
26 |
<compatible/>
|
27 |
<dependencies/>
|
28 |
</package>
|