Auctionmaid_Matrxrate - Version 5.1.1

Version Notes

Resolved issue with exporting after applying Magento patch SUPEE-6285.
Removed Logger.

Download this release

Release Info

Developer Karen Baker
Extension Auctionmaid_Matrxrate
Version 5.1.1
Comparing to
See all releases


Code changes from version 5.0.1 to 5.1.1

app/code/community/Webshopapps/Adminshortcut/Helper/Data.php ADDED
@@ -0,0 +1,35 @@
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
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
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Shipping
23
+ * @copyright Copyright (c) 2013 Zowta Ltd (http://www.WebShopApps.com)
24
+ * Copyright, 2013, Zowta, LLC - US license
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+
28
+ /**
29
+ * Shipping data helper
30
+ */
31
+ class Webshopapps_Adminshortcut_Helper_Data extends Mage_Core_Helper_Abstract
32
+ {
33
+
34
+
35
+ }
app/code/community/Webshopapps/Adminshortcut/changelog.txt ADDED
@@ -0,0 +1 @@
1
+ 1.0 - Initial release with hardcoded links
app/code/community/Webshopapps/Adminshortcut/etc/adminhtml.xml ADDED
@@ -0,0 +1,88 @@
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento Webshopapps Shipping Module
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category Webshopapps
23
+ * @package Webshopapps_Boxmenu
24
+ * @copyright Copyright (c) 2013 Zowta Ltd (http://www.WebShopApps.com)
25
+ * Copyright, 2013, Zowta, LLC - US license
26
+ * @license http://www.webshopapps.com/license/license.txt
27
+ * @author Karen Baker <sales@webshopapps.com>
28
+ */
29
+ -->
30
+ <config>
31
+ <menu>
32
+ <adminshortcut>
33
+ <title>Shortcuts</title>
34
+ <sort_order>200</sort_order>
35
+ <children>
36
+ <shipping_methods translate="title" module="adminshortcut">
37
+ <title>Shipping Methods</title>
38
+ <action>adminhtml/system_config/edit/section/carriers</action>
39
+ </shipping_methods>
40
+ <shipping_settings translate="title" module="adminshortcut">
41
+ <title>Shipping Settings</title>
42
+ <action>adminhtml/system_config/edit/section/shipping</action>
43
+ </shipping_settings>
44
+ <attributes translate="title" module="adminshortcut">
45
+ <title>Attributes</title>
46
+ <action>adminhtml/catalog_product_attribute</action>
47
+ </attributes>
48
+ <logger translate="title" module="adminshortcut">
49
+ <title>WebShopApps Logger</title>
50
+ <action>adminhtml/system_config/edit/section/wsalogmenu</action>
51
+ </logger>
52
+ <dev_logger translate="title" module="adminshortcut">
53
+ <title>Developer Logging</title>
54
+ <action>adminhtml/system_config/edit/section/dev</action>
55
+ </dev_logger>
56
+ </children>
57
+ </adminshortcut>
58
+ </menu>
59
+ <acl>
60
+ <resources>
61
+ <admin>
62
+ <children>
63
+ <adminshortcut>
64
+ <title>Shortcuts</title>
65
+ <sort_order>200</sort_order>
66
+ <children>
67
+ <shipping_methods translate="title">
68
+ <title>Shipping Methods</title>
69
+ </shipping_methods>
70
+ <shipping_methods translate="title">
71
+ <title>Shipping Settings</title>
72
+ </shipping_methods>
73
+ <attributes translate="title">
74
+ <title>Attributes</title>
75
+ </attributes>
76
+ <logger translate="title">
77
+ <title>WebShopApps Logger</title>
78
+ </logger>
79
+ <dev_logger translate="title">
80
+ <title>Developer Logging</title>
81
+ </dev_logger>
82
+ </children>
83
+ </adminshortcut>
84
+ </children>
85
+ </admin>
86
+ </resources>
87
+ </acl>
88
+ </config>
app/code/community/Webshopapps/Adminshortcut/etc/config.xml ADDED
@@ -0,0 +1,44 @@
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento Webshopapps Shipping Module
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ @category Webshopapps
23
+ * @package Webshopapps_Wsavalidation
24
+ * @copyright Copyright (c) 2013 Zowta Ltd (http://www.WebShopApps.com)
25
+ * Copyright, 2013, Zowta, LLC - US license
26
+ * @license http://www.webshopapps.com/license/license.txt
27
+ * @author Karen Baker <sales@webshopapps.com
28
+ *
29
+ */
30
+ -->
31
+ <config>
32
+ <modules>
33
+ <Webshopapps_Adminshortcut>
34
+ <version>0.0.1</version>
35
+ </Webshopapps_Adminshortcut>
36
+ </modules>
37
+ <global>
38
+ <helpers>
39
+ <adminshortcut>
40
+ <class>Webshopapps_Adminshortcut_Helper</class>
41
+ </adminshortcut>
42
+ </helpers>
43
+ </global>
44
+ </config>
app/code/community/Webshopapps/Matrixrate/Block/Adminhtml/Shipping/Carrier/Matrixrate/Grid.php CHANGED
@@ -1,153 +1,153 @@
1
- <?php
2
-
3
-
4
- class Webshopapps_Matrixrate_Block_Adminhtml_Shipping_Carrier_Matrixrate_Grid extends Mage_Adminhtml_Block_Widget_Grid
5
- {
6
-
7
- /**
8
- * Prepare table columns
9
- *
10
- * @return Mage_Adminhtml_Block_Widget_Grid
11
- */
12
- protected function _prepareColumns()
13
- {
14
- $this->addColumn('dest_country', array(
15
- 'header' => Mage::helper('adminhtml')->__('Country'),
16
- 'index' => 'dest_country',
17
- 'default' => '*',
18
- ));
19
-
20
- $this->addColumn('dest_region', array(
21
- 'header' => Mage::helper('adminhtml')->__('Region/State'),
22
- 'index' => 'dest_region',
23
- 'default' => '*',
24
- ));
25
-
26
- $this->addColumn('dest_city', array(
27
- 'header' => Mage::helper('adminhtml')->__('City'),
28
- 'index' => 'dest_city',
29
- 'default' => '*',
30
- ));
31
-
32
- $this->addColumn('dest_zip', array(
33
- 'header' => Mage::helper('adminhtml')->__('Zip/Postal Code From'),
34
- 'index' => 'dest_zip',
35
- ));
36
-
37
- $this->addColumn('dest_zip_to', array(
38
- 'header' => Mage::helper('adminhtml')->__('Zip/Postal Code To'),
39
- 'index' => 'dest_zip_to',
40
- ));
41
-
42
-
43
- $label = Mage::getSingleton('matrixrate/carrier_matrixrate')
44
- ->getCode('condition_name_short', $this->getConditionName());
45
-
46
- $this->addColumn('condition_from_value', array(
47
- 'header' => $label.' From',
48
- 'index' => 'condition_from_value',
49
- ));
50
-
51
- $this->addColumn('condition_to_value', array(
52
- 'header' => $label.' To',
53
- 'index' => 'condition_to_value',
54
- ));
55
-
56
- $this->addColumn('price', array(
57
- 'header' => Mage::helper('adminhtml')->__('Shipping Price'),
58
- 'index' => 'price',
59
- ));
60
-
61
- $this->addColumn('delivery_type', array(
62
- 'header' => Mage::helper('adminhtml')->__('Delivery Type'),
63
- 'index' => 'delivery_type',
64
- ));
65
-
66
- return Mage_Adminhtml_Block_Widget_Grid::_prepareColumns();
67
- }
68
-
69
- protected function _prepareCollection()
70
- {
71
- $collection = Mage::getResourceModel('matrixrate_shipping/carrier_matrixrate_collection');
72
- $collection->setConditionFilter($this->getConditionName())
73
- ->setWebsiteFilter($this->getWebsiteId());
74
-
75
- $this->setCollection($collection);
76
-
77
- return Mage_Adminhtml_Block_Widget_Grid::_prepareCollection();
78
- }
79
-
80
- /**
81
- * Website filter
82
- *
83
- * @var int
84
- */
85
- protected $_websiteId;
86
-
87
- /**
88
- * Condition filter
89
- *
90
- * @var string
91
- */
92
- protected $_conditionName;
93
-
94
- /**
95
- * Define grid properties
96
- *
97
- * @return void
98
- */
99
- public function __construct()
100
- {
101
- parent::__construct();
102
- $this->setId('shippingTablerateGrid');
103
- $this->_exportPageSize = 10000;
104
- }
105
-
106
- /**
107
- * Set current website
108
- *
109
- * @param int $websiteId
110
- * @return Mage_Adminhtml_Block_Shipping_Carrier_Tablerate_Grid
111
- */
112
- public function setWebsiteId($websiteId)
113
- {
114
- $this->_websiteId = Mage::app()->getWebsite($websiteId)->getId();
115
- return $this;
116
- }
117
-
118
- /**
119
- * Retrieve current website id
120
- *
121
- * @return int
122
- */
123
- public function getWebsiteId()
124
- {
125
- if (is_null($this->_websiteId)) {
126
- $this->_websiteId = Mage::app()->getWebsite()->getId();
127
- }
128
- return $this->_websiteId;
129
- }
130
-
131
- /**
132
- * Set current website
133
- *
134
- * @param int $websiteId
135
- * @return Mage_Adminhtml_Block_Shipping_Carrier_Tablerate_Grid
136
- */
137
- public function setConditionName($name)
138
- {
139
- $this->_conditionName = $name;
140
- return $this;
141
- }
142
-
143
- /**
144
- * Retrieve current website id
145
- *
146
- * @return int
147
- */
148
- public function getConditionName()
149
- {
150
- return $this->_conditionName;
151
- }
152
-
153
}
1
+ <?php
2
+
3
+
4
+ class Webshopapps_Matrixrate_Block_Adminhtml_Shipping_Carrier_Matrixrate_Grid extends Mage_Adminhtml_Block_Widget_Grid
5
+ {
6
+
7
+ /**
8
+ * Prepare table columns
9
+ *
10
+ * @return Mage_Adminhtml_Block_Widget_Grid
11
+ */
12
+ protected function _prepareColumns()
13
+ {
14
+ $this->addColumn('dest_country', array(
15
+ 'header' => Mage::helper('adminhtml')->__('Country'),
16
+ 'index' => 'dest_country',
17
+ 'default' => '*',
18
+ ));
19
+
20
+ $this->addColumn('dest_region', array(
21
+ 'header' => Mage::helper('adminhtml')->__('Region/State'),
22
+ 'index' => 'dest_region',
23
+ 'default' => '*',
24
+ ));
25
+
26
+ $this->addColumn('dest_city', array(
27
+ 'header' => Mage::helper('adminhtml')->__('City'),
28
+ 'index' => 'dest_city',
29
+ 'default' => '*',
30
+ ));
31
+
32
+ $this->addColumn('dest_zip', array(
33
+ 'header' => Mage::helper('adminhtml')->__('Zip/Postal Code From'),
34
+ 'index' => 'dest_zip',
35
+ ));
36
+
37
+ $this->addColumn('dest_zip_to', array(
38
+ 'header' => Mage::helper('adminhtml')->__('Zip/Postal Code To'),
39
+ 'index' => 'dest_zip_to',
40
+ ));
41
+
42
+
43
+ $label = Mage::getSingleton('matrixrate/carrier_matrixrate')
44
+ ->getCode('condition_name_short', $this->getConditionName());
45
+
46
+ $this->addColumn('condition_from_value', array(
47
+ 'header' => $label.' From',
48
+ 'index' => 'condition_from_value',
49
+ ));
50
+
51
+ $this->addColumn('condition_to_value', array(
52
+ 'header' => $label.' To',
53
+ 'index' => 'condition_to_value',
54
+ ));
55
+
56
+ $this->addColumn('price', array(
57
+ 'header' => Mage::helper('adminhtml')->__('Shipping Price'),
58
+ 'index' => 'price',
59
+ ));
60
+
61
+ $this->addColumn('delivery_type', array(
62
+ 'header' => Mage::helper('adminhtml')->__('Delivery Type'),
63
+ 'index' => 'delivery_type',
64
+ ));
65
+
66
+ return Mage_Adminhtml_Block_Widget_Grid::_prepareColumns();
67
+ }
68
+
69
+ protected function _prepareCollection()
70
+ {
71
+ $collection = Mage::getResourceModel('matrixrate_shipping/carrier_matrixrate_collection');
72
+ $collection->setConditionFilter($this->getConditionName())
73
+ ->setWebsiteFilter($this->getWebsiteId());
74
+
75
+ $this->setCollection($collection);
76
+
77
+ return Mage_Adminhtml_Block_Widget_Grid::_prepareCollection();
78
+ }
79
+
80
+ /**
81
+ * Website filter
82
+ *
83
+ * @var int
84
+ */
85
+ protected $_websiteId;
86
+
87
+ /**
88
+ * Condition filter
89
+ *
90
+ * @var string
91
+ */
92
+ protected $_conditionName;
93
+
94
+ /**
95
+ * Define grid properties
96
+ *
97
+ * @return void
98
+ */
99
+ public function __construct()
100
+ {
101
+ parent::__construct();
102
+ $this->setId('shippingTablerateGrid');
103
+ $this->_exportPageSize = 10000;
104
+ }
105
+
106
+ /**
107
+ * Set current website
108
+ *
109
+ * @param int $websiteId
110
+ * @return Mage_Adminhtml_Block_Shipping_Carrier_Tablerate_Grid
111
+ */
112
+ public function setWebsiteId($websiteId)
113
+ {
114
+ $this->_websiteId = Mage::app()->getWebsite($websiteId)->getId();
115
+ return $this;
116
+ }
117
+
118
+ /**
119
+ * Retrieve current website id
120
+ *
121
+ * @return int
122
+ */
123
+ public function getWebsiteId()
124
+ {
125
+ if (is_null($this->_websiteId)) {
126
+ $this->_websiteId = Mage::app()->getWebsite()->getId();
127
+ }
128
+ return $this->_websiteId;
129
+ }
130
+
131
+ /**
132
+ * Set current website
133
+ *
134
+ * @param int $websiteId
135
+ * @return Mage_Adminhtml_Block_Shipping_Carrier_Tablerate_Grid
136
+ */
137
+ public function setConditionName($name)
138
+ {
139
+ $this->_conditionName = $name;
140
+ return $this;
141
+ }
142
+
143
+ /**
144
+ * Retrieve current website id
145
+ *
146
+ * @return int
147
+ */
148
+ public function getConditionName()
149
+ {
150
+ return $this->_conditionName;
151
+ }
152
+
153
}
app/code/community/Webshopapps/Matrixrate/Block/Adminhtml/System/Config/Form/Field/Exportmatrix.php CHANGED
@@ -1,61 +1,61 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
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
- * DISCLAIMER
16
- *
17
- * Do not edit or add to this file if you wish to upgrade Magento to newer
18
- * versions in the future. If you wish to customize Magento for your
19
- * needs please refer to http://www.magentocommerce.com for more information.
20
- *
21
- * @category Mage
22
- * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
- */
26
-
27
- /**
28
- * Export CSV button for shipping table rates
29
- *
30
- * @category Mage
31
- * @package Mage_Adminhtml
32
- * @author Magento Core Team <core@magentocommerce.com>
33
- */
34
- class Webshopapps_Matrixrate_Block_Adminhtml_System_Config_Form_Field_Exportmatrix extends Mage_Adminhtml_Block_System_Config_Form_Field
35
-
36
- {
37
-
38
- protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
39
- {
40
- $this->setElement($element);
41
-
42
- $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button');
43
-
44
- $params = array(
45
- 'website' => $buttonBlock->getRequest()->getParam('website')
46
- );
47
-
48
- $data = array(
49
- 'label' => Mage::helper('adminhtml')->__('Export CSV'),
50
-
51
- 'onclick' => 'setLocation(\''.Mage::helper('adminhtml')->getUrl("*/*/exportmatrix", $params) . 'conditionName/\' + $(\'carriers_matrixrate_condition_name\').value + \'/matrixrate.csv\' )',
52
- 'class' => '',
53
- );
54
-
55
- $html = $buttonBlock->setData($data)->toHtml();
56
-
57
- return $html;
58
- }
59
-
60
-
61
- }
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
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
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Export CSV button for shipping table rates
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Webshopapps_Matrixrate_Block_Adminhtml_System_Config_Form_Field_Exportmatrix extends Mage_Adminhtml_Block_System_Config_Form_Field
35
+
36
+ {
37
+
38
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
39
+ {
40
+ $this->setElement($element);
41
+
42
+ $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button');
43
+
44
+ $params = array(
45
+ 'website' => $buttonBlock->getRequest()->getParam('website')
46
+ );
47
+
48
+ $data = array(
49
+ 'label' => Mage::helper('adminhtml')->__('Export CSV'),
50
+
51
+ 'onclick' => 'setLocation(\''.Mage::helper('adminhtml')->getUrl("*/*/exportmatrixrate", $params) . 'conditionName/\' + $(\'carriers_matrixrate_condition_name\').value + \'/matrixrate.csv\' )',
52
+ 'class' => '',
53
+ );
54
+
55
+ $html = $buttonBlock->setData($data)->toHtml();
56
+
57
+ return $html;
58
+ }
59
+
60
+
61
+ }
app/code/community/Webshopapps/Matrixrate/Helper/Data.php CHANGED
@@ -1,60 +1,61 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
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
- * DISCLAIMER
16
- *
17
- * Do not edit or add to this file if you wish to upgrade Magento to newer
18
- * versions in the future. If you wish to customize Magento for your
19
- * needs please refer to http://www.magentocommerce.com for more information.
20
- *
21
- * @category Mage
22
- * @package Mage_Shipping
23
- * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
- */
26
- /**
27
- * Webshopapps Shipping Module
28
- *
29
- * NOTICE OF LICENSE
30
- *
31
- * This source file is subject to the Open Software License (OSL 3.0)
32
- * that is bundled with this package in the file LICENSE.txt.
33
- * It is also available through the world-wide-web at this URL:
34
- * http://opensource.org/licenses/osl-3.0.php
35
- * If you did not receive a copy of the license and are unable to
36
- * obtain it through the world-wide-web, please send an email
37
- * to license@magentocommerce.com so we can send you a copy immediately.
38
- *
39
- * DISCLAIMER
40
- *
41
- * Do not edit or add to this file if you wish to upgrade Magento to newer
42
- * versions in the future. If you wish to customize Magento for your
43
- * needs please refer to http://www.magentocommerce.com for more information.
44
- *
45
- * Shipping MatrixRates
46
- *
47
- * @category Webshopapps
48
- * @package Webshopapps_Matrixrate
49
- * @copyright Copyright (c) 2010 Zowta Ltd (http://www.webshopapps.com)
50
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
51
- * @author Karen Baker <sales@webshopapps.com>
52
- */
53
-
54
- /**
55
- * Shipping data helper
56
- */
57
- class Webshopapps_Matrixrate_Helper_Data extends Mage_Core_Helper_Abstract
58
- {
59
-
60
- }
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
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
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Shipping
23
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ /**
27
+ * Webshopapps Shipping Module
28
+ *
29
+ * NOTICE OF LICENSE
30
+ *
31
+ * This source file is subject to the Open Software License (OSL 3.0)
32
+ * that is bundled with this package in the file LICENSE.txt.
33
+ * It is also available through the world-wide-web at this URL:
34
+ * http://opensource.org/licenses/osl-3.0.php
35
+ * If you did not receive a copy of the license and are unable to
36
+ * obtain it through the world-wide-web, please send an email
37
+ * to license@magentocommerce.com so we can send you a copy immediately.
38
+ *
39
+ * DISCLAIMER
40
+ *
41
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
42
+ * versions in the future. If you wish to customize Magento for your
43
+ * needs please refer to http://www.magentocommerce.com for more information.
44
+ *
45
+ * Shipping MatrixRates
46
+ *
47
+ * @category Webshopapps
48
+ * @package Webshopapps_Matrixrate
49
+ * @copyright Copyright (c) 2013 Zowta Ltd (http://www.WebShopApps.com)
50
+ * Copyright, 2013, Zowta, LLC - US license
51
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
52
+ * @author Karen Baker <sales@webshopapps.com>
53
+ */
54
+
55
+ /**
56
+ * Shipping data helper
57
+ */
58
+ class Webshopapps_Matrixrate_Helper_Data extends Mage_Core_Helper_Abstract
59
+ {
60
+
61
+ }
app/code/community/Webshopapps/Matrixrate/Model/Adminhtml/System/Config/Backend/Shipping/Matrixrate.php CHANGED
@@ -22,7 +22,8 @@
22
*
23
* @category Webshopapps
24
* @package Webshopapps_Matrixrate
25
- * @copyright Copyright (c) 2010 Zowta Ltd (http://www.webshopapps.com)
26
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
* @author Karen Baker <sales@webshopapps.com>
28
*/
22
*
23
* @category Webshopapps
24
* @package Webshopapps_Matrixrate
25
+ * @copyright Copyright (c) 2013 Zowta Ltd (http://www.WebShopApps.com)
26
+ * Copyright, 2013, Zowta, LLC - US license
27
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
* @author Karen Baker <sales@webshopapps.com>
29
*/
app/code/community/Webshopapps/Matrixrate/Model/Adminhtml/System/Config/Source/Shipping/Matrixrate.php CHANGED
@@ -22,7 +22,8 @@
22
*
23
* @category Webshopapps
24
* @package Webshopapps_Matrixrate
25
- * @copyright Copyright (c) 2010 Zowta Ltd (http://www.webshopapps.com)
26
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
* @author Karen Baker <sales@webshopapps.com>
28
*/
22
*
23
* @category Webshopapps
24
* @package Webshopapps_Matrixrate
25
+ * @copyright Copyright (c) 2013 Zowta Ltd (http://www.WebShopApps.com)
26
+ * Copyright, 2013, Zowta, LLC - US license
27
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
* @author Karen Baker <sales@webshopapps.com>
29
*/
app/code/community/Webshopapps/Matrixrate/Model/Carrier/Matrixrate.php CHANGED
@@ -22,7 +22,8 @@
22
*
23
* @category Webshopapps
24
* @package Webshopapps_Matrixrate
25
- * @copyright Copyright (c) 2011 Zowta Ltd (http://www.webshopapps.com)
26
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
* @author Karen Baker <sales@webshopapps.com>
28
*/
@@ -111,6 +112,9 @@ class Webshopapps_Matrixrate_Model_Carrier_Matrixrate
111
112
$result = Mage::getModel('shipping/rate_result');
113
$ratearray = $this->getRate($request);
114
115
$freeShipping=false;
116
22
*
23
* @category Webshopapps
24
* @package Webshopapps_Matrixrate
25
+ * @copyright Copyright (c) 2013 Zowta Ltd (http://www.WebShopApps.com)
26
+ * Copyright, 2013, Zowta, LLC - US license
27
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
* @author Karen Baker <sales@webshopapps.com>
29
*/
112
113
$result = Mage::getModel('shipping/rate_result');
114
$ratearray = $this->getRate($request);
115
+
116
+ $request->setPackageWeight($oldWeight);
117
+ $request->setPackageQty($oldQty);
118
119
$freeShipping=false;
120
app/code/community/Webshopapps/Matrixrate/Model/Mysql4/Carrier/Matrixrate.php CHANGED
@@ -1,389 +1,390 @@
1
- <?php
2
- /**
3
- * Webshopapps Shipping Module
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
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
- * DISCLAIMER
16
- *
17
- * Do not edit or add to this file if you wish to upgrade Magento to newer
18
- * versions in the future. If you wish to customize Magento for your
19
- * needs please refer to http://www.magentocommerce.com for more information.
20
- *
21
- * Shipping MatrixRates
22
- *
23
- * @category Webshopapps
24
- * @package Webshopapps_Matrixrate
25
- * @copyright Copyright (c) 2010 Zowta Ltd (http://www.webshopapps.com)
26
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
- * @author Karen Baker <sales@webshopapps.com>
28
- */
29
- class Webshopapps_Matrixrate_Model_Mysql4_Carrier_Matrixrate extends Mage_Core_Model_Mysql4_Abstract
30
- {
31
- protected function _construct()
32
- {
33
- $this->_init('shipping/matrixrate', 'pk');
34
- }
35
-
36
- public function getNewRate(Mage_Shipping_Model_Rate_Request $request,$zipRangeSet=0)
37
- {
38
- $read = $this->_getReadAdapter();
39
- $write = $this->_getWriteAdapter();
40
-
41
- $postcode = $request->getDestPostcode();
42
- $table = Mage::getSingleton('core/resource')->getTableName('matrixrate_shipping/matrixrate');
43
-
44
- if ($zipRangeSet && is_numeric($postcode)) {
45
- # Want to search for postcodes within a range
46
- $zipSearchString = ' AND '.$postcode.' BETWEEN dest_zip AND dest_zip_to )';
47
- } else {
48
- $zipSearchString = $read->quoteInto(" AND ? LIKE dest_zip )", $postcode);
49
- }
50
-
51
- for ($j=0;$j<10;$j++)
52
- {
53
-
54
- $select = $read->select()->from($table);
55
- switch($j) {
56
- case 0:
57
- $select->where(
58
- $read->quoteInto(" (dest_country_id=? ", $request->getDestCountryId()).
59
- $read->quoteInto(" AND dest_region_id=? ", $request->getDestRegionId()).
60
- $read->quoteInto(" AND STRCMP(LOWER(dest_city),LOWER(?)) = 0 ", $request->getDestCity()).
61
- $zipSearchString
62
- );
63
- break;
64
- case 1:
65
- $select->where(
66
- $read->quoteInto(" (dest_country_id=? ", $request->getDestCountryId()).
67
- $read->quoteInto(" AND dest_region_id=? AND dest_city=''", $request->getDestRegionId()).
68
- $zipSearchString
69
- );
70
- break;
71
- case 2:
72
- $select->where(
73
- $read->quoteInto(" (dest_country_id=? ", $request->getDestCountryId()).
74
- $read->quoteInto(" AND dest_region_id=? ", $request->getDestRegionId()).
75
- $read->quoteInto(" AND STRCMP(LOWER(dest_city),LOWER(?)) = 0 AND dest_zip='')", $request->getDestCity())
76
- );
77
- break;
78
- case 3:
79
- $select->where(
80
- $read->quoteInto(" (dest_country_id=? ", $request->getDestCountryId()).
81
- $read->quoteInto(" AND STRCMP(LOWER(dest_city),LOWER(?)) = 0 AND dest_region_id='0'", $request->getDestCity()).
82
- $zipSearchString
83
- );
84
- break;
85
- case 4:
86
- $select->where(
87
- $read->quoteInto(" (dest_country_id=? ", $request->getDestCountryId()).
88
- $read->quoteInto(" AND STRCMP(LOWER(dest_city),LOWER(?)) = 0 AND dest_region_id='0' AND dest_zip='') ", $request->getDestCity())
89
- );
90
- break;
91
- case 5:
92
- $select->where(
93
- $read->quoteInto(" (dest_country_id=? AND dest_region_id='0' AND dest_city='' ", $request->getDestCountryId()).
94
- $zipSearchString
95
- );
96
- break;
97
- case 6:
98
- $select->where(
99
- $read->quoteInto(" (dest_country_id=? ", $request->getDestCountryId()).
100
- $read->quoteInto(" AND dest_region_id=? AND dest_city='' AND dest_zip='') ", $request->getDestRegionId())
101
- );
102
- break;
103
-
104
- case 7:
105
- $select->where(
106
- $read->quoteInto(" (dest_country_id=? AND dest_region_id='0' AND dest_city='' AND dest_zip='') ", $request->getDestCountryId())
107
- );
108
- break;
109
- case 8:
110
- $select->where(
111
- " (dest_country_id='0' AND dest_region_id='0'".
112
- $zipSearchString
113
- );
114
- break;
115
-
116
- case 9:
117
- $select->where(
118
- " (dest_country_id='0' AND dest_region_id='0' AND dest_zip='')"
119
- );
120
- break;
121
- }
122
-
123
-
124
- if (is_array($request->getMRConditionName())) {
125
- $i = 0;
126
- foreach ($request->getMRConditionName() as $conditionName) {
127
- if ($i == 0) {
128
- $select->where('condition_name=?', $conditionName);
129
- } else {
130
- $select->orWhere('condition_name=?', $conditionName);
131
- }
132
- $select->where('condition_from_value<=?', $request->getData($conditionName));
133
-
134
-
135
- $i++;
136
- }
137
- } else {
138
- $select->where('condition_name=?', $request->getMRConditionName());
139
- $select->where('condition_from_value<=?', $request->getData($request->getMRConditionName()));
140
- $select->where('condition_to_value>=?', $request->getData($request->getMRConditionName()));
141
- }
142
-
143
- $select->where('website_id=?', $request->getWebsiteId());
144
-
145
- $select->order('dest_country_id DESC');
146
- $select->order('dest_region_id DESC');
147
- $select->order('dest_zip DESC');
148
- $select->order('condition_from_value DESC');
149
- /*
150
- pdo has an issue. we cannot use bind
151
- */
152
-
153
- $newdata=array();
154
- $row = $read->fetchAll($select);
155
- if (!empty($row))
156
- {
157
- // have found a result or found nothing and at end of list!
158
- foreach ($row as $data) {
159
- $newdata[]=$data;
160
- }
161
- break;
162
- }
163
- }
164
- return $newdata;
165
-
166
- }
167
-
168
- public function uploadAndImport(Varien_Object $object)
169
- {
170
- $csvFile = $_FILES["groups"]["tmp_name"]["matrixrate"]["fields"]["import"]["value"];
171
-
172
- if (!empty($csvFile)) {
173
-
174
- $csv = trim(file_get_contents($csvFile));
175
-
176
- $table = Mage::getSingleton('core/resource')->getTableName('matrixrate_shipping/matrixrate');
177
-
178
- $websiteId = $object->getScopeId();
179
- $websiteModel = Mage::app()->getWebsite($websiteId);
180
- /*
181
- getting condition name from post instead of the following commented logic
182
- */
183
-
184
- if (isset($_POST['groups']['matrixrate']['fields']['condition_name']['inherit'])) {
185
- $conditionName = (string)Mage::getConfig()->getNode('default/carriers/matrixrate/condition_name');
186
- } else {
187
- $conditionName = $_POST['groups']['matrixrate']['fields']['condition_name']['value'];
188
- }
189
-
190
- // $conditionName = $object->getValue();
191
- // if ($conditionName{0} == '_') {
192
- // $conditionName = Mage::helper('core/string')->substr($conditionName, 1, strpos($conditionName, '/')-1);
193
- // } else {
194
- // $conditionName = $websiteModel->getConfig('carriers/matrixrate/condition_name');
195
- // }
196
- $conditionFullName = Mage::getModel('matrixrate_shipping/carrier_matrixrate')->getCode('condition_name_short', $conditionName);
197
- if (!empty($csv)) {
198
- $exceptions = array();
199
- $csvLines = explode("\n", $csv);
200
- $csvLine = array_shift($csvLines);
201
- $csvLine = $this->_getCsvValues($csvLine);
202
- if (count($csvLine) < 7) {
203
- $exceptions[0] = Mage::helper('shipping')->__('Invalid Matrix Rates File Format');
204
- }
205
-
206
- $countryCodes = array();
207
- $regionCodes = array();
208
- foreach ($csvLines as $k=>$csvLine) {
209
- $csvLine = $this->_getCsvValues($csvLine);
210
- if (count($csvLine) > 0 && count($csvLine) < 7) {
211
- $exceptions[0] = Mage::helper('shipping')->__('Invalid Matrix Rates File Format');
212
- } else {
213
- $countryCodes[] = $csvLine[0];
214
- $regionCodes[] = $csvLine[1];
215
- }
216
- }
217
-
218
- if (empty($exceptions)) {
219
- $data = array();
220
- $countryCodesToIds = array();
221
- $regionCodesToIds = array();
222
- $countryCodesIso2 = array();
223
-
224
- $countryCollection = Mage::getResourceModel('directory/country_collection')->addCountryCodeFilter($countryCodes)->load();
225
- foreach ($countryCollection->getItems() as $country) {
226
- $countryCodesToIds[$country->getData('iso3_code')] = $country->getData('country_id');
227
- $countryCodesToIds[$country->getData('iso2_code')] = $country->getData('country_id');
228
- $countryCodesIso2[] = $country->getData('iso2_code');
229
- }
230
-
231
- $regionCollection = Mage::getResourceModel('directory/region_collection')
232
- ->addRegionCodeFilter($regionCodes)
233
- ->addCountryFilter($countryCodesIso2)
234
- ->load();
235
-
236
- foreach ($regionCollection->getItems() as $region) {
237
- $regionCodesToIds[$countryCodesToIds[$region->getData('country_id')]][$region->getData('code')] = $region->getData('region_id');
238
- }
239
-
240
- foreach ($csvLines as $k=>$csvLine) {
241
-
242
- $csvLine = $this->_getCsvValues($csvLine);
243
-
244
- if (empty($countryCodesToIds) || !array_key_exists($csvLine[0], $countryCodesToIds)) {
245
- $countryId = '0';
246
- if ($csvLine[0] != '*' && $csvLine[0] != '') {
247
- $exceptions[] = Mage::helper('shipping')->__('Invalid Country "%s" in the Row #%s', $csvLine[0], ($k+1));
248
- }
249
- } else {
250
- $countryId = $countryCodesToIds[$csvLine[0]];
251
- }
252
-
253
- if (!isset($countryCodesToIds[$csvLine[0]])
254
- || !isset($regionCodesToIds[$countryCodesToIds[$csvLine[0]]])
255
- || !array_key_exists($csvLine[1], $regionCodesToIds[$countryCodesToIds[$csvLine[0]]])) {
256
- $regionId = '0';
257
- if ($csvLine[1] != '*' && $csvLine[1] != '') {
258
- $exceptions[] = Mage::helper('shipping')->__('Invalid Region/State "%s" in the Row #%s', $csvLine[1], ($k+1));
259
- }
260
- } else {
261
- $regionId = $regionCodesToIds[$countryCodesToIds[$csvLine[0]]][$csvLine[1]];
262
- }
263
-
264
- if (count($csvLine)==9) {
265
- // we are searching for postcodes in ranges & including cities
266
- if ($csvLine[2] == '*' || $csvLine[2] == '') {
267
- $city = '';
268
- } else {
269
- $city = $csvLine[2];
270
- }
271
-
272
-
273
- if ($csvLine[3] == '*' || $csvLine[3] == '') {
274
- $zip = '';
275
- } else {
276
- $zip = $csvLine[3];
277
- }
278
-
279
-
280
- if ($csvLine[4] == '*' || $csvLine[4] == '') {
281
- $zip_to = '';
282
- } else {
283
- $zip_to = $csvLine[4];
284
- }
285
-
286
-
287
- if (!$this->_isPositiveDecimalNumber($csvLine[5]) || $csvLine[5] == '*' || $csvLine[5] == '') {
288
- $exceptions[] = Mage::helper('shipping')->__('Invalid %s From "%s" in the Row #%s', $conditionFullName, $csvLine[5], ($k+1));
289
- } else {
290
- $csvLine[5] = (float)$csvLine[5];
291
- }
292
-
293
- if (!$this->_isPositiveDecimalNumber($csvLine[6])) {
294
- $exceptions[] = Mage::helper('shipping')->__('Invalid %s To "%s" in the Row #%s', $conditionFullName, $csvLine[6], ($k+1));
295
- } else {
296
- $csvLine[6] = (float)$csvLine[6];
297
- }
298
-
299
-
300
- $data[] = array('website_id'=>$websiteId, 'dest_country_id'=>$countryId, 'dest_region_id'=>$regionId, 'dest_city'=>$city, 'dest_zip'=>$zip, 'dest_zip_to'=>$zip_to, 'condition_name'=>$conditionName, 'condition_from_value'=>$csvLine[5],'condition_to_value'=>$csvLine[6], 'price'=>$csvLine[7], 'delivery_type'=>$csvLine[8]);
301
-
302
- }
303
- else {
304
-
305
- if ($csvLine[2] == '*' || $csvLine[2] == '') {
306
- $zip = '';
307
- } else {
308
- $zip = $csvLine[2]."%";
309
- }
310
-
311
- $city='';
312
- $zip_to = '';
313
-
314
- if (!$this->_isPositiveDecimalNumber($csvLine[3]) || $csvLine[3] == '*' || $csvLine[3] == '') {
315
- $exceptions[] = Mage::helper('shipping')->__('Invalid %s From "%s" in the Row #%s', $conditionFullName, $csvLine[3], ($k+1));
316
- } else {
317
- $csvLine[3] = (float)$csvLine[3];
318
- }
319
-
320
- if (!$this->_isPositiveDecimalNumber($csvLine[4])) {
321
- $exceptions[] = Mage::helper('shipping')->__('Invalid %s To "%s" in the Row #%s', $conditionFullName, $csvLine[4], ($k+1));
322
- } else {
323
- $csvLine[4] = (float)$csvLine[4];
324
- }
325
- $data[] = array('website_id'=>$websiteId, 'dest_country_id'=>$countryId, 'dest_region_id'=>$regionId, 'dest_city'=>$city,'dest_zip'=>$zip,'dest_zip_to'=>$zip_to, 'condition_name'=>$conditionName, 'condition_from_value'=>$csvLine[3],'condition_to_value'=>$csvLine[4], 'price'=>$csvLine[5], 'delivery_type'=>$csvLine[6]);
326
- }
327
-
328
-
329
- $dataDetails[] = array('country'=>$csvLine[0], 'region'=>$csvLine[1]);
330
-
331
- }
332
- }
333
- if (empty($exceptions)) {
334
- $connection = $this->_getWriteAdapter();
335
-
336
-
337
- $condition = array(
338
- $connection->quoteInto('website_id = ?', $websiteId),
339
- $connection->quoteInto('condition_name = ?', $conditionName),
340
- );
341
- $connection->delete($table, $condition);
342
-
343
- foreach($data as $k=>$dataLine) {
344
- try {
345
- $connection->insert($table, $dataLine);
346
- } catch (Exception $e) {
347
- $exceptions[] = Mage::helper('shipping')->__('Duplicate Row #%s (Country "%s", Region/State "%s", City "%s", Zip From "%s", Zip To "%s", Delivery Type "%s", Value From "%s" and Value To "%s")', ($k+1), $dataDetails[$k]['country'], $dataDetails[$k]['region'], $dataLine['dest_city'], $dataLine['dest_zip'], $dataLine['dest_zip_to'], $dataLine['delivery_type'], $dataLine['condition_from_value'], $dataLine['condition_to_value']);
348
- }
349
- }
350
- }
351
- if (!empty($exceptions)) {
352
- throw new Exception( "\n" . implode("\n", $exceptions) );
353
- }
354
- }
355
- }
356
- }
357
-
358
- private function _getCsvValues($string, $separator=",")
359
- {
360
- $elements = explode($separator, trim($string));
361
- for ($i = 0; $i < count($elements); $i++) {
362
- $nquotes = substr_count($elements[$i], '"');
363
- if ($nquotes %2 == 1) {
364
- for ($j = $i+1; $j < count($elements); $j++) {
365
- if (substr_count($elements[$j], '"') > 0) {
366
- // Put the quoted string's pieces back together again
367
- array_splice($elements, $i, $j-$i+1, implode($separator, array_slice($elements, $i, $j-$i+1)));
368
- break;
369
- }
370
- }
371
- }
372
- if ($nquotes > 0) {
373
- // Remove first and last quotes, then merge pairs of quotes
374
- $qstr =& $elements[$i];
375
- $qstr = substr_replace($qstr, '', strpos($qstr, '"'), 1);
376
- $qstr = substr_replace($qstr, '', strrpos($qstr, '"'), 1);
377
- $qstr = str_replace('""', '"', $qstr);
378
- }
379
- $elements[$i] = trim($elements[$i]);
380
- }
381
- return $elements;
382
- }
383
-
384
- private function _isPositiveDecimalNumber($n)
385
- {
386
- return preg_match ("/^[0-9]+(\.[0-9]*)?#x2F;", $n);
387
- }
388
-
389
- }
1
+ <?php
2
+ /**
3
+ * Webshopapps Shipping Module
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
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
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * Shipping MatrixRates
22
+ *
23
+ * @category Webshopapps
24
+ * @package Webshopapps_Matrixrate
25
+ * @copyright Copyright (c) 2013 Zowta Ltd (http://www.WebShopApps.com)
26
+ * Copyright, 2013, Zowta, LLC - US license
27
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
+ * @author Karen Baker <sales@webshopapps.com>
29
+ */
30
+ class Webshopapps_Matrixrate_Model_Mysql4_Carrier_Matrixrate extends Mage_Core_Model_Mysql4_Abstract
31
+ {
32
+ protected function _construct()
33
+ {
34
+ $this->_init('shipping/matrixrate', 'pk');
35
+ }
36
+
37
+ public function getNewRate(Mage_Shipping_Model_Rate_Request $request,$zipRangeSet=0)
38
+ {
39
+ $read = $this->_getReadAdapter();
40
+ $write = $this->_getWriteAdapter();
41
+
42
+ $postcode = $request->getDestPostcode();
43
+ $table = Mage::getSingleton('core/resource')->getTableName('matrixrate_shipping/matrixrate');
44
+
45
+ if ($zipRangeSet && is_numeric($postcode)) {
46
+ # Want to search for postcodes within a range
47
+ $zipSearchString = ' AND '.$postcode.' BETWEEN dest_zip AND dest_zip_to )';
48
+ } else {
49
+ $zipSearchString = $read->quoteInto(" AND ? LIKE dest_zip )", $postcode);
50
+ }
51
+
52
+ for ($j=0;$j<10;$j++)
53
+ {
54
+
55
+ $select = $read->select()->from($table);
56
+ switch($j) {
57
+ case 0:
58
+ $select->where(
59
+ $read->quoteInto(" (dest_country_id=? ", $request->getDestCountryId()).
60
+ $read->quoteInto(" AND dest_region_id=? ", $request->getDestRegionId()).
61
+ $read->quoteInto(" AND STRCMP(LOWER(dest_city),LOWER(?)) = 0 ", $request->getDestCity()).
62
+ $zipSearchString
63
+ );
64
+ break;
65
+ case 1:
66
+ $select->where(
67
+ $read->quoteInto(" (dest_country_id=? ", $request->getDestCountryId()).
68
+ $read->quoteInto(" AND dest_region_id=? AND dest_city=''", $request->getDestRegionId()).
69
+ $zipSearchString
70
+ );
71
+ break;
72
+ case 2:
73
+ $select->where(
74
+ $read->quoteInto(" (dest_country_id=? ", $request->getDestCountryId()).
75
+ $read->quoteInto(" AND dest_region_id=? ", $request->getDestRegionId()).
76
+ $read->quoteInto(" AND STRCMP(LOWER(dest_city),LOWER(?)) = 0 AND dest_zip='')", $request->getDestCity())
77
+ );
78
+ break;
79
+ case 3:
80
+ $select->where(
81
+ $read->quoteInto(" (dest_country_id=? ", $request->getDestCountryId()).
82
+ $read->quoteInto(" AND STRCMP(LOWER(dest_city),LOWER(?)) = 0 AND dest_region_id='0'", $request->getDestCity()).
83
+ $zipSearchString
84
+ );
85
+ break;
86
+ case 4:
87
+ $select->where(
88
+ $read->quoteInto(" (dest_country_id=? ", $request->getDestCountryId()).
89
+ $read->quoteInto(" AND STRCMP(LOWER(dest_city),LOWER(?)) = 0 AND dest_region_id='0' AND dest_zip='') ", $request->getDestCity())
90
+ );
91
+ break;
92
+ case 5:
93
+ $select->where(
94
+ $read->quoteInto(" (dest_country_id=? AND dest_region_id='0' AND dest_city='' ", $request->getDestCountryId()).
95
+ $zipSearchString
96
+ );
97
+ break;
98
+ case 6:
99
+ $select->where(
100
+ $read->quoteInto(" (dest_country_id=? ", $request->getDestCountryId()).
101
+ $read->quoteInto(" AND dest_region_id=? AND dest_city='' AND dest_zip='') ", $request->getDestRegionId())
102
+ );
103
+ break;
104
+
105
+ case 7:
106
+ $select->where(
107
+ $read->quoteInto(" (dest_country_id=? AND dest_region_id='0' AND dest_city='' AND dest_zip='') ", $request->getDestCountryId())
108
+ );
109
+ break;
110
+ case 8:
111
+ $select->where(
112
+ " (dest_country_id='0' AND dest_region_id='0'".
113
+ $zipSearchString
114
+ );
115
+ break;
116
+
117
+ case 9:
118
+ $select->where(
119
+ " (dest_country_id='0' AND dest_region_id='0' AND dest_zip='')"
120
+ );
121
+ break;
122
+ }
123
+
124
+
125
+ if (is_array($request->getMRConditionName())) {
126
+ $i = 0;
127
+ foreach ($request->getMRConditionName() as $conditionName) {
128
+ if ($i == 0) {
129
+ $select->where('condition_name=?', $conditionName);
130
+ } else {
131
+ $select->orWhere('condition_name=?', $conditionName);
132
+ }
133
+ $select->where('condition_from_value<=?', $request->getData($conditionName));
134
+
135
+
136
+ $i++;
137
+ }
138
+ } else {
139
+ $select->where('condition_name=?', $request->getMRConditionName());
140
+ $select->where('condition_from_value<=?', $request->getData($request->getMRConditionName()));
141
+ $select->where('condition_to_value>=?', $request->getData($request->getMRConditionName()));
142
+ }
143
+
144
+ $select->where('website_id=?', $request->getWebsiteId());
145
+
146
+ $select->order('dest_country_id DESC');
147
+ $select->order('dest_region_id DESC');
148
+ $select->order('dest_zip DESC');
149
+ $select->order('condition_from_value DESC');
150
+ /*
151
+ pdo has an issue. we cannot use bind
152
+ */
153
+
154
+ $newdata=array();
155
+ $row = $read->fetchAll($select);
156
+ if (!empty($row))
157
+ {
158
+ // have found a result or found nothing and at end of list!
159
+ foreach ($row as $data) {
160
+ $newdata[]=$data;
161
+ }
162
+ break;
163
+ }
164
+ }
165
+ return $newdata;
166
+
167
+ }
168
+
169
+ public function uploadAndImport(Varien_Object $object)
170
+ {
171
+ $csvFile = $_FILES["groups"]["tmp_name"]["matrixrate"]["fields"]["import"]["value"];
172
+
173
+ if (!empty($csvFile)) {
174
+
175
+ $csv = trim(file_get_contents($csvFile));
176
+
177
+ $table = Mage::getSingleton('core/resource')->getTableName('matrixrate_shipping/matrixrate');
178
+
179
+ $websiteId = $object->getScopeId();
180
+ $websiteModel = Mage::app()->getWebsite($websiteId);
181
+ /*
182
+ getting condition name from post instead of the following commented logic
183
+ */
184
+
185
+ if (isset($_POST['groups']['matrixrate']['fields']['condition_name']['inherit'])) {
186
+ $conditionName = (string)Mage::getConfig()->getNode('default/carriers/matrixrate/condition_name');
187
+ } else {
188
+ $conditionName = $_POST['groups']['matrixrate']['fields']['condition_name']['value'];
189
+ }
190
+
191
+ // $conditionName = $object->getValue();
192
+ // if ($conditionName{0} == '_') {
193
+ // $conditionName = Mage::helper('core/string')->substr($conditionName, 1, strpos($conditionName, '/')-1);
194
+ // } else {
195
+ // $conditionName = $websiteModel->getConfig('carriers/matrixrate/condition_name');
196
+ // }
197
+ $conditionFullName = Mage::getModel('matrixrate_shipping/carrier_matrixrate')->getCode('condition_name_short', $conditionName);
198
+ if (!empty($csv)) {
199
+ $exceptions = array();
200
+ $csvLines = explode("\n", $csv);
201
+ $csvLine = array_shift($csvLines);
202
+ $csvLine = $this->_getCsvValues($csvLine);
203
+ if (count($csvLine) < 7) {
204
+ $exceptions[0] = Mage::helper('shipping')->__('Invalid Matrix Rates File Format');
205
+ }
206
+
207
+ $countryCodes = array();
208
+ $regionCodes = array();
209
+ foreach ($csvLines as $k=>$csvLine) {
210
+ $csvLine = $this->_getCsvValues($csvLine);
211
+ if (count($csvLine) > 0 && count($csvLine) < 7) {
212
+ $exceptions[0] = Mage::helper('shipping')->__('Invalid Matrix Rates File Format');
213
+ } else {
214
+ $countryCodes[] = $csvLine[0];
215
+ $regionCodes[] = $csvLine[1];
216
+ }
217
+ }
218
+
219
+ if (empty($exceptions)) {
220
+ $data = array();
221
+ $countryCodesToIds = array();
222
+ $regionCodesToIds = array();
223
+ $countryCodesIso2 = array();
224
+
225
+ $countryCollection = Mage::getResourceModel('directory/country_collection')->addCountryCodeFilter($countryCodes)->load();
226
+ foreach ($countryCollection->getItems() as $country) {
227
+ $countryCodesToIds[$country->getData('iso3_code')] = $country->getData('country_id');
228
+ $countryCodesToIds[$country->getData('iso2_code')] = $country->getData('country_id');
229
+ $countryCodesIso2[] = $country->getData('iso2_code');
230
+ }
231
+
232
+ $regionCollection = Mage::getResourceModel('directory/region_collection')
233
+ ->addRegionCodeFilter($regionCodes)
234
+ ->addCountryFilter($countryCodesIso2)
235
+ ->load();
236
+
237
+ foreach ($regionCollection->getItems() as $region) {
238
+ $regionCodesToIds[$countryCodesToIds[$region->getData('country_id')]][$region->getData('code')] = $region->getData('region_id');
239
+ }
240
+
241
+ foreach ($csvLines as $k=>$csvLine) {
242
+
243
+ $csvLine = $this->_getCsvValues($csvLine);
244
+
245
+ if (empty($countryCodesToIds) || !array_key_exists($csvLine[0], $countryCodesToIds)) {
246
+ $countryId = '0';
247
+ if ($csvLine[0] != '*' && $csvLine[0] != '') {
248
+ $exceptions[] = Mage::helper('shipping')->__('Invalid Country "%s" in the Row #%s', $csvLine[0], ($k+1));
249
+ }
250
+ } else {
251
+ $countryId = $countryCodesToIds[$csvLine[0]];
252
+ }
253
+
254
+ if (!isset($countryCodesToIds[$csvLine[0]])
255
+ || !isset($regionCodesToIds[$countryCodesToIds[$csvLine[0]]])
256
+ || !array_key_exists($csvLine[1], $regionCodesToIds[$countryCodesToIds[$csvLine[0]]])) {
257
+ $regionId = '0';
258
+ if ($csvLine[1] != '*' && $csvLine[1] != '') {
259
+ $exceptions[] = Mage::helper('shipping')->__('Invalid Region/State "%s" in the Row #%s', $csvLine[1], ($k+1));
260
+ }
261
+ } else {
262
+ $regionId = $regionCodesToIds[$countryCodesToIds[$csvLine[0]]][$csvLine[1]];
263
+ }
264
+
265
+ if (count($csvLine)==9) {
266
+ // we are searching for postcodes in ranges & including cities
267
+ if ($csvLine[2] == '*' || $csvLine[2] == '') {
268
+ $city = '';
269
+ } else {
270
+ $city = $csvLine[2];
271
+ }
272
+
273
+
274
+ if ($csvLine[3] == '*' || $csvLine[3] == '') {
275
+ $zip = '';
276
+ } else {
277
+ $zip = $csvLine[3];
278
+ }
279
+
280
+
281
+ if ($csvLine[4] == '*' || $csvLine[4] == '') {
282
+ $zip_to = '';
283
+ } else {
284
+ $zip_to = $csvLine[4];
285
+ }
286
+
287
+
288
+ if (!$this->_isPositiveDecimalNumber($csvLine[5]) || $csvLine[5] == '*' || $csvLine[5] == '') {
289
+ $exceptions[] = Mage::helper('shipping')->__('Invalid %s From "%s" in the Row #%s', $conditionFullName, $csvLine[5], ($k+1));
290
+ } else {
291
+ $csvLine[5] = (float)$csvLine[5];
292
+ }
293
+
294
+ if (!$this->_isPositiveDecimalNumber($csvLine[6])) {
295
+ $exceptions[] = Mage::helper('shipping')->__('Invalid %s To "%s" in the Row #%s', $conditionFullName, $csvLine[6], ($k+1));
296
+ } else {
297
+ $csvLine[6] = (float)$csvLine[6];
298
+ }
299
+
300
+
301
+ $data[] = array('website_id'=>$websiteId, 'dest_country_id'=>$countryId, 'dest_region_id'=>$regionId, 'dest_city'=>$city, 'dest_zip'=>$zip, 'dest_zip_to'=>$zip_to, 'condition_name'=>$conditionName, 'condition_from_value'=>$csvLine[5],'condition_to_value'=>$csvLine[6], 'price'=>$csvLine[7], 'delivery_type'=>$csvLine[8]);
302
+
303
+ }
304
+ else {
305
+
306
+ if ($csvLine[2] == '*' || $csvLine[2] == '') {
307
+ $zip = '';
308
+ } else {
309
+ $zip = $csvLine[2]."%";
310
+ }
311
+
312
+ $city='';
313
+ $zip_to = '';
314
+
315
+ if (!$this->_isPositiveDecimalNumber($csvLine[3]) || $csvLine[3] == '*' || $csvLine[3] == '') {
316
+ $exceptions[] = Mage::helper('shipping')->__('Invalid %s From "%s" in the Row #%s', $conditionFullName, $csvLine[3], ($k+1));
317
+ } else {
318
+ $csvLine[3] = (float)$csvLine[3];
319
+ }
320
+
321
+ if (!$this->_isPositiveDecimalNumber($csvLine[4])) {
322
+ $exceptions[] = Mage::helper('shipping')->__('Invalid %s To "%s" in the Row #%s', $conditionFullName, $csvLine[4], ($k+1));
323
+ } else {
324
+ $csvLine[4] = (float)$csvLine[4];
325
+ }
326
+ $data[] = array('website_id'=>$websiteId, 'dest_country_id'=>$countryId, 'dest_region_id'=>$regionId, 'dest_city'=>$city,'dest_zip'=>$zip,'dest_zip_to'=>$zip_to, 'condition_name'=>$conditionName, 'condition_from_value'=>$csvLine[3],'condition_to_value'=>$csvLine[4], 'price'=>$csvLine[5], 'delivery_type'=>$csvLine[6]);
327
+ }
328
+
329
+
330
+ $dataDetails[] = array('country'=>$csvLine[0], 'region'=>$csvLine[1]);
331
+
332
+ }
333
+ }
334
+ if (empty($exceptions)) {
335
+ $connection = $this->_getWriteAdapter();
336
+
337
+
338
+ $condition = array(
339
+ $connection->quoteInto('website_id = ?', $websiteId),
340
+ $connection->quoteInto('condition_name = ?', $conditionName),
341
+ );
342
+ $connection->delete($table, $condition);
343
+
344
+ foreach($data as $k=>$dataLine) {
345
+ try {
346
+ $connection->insert($table, $dataLine);
347
+ } catch (Exception $e) {
348
+ $exceptions[] = Mage::helper('shipping')->__('Duplicate Row #%s (Country "%s", Region/State "%s", City "%s", Zip From "%s", Zip To "%s", Delivery Type "%s", Value From "%s" and Value To "%s")', ($k+1), $dataDetails[$k]['country'], $dataDetails[$k]['region'], $dataLine['dest_city'], $dataLine['dest_zip'], $dataLine['dest_zip_to'], $dataLine['delivery_type'], $dataLine['condition_from_value'], $dataLine['condition_to_value']);
349
+ }
350
+ }
351
+ }
352
+ if (!empty($exceptions)) {
353
+ throw new Exception( "\n" . implode("\n", $exceptions) );
354
+ }
355
+ }
356
+ }
357
+ }
358
+
359
+ private function _getCsvValues($string, $separator=",")
360
+ {
361
+ $elements = explode($separator, trim($string));
362
+ for ($i = 0; $i < count($elements); $i++) {
363
+ $nquotes = substr_count($elements[$i], '"');
364
+ if ($nquotes %2 == 1) {
365
+ for ($j = $i+1; $j < count($elements); $j++) {
366
+ if (substr_count($elements[$j], '"') > 0) {
367
+ // Put the quoted string's pieces back together again
368
+ array_splice($elements, $i, $j-$i+1, implode($separator, array_slice($elements, $i, $j-$i+1)));
369
+ break;
370
+ }
371
+ }
372
+ }
373
+ if ($nquotes > 0) {
374
+ // Remove first and last quotes, then merge pairs of quotes
375
+ $qstr =& $elements[$i];
376
+ $qstr = substr_replace($qstr, '', strpos($qstr, '"'), 1);
377
+ $qstr = substr_replace($qstr, '', strrpos($qstr, '"'), 1);
378
+ $qstr = str_replace('""', '"', $qstr);
379
+ }
380
+ $elements[$i] = trim($elements[$i]);
381
+ }
382
+ return $elements;
383
+ }
384
+
385
+ private function _isPositiveDecimalNumber($n)
386
+ {
387
+ return preg_match ("/^[0-9]+(\.[0-9]*)?#x2F;", $n);
388
+ }
389
+
390
+ }
app/code/community/Webshopapps/Matrixrate/Model/Mysql4/Carrier/Matrixrate/Collection.php CHANGED
@@ -22,7 +22,8 @@
22
*
23
* @category Webshopapps
24
* @package Webshopapps_Matrixrate
25
- * @copyright Copyright (c) 2010 Zowta Ltd (http://www.webshopapps.com)
26
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
* @author Karen Baker <sales@webshopapps.com>
28
*/
22
*
23
* @category Webshopapps
24
* @package Webshopapps_Matrixrate
25
+ * @copyright Copyright (c) 2013 Zowta Ltd (http://www.WebShopApps.com)
26
+ * Copyright, 2013, Zowta, LLC - US license
27
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
* @author Karen Baker <sales@webshopapps.com>
29
*/
app/code/community/Webshopapps/Matrixrate/changelog.txt CHANGED
@@ -1,3 +1,5 @@
1
- 5.0 Ammended numeric zip-from/to search to use ints and BETWEEN logic
2
- Changed free shipping logic to allow items to be included in calculations even if marked as free shipping
3
- Changed setconditionname to stop conflict with tablerates
1
+ 5.0 Ammended numeric zip-from/to search to use ints and BETWEEN logic
2
+ Changed free shipping logic to allow items to be included in calculations even if marked as free shipping
3
+ Changed setconditionname to stop conflict with tablerates5.0.3 - COMMON-38 Fixed issue with wrong CSV exporting when MatrixRate is installed
4
+ 5.1 - COMMON-48 Resolved issue with exporting after applying Magento patch SUPEE-6285
5
+ 5.1.1 - Removed Logger
app/code/community/Webshopapps/Matrixrate/controllers/System/ConfigController.php CHANGED
@@ -1,59 +1,64 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
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
- * DISCLAIMER
16
- *
17
- * Do not edit or add to this file if you wish to upgrade Magento to newer
18
- * versions in the future. If you wish to customize Magento for your
19
- * needs please refer to http://www.magentocommerce.com for more information.
20
- *
21
- * @category Mage
22
- * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
- */
26
-
27
-
28
- /**
29
- * config controller
30
- *
31
- * @category Mage
32
- * @package Mage_Adminhtml
33
- * @author Magento Core Team <core@magentocommerce.com>
34
- */
35
- class Webshopapps_Matrixrate_System_ConfigController extends Mage_Adminhtml_Controller_Action
36
- {
37
-
38
-
39
- /**
40
- * Export shipping table rates in csv format
41
- *
42
- */
43
- public function exportmatrixAction()
44
- {
45
- $fileName = 'matrixrates.csv';
46
- /** @var $gridBlock Mage_Adminhtml_Block_Shipping_Carrier_Tablerate_Grid */
47
- $gridBlock = $this->getLayout()->createBlock('matrixrate_adminhtml/shipping_carrier_matrixrate_grid');
48
- $website = Mage::app()->getWebsite($this->getRequest()->getParam('website'));
49
- if ($this->getRequest()->getParam('conditionName')) {
50
- $conditionName = $this->getRequest()->getParam('conditionName');
51
- } else {
52
- $conditionName = $website->getConfig('carriers/matrixrate/condition_name');
53
- }
54
- $gridBlock->setWebsiteId($website->getId())->setConditionName($conditionName);
55
- $content = $gridBlock->getCsvFile();
56
- $this->_prepareDownloadResponse($fileName, $content);
57
- }
58
-
59
}
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
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
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+
28
+ /**
29
+ * config controller
30
+ *
31
+ * @category Mage
32
+ * @package Mage_Adminhtml
33
+ * @author Magento Core Team <core@magentocommerce.com>
34
+ */
35
+ class Webshopapps_Matrixrate_System_ConfigController extends Mage_Adminhtml_Controller_Action
36
+ {
37
+
38
+
39
+ /**
40
+ * Export shipping table rates in csv format
41
+ *
42
+ */
43
+ public function exportmatrixrateAction()
44
+ {
45
+ $fileName = 'matrixrates.csv';
46
+ /** @var $gridBlock Mage_Adminhtml_Block_Shipping_Carrier_Tablerate_Grid */
47
+ $gridBlock = $this->getLayout()->createBlock('matrixrate_adminhtml/shipping_carrier_matrixrate_grid');
48
+ $website = Mage::app()->getWebsite($this->getRequest()->getParam('website'));
49
+ if ($this->getRequest()->getParam('conditionName')) {
50
+ $conditionName = $this->getRequest()->getParam('conditionName');
51
+ } else {
52
+ $conditionName = $website->getConfig('carriers/matrixrate/condition_name');
53
+ }
54
+ $gridBlock->setWebsiteId($website->getId())->setConditionName($conditionName);
55
+ $content = $gridBlock->getCsvFile();
56
+ $this->_prepareDownloadResponse($fileName, $content);
57
+ }
58
+
59
+ protected function _isAllowed()
60
+ {
61
+ return true;
62
+ }
63
+
64
}
app/code/community/Webshopapps/Matrixrate/etc/config.xml CHANGED
@@ -23,7 +23,8 @@
23
*
24
* @category Webshopapps
25
* @package Webshopapps_Matrixrate
26
- * @copyright Copyright (c) 2010 Zowta Ltd (http://www.webshopapps.com)
27
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
* @author Karen Baker <sales@webshopapps.com>
29
*/
23
*
24
* @category Webshopapps
25
* @package Webshopapps_Matrixrate
26
+ * @copyright Copyright (c) 2013 Zowta Ltd (http://www.WebShopApps.com)
27
+ * Copyright, 2013, Zowta, LLC - US license
28
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
29
* @author Karen Baker <sales@webshopapps.com>
30
*/
app/code/community/Webshopapps/Matrixrate/etc/system.xml CHANGED
@@ -23,7 +23,8 @@
23
*
24
* @category Webshopapps
25
* @package Webshopapps_Matrixrate
26
- * @copyright Copyright (c) 2010 Zowta Ltd (http://www.webshopapps.com)
27
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
* @author Karen Baker <sales@webshopapps.com>
29
*/
@@ -44,8 +45,8 @@
44
<![CDATA[
45
<div style="padding:10px;background-color:#fff;border:1px solid #ddd;margin-bottom:7px;">
46
This module was developed by <a href="http://www.webshopapps.com" target="_blank">www.WebShopApps.com</a> - <b>Magento Shipping Extension Specialists</b>.
47
- <br/>For docs & examples refer to the WebShopApps <a href="https://sites.google.com/a/webshopapps.com/webshopapps-wiki/extensions/matrix-rates">wiki</a>.
48
- <br/>We offer <a href="http://webshopapps.com/shipping-extensions/most-popular/premium-matrixrate-shipping-extension.html" target="_blank">Premium Matrixrate</a> for our commercial users, masses of features to reduce maintenance time.
49
<br/>We have the largest selections of <a href="http://www.webshopapps.com" target="_blank">shipping extensions</a> on Magento.</a>
50
</div>
51
]]>
23
*
24
* @category Webshopapps
25
* @package Webshopapps_Matrixrate
26
+ * @copyright Copyright (c) 2013 Zowta Ltd (http://www.WebShopApps.com)
27
+ * Copyright, 2013, Zowta, LLC - US license
28
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
29
* @author Karen Baker <sales@webshopapps.com>
30
*/
45
<![CDATA[
46
<div style="padding:10px;background-color:#fff;border:1px solid #ddd;margin-bottom:7px;">
47
This module was developed by <a href="http://www.webshopapps.com" target="_blank">www.WebShopApps.com</a> - <b>Magento Shipping Extension Specialists</b>.
48
+ <br/>For docs & examples refer to the WebShopApps <a href="http://support.webshopapps.com/matrixrate/">knowledge base</a>.
49
+ <br/>We offer <a href="http://www.webshopapps.com/premium-matrixrate-shipping-extension.html" target="_blank">Premium Matrixrate</a> for our commercial users, masses of features to reduce maintenance time. Please use this 20% discount when upgrading to the <a href="http://www.webshopapps.com/premium-matrixrate-shipping-extension.html" target="_blank">Premium Matrixrate</a> extension <b>20PREMMXQBX</b>
50
<br/>We have the largest selections of <a href="http://www.webshopapps.com" target="_blank">shipping extensions</a> on Magento.</a>
51
</div>
52
]]>
app/locale/en_US/Auctionmaid_Matrixrate.csv ADDED
@@ -0,0 +1,15 @@
1
+ "Calculate Handling Fee","Calculate Handling Fee"
2
+ "Handling Fee","Handling Fee"
3
+ "Enabled","Enabled"
4
+ "Maximum Shipping Cost","Maximum Shipping Cost"
5
+ "Use Zipcode To/From Range","Use Zipcode To/From Range"
6
+ "Import","Import"
7
+ "Free Shipping Text","Free Shipping Text"
8
+ "Sort order","Sort order"
9
+ "Title","Title"
10
+ "Method name","Method name"
11
+ "Ship to applicable countries","Ship to applicable countries"
12
+ "Ship to Specific countries","Ship to Specific countries"
13
+ "Show method if not applicable","Show method if not applicable"
14
+ "Displayed Error Message","Displayed Error Message"
15
+ "Shipping Option","Shipping Option"
package.xml CHANGED
@@ -1,9 +1,9 @@
1
<?xml version="1.0"?>
2
<package>
3
<name>Auctionmaid_Matrxrate</name>
4
- <version>5.0.1</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>
8
<extends/>
9
<summary>Multiple Table Rates via CSV. Filter by country, region,city, zipcode. Numeric Postcode ranges, and enhanced pattern matching supported. Ability to exclude items from free shipping, and specify collection only.</summary>
@@ -15,12 +15,12 @@
15
- numerical postcode ranges&#xD;
16
- option to exclude items from free shipping&#xD;
17
- collection only option</description>
18
- <notes>Minor changes to postcode filtering.&#xD;
19
- Added extra options around free shipping.</notes>
20
<authors><author><name>Karen Baker</name><user>birches</user><email>sales@webshopapps.com</email></author></authors>
21
- <date>2011-09-27</date>
22
- <time>21:52:27</time>
23
- <contents><target name="magecommunity"><dir name="Webshopapps"><dir name="Matrixrate"><dir name="Block"><dir name="Adminhtml"><dir name="Shipping"><dir name="Carrier"><dir name="Matrixrate"><file name="Grid.php" hash="791db18cd9af2d9df91a5a70eb272611"/></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Exportmatrix.php" hash="4ed1f6634f15727205da4e479e84bd91"/></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="97307283fd4c85ed72a699ab4be68661"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Shipping"><file name="Matrixrate.php" hash="d8b6999f8ad837a232ece7a69bc5893f"/></dir></dir><dir name="Source"><dir name="Shipping"><file name="Matrixrate.php" hash="f2914f0d8d36206646e7551ad69736fa"/></dir></dir></dir></dir></dir><dir name="Carrier"><file name="Matrixrate.php" hash="fcbcecf2ab5e39fa1236e2ea0286547d"/></dir><dir name="Mysql4"><dir name="Carrier"><dir name="Matrixrate"><file name="Collection.php" hash="7a4c5d64156700dc82799c5828e4f65c"/></dir><file name="Matrixrate.php" hash="6815bcddf029de5a1871b0baa4e2b19c"/></dir></dir></dir><file name="changelog.txt" hash="7fd8a2c21b764027cef340103ca450be"/><dir name="controllers"><dir name="System"><file name="ConfigController.php" hash="5ee3cdd9ea3277607d7a17c327acc9e2"/></dir></dir><dir name="etc"><file name="config.xml" hash="e55ee4a9369ae362599e5c848e76f99a"/><file name="system.xml" hash="f1d6839b3929fa0cfacecfaa7f5b6ad5"/></dir><dir name="sql"><dir name="matrixrate_setup"><file name="mysql4-install-2.0.1.php" hash="52a413f99ce3d571a067cdfb677bbf32"/><file name="mysql4-install-2.0.2.php" hash="b6530f7e95e610db357ed46bc23629b9"/><file name="mysql4-upgrade-2.0.1-2.0.2.php" hash="b6530f7e95e610db357ed46bc23629b9"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Webshopapps_Matrixrate.xml" hash="ac8b13f26402b2f0e7f6b22c3430fec8"/></dir></target></contents>
24
<compatible/>
25
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
26
</package>
1
<?xml version="1.0"?>
2
<package>
3
<name>Auctionmaid_Matrxrate</name>
4
+ <version>5.1.1</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>
8
<extends/>
9
<summary>Multiple Table Rates via CSV. Filter by country, region,city, zipcode. Numeric Postcode ranges, and enhanced pattern matching supported. Ability to exclude items from free shipping, and specify collection only.</summary>
15
- numerical postcode ranges&#xD;
16
- option to exclude items from free shipping&#xD;
17
- collection only option</description>
18
+ <notes>Resolved issue with exporting after applying Magento patch SUPEE-6285.&#xD;
19
+ Removed Logger.</notes>
20
<authors><author><name>Karen Baker</name><user>birches</user><email>sales@webshopapps.com</email></author></authors>
21
+ <date>2016-09-05</date>
22
+ <time>13:55:19</time>
23
+ <contents><target name="magecommunity"><dir name="Webshopapps"><dir name="Adminshortcut"><dir name="Helper"><file name="Data.php" hash="e0b3d57fb624622b400e601f2229e991"/></dir><file name="changelog.txt" hash="0716b4fd8f070dd826fa9ccd4577bc2c"/><dir name="etc"><file name="adminhtml.xml" hash="80b231894e0108aa914715da3b42bf5e"/><file name="config.xml" hash="4222cc2209d41b89d24f47f7b7342bb7"/></dir></dir><dir name="Matrixrate"><dir name="Block"><dir name="Adminhtml"><dir name="Shipping"><dir name="Carrier"><dir name="Matrixrate"><file name="Grid.php" hash="fd4e12b07959a1b5d688d36654d92d97"/></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Exportmatrix.php" hash="2b7303c9c6e341f111cea18f70df6e1a"/></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="13bd97df1c6b7608186dde469f0b5403"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Shipping"><file name="Matrixrate.php" hash="e5d05f6942c1706e1bd9dcb1eeedfc38"/></dir></dir><dir name="Source"><dir name="Shipping"><file name="Matrixrate.php" hash="30289deea24070033c6961f91f811d30"/></dir></dir></dir></dir></dir><dir name="Carrier"><file name="Matrixrate.php" hash="a378fa7478f64962b285ce0e457066cf"/></dir><dir name="Mysql4"><dir name="Carrier"><dir name="Matrixrate"><file name="Collection.php" hash="42c755376dce39c8b1a2e31ab4426105"/></dir><file name="Matrixrate.php" hash="5904bde74963adc5bc09f60e66392075"/></dir></dir></dir><file name="changelog.txt" hash="d22505abe3abc6e87b2d92909419cc22"/><dir name="controllers"><dir name="System"><file name="ConfigController.php" hash="c4707dae6400f08dbd99e6f30c3bf943"/></dir></dir><dir name="etc"><file name="config.xml" hash="5298441fbabd4d7fa5a60ad6bf7c560c"/><file name="system.xml" hash="ca06f9f7f1b40f522be54b736291bcc7"/></dir><dir name="sql"><dir name="matrixrate_setup"><file name="mysql4-install-2.0.1.php" hash="52a413f99ce3d571a067cdfb677bbf32"/><file name="mysql4-install-2.0.2.php" hash="b6530f7e95e610db357ed46bc23629b9"/><file name="mysql4-upgrade-2.0.1-2.0.2.php" hash="b6530f7e95e610db357ed46bc23629b9"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Webshopapps_Matrixrate.xml" hash="ac8b13f26402b2f0e7f6b22c3430fec8"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Auctionmaid_Matrixrate.csv" hash="4ea4e748fd3601f2535825790a89d52f"/></dir></target></contents>
24
<compatible/>
25
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
26
</package>