Version Notes
Fadello
Download this release
Release Info
Developer | Magmodules |
Extension | Magmodules_Fadello |
Version | 1.0.2 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 1.0.2
- app/code/community/Magmodules/Fadello/Block/Adminhtml/Config/Form/Field/Availability.php +58 -40
- app/code/community/Magmodules/Fadello/Block/Adminhtml/Config/Form/Field/Shipping.php +50 -37
- app/code/community/Magmodules/Fadello/Block/Adminhtml/Config/Form/Renderer/Select.php +132 -122
- app/code/community/Magmodules/Fadello/Block/Adminhtml/Renderer/Shipment.php +69 -38
- app/code/community/Magmodules/Fadello/Block/Adminhtml/System/Config/Form/Field/Heading.php +18 -11
- app/code/community/Magmodules/Fadello/Block/Adminhtml/System/Config/Form/Field/Note.php +19 -12
- app/code/community/Magmodules/Fadello/Block/Adminhtml/System/Config/Form/Field/Version.php +16 -10
- app/code/community/Magmodules/Fadello/Helper/Data.php +139 -84
- app/code/community/Magmodules/Fadello/Model/Adminhtml/System/Config/Backend/Design/Availability.php +57 -35
- app/code/community/Magmodules/Fadello/Model/Adminhtml/System/Config/Backend/Design/Shipping.php +58 -36
- app/code/community/Magmodules/Fadello/Model/Adminhtml/System/Config/Source/Days.php +23 -20
- app/code/community/Magmodules/Fadello/Model/Api.php +359 -327
- app/code/community/Magmodules/Fadello/Model/Carrier/ShippingMethod.php +148 -56
- app/code/community/Magmodules/Fadello/Model/Observer.php +41 -47
- app/code/community/Magmodules/Fadello/controllers/Adminhtml/FadelloController.php +110 -92
- app/code/community/Magmodules/Fadello/etc/adminhtml.xml +20 -23
- app/code/community/Magmodules/Fadello/etc/config.xml +88 -98
- app/code/community/Magmodules/Fadello/etc/system.xml +122 -115
- app/code/community/Magmodules/Fadello/sql/fadello_setup/mysql4-install-0.9.0.php +55 -45
- app/design/frontend/base/default/layout/magmodules_fadello.xml +28 -7
- app/etc/modules/Magmodules_Fadello.xml +19 -21
- app/locale/en_US/Magmodules_Fadello.csv +1 -2
- app/locale/nl_NL/Magmodules_Fadello.csv +2 -2
- package.xml +4 -4
- skin/frontend/base/default/magmodules/fadello/style.css +19 -16
app/code/community/Magmodules/Fadello/Block/Adminhtml/Config/Form/Field/Availability.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
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:
|
@@ -12,59 +11,78 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
|
22 |
-
class Magmodules_Fadello_Block_Adminhtml_Config_Form_Field_Availability
|
|
|
|
|
23 |
|
24 |
-
|
25 |
|
26 |
-
|
27 |
-
|
|
|
|
|
|
|
28 |
$layout = Mage::app()->getFrontController()->getAction()->getLayout();
|
29 |
-
$
|
30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
-
$this->addColumn(
|
33 |
-
'
|
34 |
-
'style' => 'width:100px',
|
35 |
-
'renderer' => $renderer_days
|
36 |
-
));
|
37 |
-
|
38 |
-
$this->addColumn('from', array(
|
39 |
'label' => Mage::helper('fadello')->__('From'),
|
40 |
-
'style' => 'width:40px',
|
41 |
-
|
|
|
42 |
|
43 |
-
$this->addColumn(
|
|
|
44 |
'label' => Mage::helper('fadello')->__('To'),
|
45 |
-
'style' => 'width:40px',
|
46 |
-
|
47 |
-
|
48 |
-
|
|
|
|
|
49 |
'label' => Mage::helper('fadello')->__('Title'),
|
50 |
-
'style' => 'width:100px',
|
51 |
-
|
|
|
|
|
|
|
52 |
|
53 |
-
$this->_renders['day'] = $renderer_days;
|
54 |
-
|
55 |
$this->_addAfter = false;
|
56 |
$this->_addButtonLabel = Mage::helper('fadello')->__('Add Option');
|
57 |
parent::__construct();
|
58 |
}
|
59 |
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
|
|
|
|
|
|
69 |
|
70 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Fadello
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
|
21 |
+
class Magmodules_Fadello_Block_Adminhtml_Config_Form_Field_Availability
|
22 |
+
extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
|
23 |
+
{
|
24 |
|
25 |
+
protected $_renders = array();
|
26 |
|
27 |
+
/**
|
28 |
+
* Magmodules_Fadello_Block_Adminhtml_Config_Form_Field_Availability constructor.
|
29 |
+
*/
|
30 |
+
public function __construct()
|
31 |
+
{
|
32 |
$layout = Mage::app()->getFrontController()->getAction()->getLayout();
|
33 |
+
$rendererDays = $layout->createBlock(
|
34 |
+
'fadello/adminhtml_config_form_renderer_select', '',
|
35 |
+
array('is_render_to_js_template' => true)
|
36 |
+
);
|
37 |
+
$rendererDays->setOptions(Mage::getModel('fadello/adminhtml_system_config_source_days')->toOptionArray());
|
38 |
+
|
39 |
+
$this->addColumn(
|
40 |
+
'day', array(
|
41 |
+
'label' => Mage::helper('fadello')->__('Day'),
|
42 |
+
'style' => 'width:100px',
|
43 |
+
'renderer' => $rendererDays
|
44 |
+
)
|
45 |
+
);
|
46 |
|
47 |
+
$this->addColumn(
|
48 |
+
'from', array(
|
|
|
|
|
|
|
|
|
|
|
49 |
'label' => Mage::helper('fadello')->__('From'),
|
50 |
+
'style' => 'width:40px',
|
51 |
+
)
|
52 |
+
);
|
53 |
|
54 |
+
$this->addColumn(
|
55 |
+
'to', array(
|
56 |
'label' => Mage::helper('fadello')->__('To'),
|
57 |
+
'style' => 'width:40px',
|
58 |
+
)
|
59 |
+
);
|
60 |
+
|
61 |
+
$this->addColumn(
|
62 |
+
'title', array(
|
63 |
'label' => Mage::helper('fadello')->__('Title'),
|
64 |
+
'style' => 'width:100px',
|
65 |
+
)
|
66 |
+
);
|
67 |
+
|
68 |
+
$this->_renders['day'] = $rendererDays;
|
69 |
|
|
|
|
|
70 |
$this->_addAfter = false;
|
71 |
$this->_addButtonLabel = Mage::helper('fadello')->__('Add Option');
|
72 |
parent::__construct();
|
73 |
}
|
74 |
|
75 |
+
/**
|
76 |
+
* @param Varien_Object $row
|
77 |
+
*/
|
78 |
+
protected function _prepareArrayRow(Varien_Object $row)
|
79 |
+
{
|
80 |
+
foreach ($this->_renders as $key => $render) {
|
81 |
+
$row->setData(
|
82 |
+
'option_extra_attr_' . $render->calcOptionHash($row->getData($key)),
|
83 |
+
'selected="selected"'
|
84 |
+
);
|
85 |
+
}
|
86 |
+
}
|
87 |
|
88 |
}
|
app/code/community/Magmodules/Fadello/Block/Adminhtml/Config/Form/Field/Shipping.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
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:
|
@@ -12,47 +11,61 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
|
22 |
-
class Magmodules_Fadello_Block_Adminhtml_Config_Form_Field_Shipping
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
$this->addColumn(
|
34 |
-
'
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
$this->_addAfter = false;
|
44 |
$this->_addButtonLabel = Mage::helper('fadello')->__('Add Option');
|
45 |
parent::__construct();
|
46 |
}
|
47 |
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
|
|
|
|
|
|
57 |
|
58 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Fadello
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
|
21 |
+
class Magmodules_Fadello_Block_Adminhtml_Config_Form_Field_Shipping
|
22 |
+
extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
|
23 |
+
{
|
24 |
+
|
25 |
+
protected $_renders = array();
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Magmodules_Fadello_Block_Adminhtml_Config_Form_Field_Shipping constructor.
|
29 |
+
*/
|
30 |
+
public function __construct()
|
31 |
+
{
|
32 |
+
$this->addColumn(
|
33 |
+
'from', array(
|
34 |
+
'label' => Mage::helper('fadello')->__('From Price'),
|
35 |
+
'style' => 'width:50px',
|
36 |
+
)
|
37 |
+
);
|
38 |
+
|
39 |
+
$this->addColumn(
|
40 |
+
'to', array(
|
41 |
+
'label' => Mage::helper('fadello')->__('To Price'),
|
42 |
+
'style' => 'width:50px',
|
43 |
+
)
|
44 |
+
);
|
45 |
+
|
46 |
+
$this->addColumn(
|
47 |
+
'cost', array(
|
48 |
+
'label' => Mage::helper('fadello')->__('Cost'),
|
49 |
+
'style' => 'width:50px',
|
50 |
+
)
|
51 |
+
);
|
52 |
+
|
53 |
$this->_addAfter = false;
|
54 |
$this->_addButtonLabel = Mage::helper('fadello')->__('Add Option');
|
55 |
parent::__construct();
|
56 |
}
|
57 |
|
58 |
+
/**
|
59 |
+
* @param Varien_Object $row
|
60 |
+
*/
|
61 |
+
protected function _prepareArrayRow(Varien_Object $row)
|
62 |
+
{
|
63 |
+
foreach ($this->_renders as $key => $render) {
|
64 |
+
$row->setData(
|
65 |
+
'option_extra_attr_' . $render->calcOptionHash($row->getData($key)),
|
66 |
+
'selected="selected"'
|
67 |
+
);
|
68 |
+
}
|
69 |
+
}
|
70 |
|
71 |
}
|
app/code/community/Magmodules/Fadello/Block/Adminhtml/Config/Form/Renderer/Select.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
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:
|
@@ -12,98 +11,101 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
|
22 |
-
class Magmodules_Fadello_Block_Adminhtml_Config_Form_Renderer_Select extends Mage_Core_Block_Html_Select
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
|
|
|
|
31 |
return $this;
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
|
|
49 |
return $this;
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
return $this;
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
if(!$this->_beforeToHtml()) {
|
99 |
return '';
|
100 |
}
|
101 |
|
102 |
-
$html = '<select name="'
|
103 |
-
|
104 |
$values = $this->getValue();
|
105 |
|
106 |
-
if (!is_array($values)){
|
107 |
if (!is_null($values)) {
|
108 |
$values = array($values);
|
109 |
} else {
|
@@ -112,11 +114,11 @@ class Magmodules_Fadello_Block_Adminhtml_Config_Form_Renderer_Select extends Mag
|
|
112 |
}
|
113 |
|
114 |
$isArrayOption = true;
|
115 |
-
|
116 |
-
|
117 |
-
if($isArrayOption && is_array($option)) {
|
118 |
-
$value
|
119 |
-
$label
|
120 |
$params = (!empty($option['params'])) ? $option['params'] : array();
|
121 |
} else {
|
122 |
$value = $key;
|
@@ -125,42 +127,47 @@ class Magmodules_Fadello_Block_Adminhtml_Config_Form_Renderer_Select extends Mag
|
|
125 |
$params = array();
|
126 |
}
|
127 |
|
128 |
-
if(is_array($value)) {
|
129 |
-
$html.= '<optgroup label="'
|
130 |
-
foreach($value as $keyGroup => $optionGroup) {
|
131 |
-
if(!is_array($optionGroup)) {
|
132 |
$optionGroup = array(
|
133 |
'value' => $keyGroup,
|
134 |
'label' => $optionGroup
|
135 |
);
|
136 |
}
|
137 |
-
|
|
|
138 |
$optionGroup,
|
139 |
in_array($optionGroup['value'], $values)
|
140 |
);
|
141 |
}
|
142 |
-
|
|
|
143 |
} else {
|
144 |
-
$html.= $this->_optionToHtml(
|
145 |
-
|
146 |
-
'
|
|
|
147 |
'params' => $params
|
148 |
-
|
149 |
in_array($value, $values)
|
150 |
);
|
151 |
}
|
152 |
}
|
153 |
-
|
|
|
154 |
return $html;
|
155 |
}
|
156 |
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
|
|
164 |
$selectedHtml = $selected ? ' selected="selected"' : '';
|
165 |
if ($this->getIsRenderToJsTemplate() === true) {
|
166 |
$selectedHtml .= ' #{option_extra_attr_' . self::calcOptionHash($option['value']) . '}';
|
@@ -179,28 +186,31 @@ class Magmodules_Fadello_Block_Adminhtml_Config_Form_Renderer_Select extends Mag
|
|
179 |
}
|
180 |
}
|
181 |
|
182 |
-
return sprintf(
|
183 |
-
|
|
|
184 |
$selectedHtml,
|
185 |
$params,
|
186 |
-
$this->
|
|
|
187 |
}
|
188 |
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
return $this->toHtml();
|
195 |
}
|
196 |
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
|
|
203 |
return sprintf('%u', crc32($this->getColumnName() . $this->getInputName() . $optionValue));
|
204 |
}
|
205 |
-
|
206 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Fadello
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
|
21 |
+
class Magmodules_Fadello_Block_Adminhtml_Config_Form_Renderer_Select extends Mage_Core_Block_Html_Select
|
22 |
+
{
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @param $inputName
|
26 |
+
*
|
27 |
+
* @return $this
|
28 |
+
*/
|
29 |
+
public function setInputName($inputName)
|
30 |
+
{
|
31 |
+
$this->setData('inputname', $inputName);
|
32 |
return $this;
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* @return mixed
|
37 |
+
*/
|
38 |
+
public function getInputName()
|
39 |
+
{
|
40 |
+
return $this->getData('inputname');
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* @param $columnName
|
45 |
+
*
|
46 |
+
* @return $this
|
47 |
+
*/
|
48 |
+
public function setColumnName($columnName)
|
49 |
+
{
|
50 |
+
$this->setData('columnname', $columnName);
|
51 |
return $this;
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* @return mixed
|
56 |
+
*/
|
57 |
+
public function getColumnName()
|
58 |
+
{
|
59 |
+
return $this->getData('columnname');
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* @param $column
|
64 |
+
*
|
65 |
+
* @return $this
|
66 |
+
*/
|
67 |
+
public function setColumn($column)
|
68 |
+
{
|
69 |
+
$this->setData('column', $column);
|
70 |
return $this;
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* @return mixed
|
75 |
+
*/
|
76 |
+
public function getColumn()
|
77 |
+
{
|
78 |
+
return $this->getData('column');
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* @return string
|
83 |
+
*/
|
84 |
+
public function getExtraParams()
|
85 |
+
{
|
86 |
+
$column = $this->getColumn();
|
87 |
+
if ($column && isset($column['style'])) {
|
88 |
+
return ' style="' . $column['style'] . '" ';
|
89 |
+
} else {
|
90 |
+
return '';
|
91 |
+
}
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* @return string
|
96 |
+
*/
|
97 |
+
protected function _toHtml()
|
98 |
+
{
|
99 |
+
|
100 |
+
if (!$this->_beforeToHtml()) {
|
101 |
return '';
|
102 |
}
|
103 |
|
104 |
+
$html = '<select name="' . $this->getInputName() . '" class="' . $this->getClass() . '" ' . $this->getExtraParams() . '>';
|
105 |
+
|
106 |
$values = $this->getValue();
|
107 |
|
108 |
+
if (!is_array($values)) {
|
109 |
if (!is_null($values)) {
|
110 |
$values = array($values);
|
111 |
} else {
|
114 |
}
|
115 |
|
116 |
$isArrayOption = true;
|
117 |
+
|
118 |
+
foreach ($this->getOptions() as $key => $option) {
|
119 |
+
if ($isArrayOption && is_array($option)) {
|
120 |
+
$value = $option['value'];
|
121 |
+
$label = $option['label'];
|
122 |
$params = (!empty($option['params'])) ? $option['params'] : array();
|
123 |
} else {
|
124 |
$value = $key;
|
127 |
$params = array();
|
128 |
}
|
129 |
|
130 |
+
if (is_array($value)) {
|
131 |
+
$html .= '<optgroup label="' . $label . '">';
|
132 |
+
foreach ($value as $keyGroup => $optionGroup) {
|
133 |
+
if (!is_array($optionGroup)) {
|
134 |
$optionGroup = array(
|
135 |
'value' => $keyGroup,
|
136 |
'label' => $optionGroup
|
137 |
);
|
138 |
}
|
139 |
+
|
140 |
+
$html .= $this->_optionToHtml(
|
141 |
$optionGroup,
|
142 |
in_array($optionGroup['value'], $values)
|
143 |
);
|
144 |
}
|
145 |
+
|
146 |
+
$html .= '</optgroup>';
|
147 |
} else {
|
148 |
+
$html .= $this->_optionToHtml(
|
149 |
+
array(
|
150 |
+
'value' => $value,
|
151 |
+
'label' => $label,
|
152 |
'params' => $params
|
153 |
+
),
|
154 |
in_array($value, $values)
|
155 |
);
|
156 |
}
|
157 |
}
|
158 |
+
|
159 |
+
$html .= '</select>';
|
160 |
return $html;
|
161 |
}
|
162 |
|
163 |
+
/**
|
164 |
+
* @param array $option
|
165 |
+
* @param bool $selected
|
166 |
+
*
|
167 |
+
* @return string
|
168 |
+
*/
|
169 |
+
protected function _optionToHtml($option, $selected = false)
|
170 |
+
{
|
171 |
$selectedHtml = $selected ? ' selected="selected"' : '';
|
172 |
if ($this->getIsRenderToJsTemplate() === true) {
|
173 |
$selectedHtml .= ' #{option_extra_attr_' . self::calcOptionHash($option['value']) . '}';
|
186 |
}
|
187 |
}
|
188 |
|
189 |
+
return sprintf(
|
190 |
+
'<option value="%s" %s %s>%s</option>',
|
191 |
+
$this->escapeHtml($option['value']),
|
192 |
$selectedHtml,
|
193 |
$params,
|
194 |
+
$this->escapeHtml($option['label'])
|
195 |
+
);
|
196 |
}
|
197 |
|
198 |
+
/**
|
199 |
+
* @return string
|
200 |
+
*/
|
201 |
+
public function getHtml()
|
202 |
+
{
|
203 |
return $this->toHtml();
|
204 |
}
|
205 |
|
206 |
+
/**
|
207 |
+
* @param string $optionValue
|
208 |
+
*
|
209 |
+
* @return string
|
210 |
+
*/
|
211 |
+
public function calcOptionHash($optionValue)
|
212 |
+
{
|
213 |
return sprintf('%u', crc32($this->getColumnName() . $this->getInputName() . $optionValue));
|
214 |
}
|
215 |
+
|
216 |
}
|
app/code/community/Magmodules/Fadello/Block/Adminhtml/Renderer/Shipment.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
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:
|
@@ -12,43 +11,75 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
|
22 |
-
class Magmodules_Fadello_Block_Adminhtml_Renderer_Shipment
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
|
54 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Fadello
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
|
21 |
+
class Magmodules_Fadello_Block_Adminhtml_Renderer_Shipment
|
22 |
+
extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
|
23 |
+
{
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @param Varien_Object $row
|
27 |
+
*
|
28 |
+
* @return string
|
29 |
+
*/
|
30 |
+
public function render(Varien_Object $row)
|
31 |
+
{
|
32 |
+
$html = '';
|
33 |
+
|
34 |
+
$orderId = $row->getEntityId();
|
35 |
+
$status = $row->getFadelloStatus();
|
36 |
+
|
37 |
+
$showAllShipments = Mage::getStoreConfig('shipping/fadello/show_all_shipments');
|
38 |
+
if (!$showAllShipments) {
|
39 |
+
if ($row->getShippingMethod() != 'fadello_fadello') {
|
40 |
+
return $html;
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
// Cancel Shipment
|
45 |
+
$cUrl = $this->getUrl('*/fadello/cancelShipment', array('order_id' => $orderId));
|
46 |
+
$cMsg = $this->__('Cancel this Fadello Shipment');
|
47 |
+
$cImg = $this->getSkinUrl('images/fadello/close.png');
|
48 |
+
|
49 |
+
// Open PDF
|
50 |
+
$pUrl = $this->getUrl('*/fadello/getPdf', array('order_id' => $orderId));
|
51 |
+
$pMsg = $this->__('Open PDF');
|
52 |
+
$pImg = $this->getSkinUrl('images/fadello/pdf.png');
|
53 |
+
|
54 |
+
// Ship Order
|
55 |
+
$sUrl = $this->getUrl('*/fadello/shipOrder', array('order_id' => $orderId));
|
56 |
+
$sMsg = $this->__('Ship This Order');
|
57 |
+
$sImg = $this->getSkinUrl('images/fadello/export.png');
|
58 |
+
|
59 |
+
// Ship Order
|
60 |
+
$csUrl = $this->getUrl('*/fadello/createShipment', array('order_id' => $orderId));
|
61 |
+
$csMsg = $this->__('Create Shipmentr');
|
62 |
+
$csImg = $this->getSkinUrl('images/fadello/ship.png');
|
63 |
+
|
64 |
+
if (!empty($status)) {
|
65 |
+
if ($status == 'created') {
|
66 |
+
$html .= '<a href="' . $cUrl . '"><img title="' . $cMsg . '" src="' . $cImg . '"></a>';
|
67 |
+
$html .= ' ';
|
68 |
+
$html .= '<a href="' . $pUrl . '"><img title="' . $pMsg . '" src="' . $pImg . '"></a>';
|
69 |
+
$html .= ' ';
|
70 |
+
$html .= '<a href="' . $sUrl . '"><img title="' . $sMsg . '" src="' . $sImg . '"></a>';
|
71 |
+
}
|
72 |
+
|
73 |
+
if ($status == 'shipped') {
|
74 |
+
$html .= '<a href="' . $cUrl . '"><img title="' . $cMsg . '" src="' . $cImg . '"></a>';
|
75 |
+
$html .= ' ';
|
76 |
+
$html .= '<a href="' . $pUrl . '"><img title="' . $pMsg . '" src="' . $pImg . '"></a>';
|
77 |
+
}
|
78 |
+
} else {
|
79 |
+
$html .= '<a href="' . $csUrl . '"><img title="' . $csMsg . '" src="' . $csImg . '"></a>';
|
80 |
+
}
|
81 |
+
|
82 |
+
return $html;
|
83 |
+
}
|
84 |
|
85 |
}
|
app/code/community/Magmodules/Fadello/Block/Adminhtml/System/Config/Form/Field/Heading.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
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:
|
@@ -12,21 +11,29 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
|
22 |
-
class Magmodules_Fadello_Block_Adminhtml_System_Config_Form_Field_Heading
|
|
|
|
|
23 |
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
25 |
{
|
26 |
$useContainerId = $element->getData('use_container_id');
|
27 |
-
return sprintf(
|
|
|
28 |
$element->getHtmlId(), $element->getLabel()
|
29 |
);
|
30 |
}
|
31 |
-
|
32 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Fadello
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
|
21 |
+
class Magmodules_Fadello_Block_Adminhtml_System_Config_Form_Field_Heading
|
22 |
+
extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface
|
23 |
+
{
|
24 |
|
25 |
+
/**
|
26 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
27 |
+
*
|
28 |
+
* @return string
|
29 |
+
*/
|
30 |
+
public function render(Varien_Data_Form_Element_Abstract $element)
|
31 |
{
|
32 |
$useContainerId = $element->getData('use_container_id');
|
33 |
+
return sprintf(
|
34 |
+
'<tr class="system-fieldset-sub-head" id="row_%s"><td colspan="5"><h4>%s</h4></td></tr>',
|
35 |
$element->getHtmlId(), $element->getLabel()
|
36 |
);
|
37 |
}
|
38 |
+
|
39 |
}
|
app/code/community/Magmodules/Fadello/Block/Adminhtml/System/Config/Form/Field/Note.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
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:
|
@@ -12,21 +11,29 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Fadello_Block_Adminhtml_System_Config_Form_Field_Note extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface {
|
23 |
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
{
|
26 |
$useContainerId = $element->getData('use_container_id');
|
27 |
-
return sprintf(
|
|
|
28 |
$element->getHtmlId(), $element->getLabel()
|
29 |
);
|
30 |
}
|
31 |
-
|
32 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Fadello
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
|
|
|
|
20 |
|
21 |
+
class Magmodules_Fadello_Block_Adminhtml_System_Config_Form_Field_Note
|
22 |
+
extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface
|
23 |
+
{
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
27 |
+
*
|
28 |
+
* @return string
|
29 |
+
*/
|
30 |
+
public function render(Varien_Data_Form_Element_Abstract $element)
|
31 |
{
|
32 |
$useContainerId = $element->getData('use_container_id');
|
33 |
+
return sprintf(
|
34 |
+
'<tr id="row_%s"><td colspan="5" class="label" style="margin-bottom: 10px;">%s</td></tr>',
|
35 |
$element->getHtmlId(), $element->getLabel()
|
36 |
);
|
37 |
}
|
38 |
+
|
39 |
}
|
app/code/community/Magmodules/Fadello/Block/Adminhtml/System/Config/Form/Field/Version.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
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:
|
@@ -12,18 +11,25 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
|
22 |
-
class Magmodules_Fadello_Block_Adminhtml_System_Config_Form_Field_Version
|
|
|
|
|
23 |
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
25 |
{
|
26 |
return Mage::getConfig()->getNode()->modules->Magmodules_Fadello->version;
|
27 |
}
|
28 |
-
|
29 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Fadello
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
|
21 |
+
class Magmodules_Fadello_Block_Adminhtml_System_Config_Form_Field_Version
|
22 |
+
extends Mage_Adminhtml_Block_System_Config_Form_Field
|
23 |
+
{
|
24 |
|
25 |
+
/**
|
26 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
27 |
+
*
|
28 |
+
* @return mixed
|
29 |
+
*/
|
30 |
+
public function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
31 |
{
|
32 |
return Mage::getConfig()->getNode()->modules->Magmodules_Fadello->version;
|
33 |
}
|
34 |
+
|
35 |
}
|
app/code/community/Magmodules/Fadello/Helper/Data.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
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:
|
@@ -12,93 +11,149 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Fadello_Helper_Data extends Mage_Core_Helper_Abstract {
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
|
28 |
-
|
29 |
-
|
30 |
-
$date = $this->getDate($after_cutoff, $cutoff);
|
31 |
-
|
32 |
-
$api['api_id'] = Mage::getStoreConfig('shipping/fadello/api_id', $storeId);
|
33 |
-
$api['api_token'] = Mage::getStoreConfig('shipping/fadello/api_token', $storeId);
|
34 |
-
$api['cutoff_time'] = $cutoff;
|
35 |
-
$api['pickup_time'] = str_replace(' ', '', Mage::getStoreConfig('shipping/fadello/pickup_time', $storeId));
|
36 |
-
$api['del_time'] = str_replace(' ', '', Mage::getStoreConfig('shipping/fadello/delivery_time', $storeId));
|
37 |
-
$api['pu_date'] = $date;
|
38 |
-
$api['del_date'] = $date;
|
39 |
-
$api['url_params'] = 'apiID=' . $api['api_id'] . '&apitoken=' . $api['api_token'];
|
40 |
-
$api['url'] = 'https://api.fadello.nl/desktopmodules/fadello_retailAPI/API/v1/';
|
41 |
-
$api['ship_type'] = 'DC';
|
42 |
-
$api['label'] = 'PDF';
|
43 |
-
if($detailed) {
|
44 |
-
$api['pu_name'] = Mage::getStoreConfig('shipping/fadello/pu_name', $storeId);
|
45 |
-
$api['pu_street'] = Mage::getStoreConfig('shipping/fadello/pu_street', $storeId);
|
46 |
-
$api['pu_homeno'] = Mage::getStoreConfig('shipping/fadello/pu_homeno', $storeId);
|
47 |
-
$api['pu_homeno_add'] = Mage::getStoreConfig('shipping/fadello/pu_homeno_add', $storeId);
|
48 |
-
$api['pu_postalcode'] = Mage::getStoreConfig('shipping/fadello/pu_postalcode', $storeId);
|
49 |
-
$api['pu_city'] = Mage::getStoreConfig('shipping/fadello/pu_city', $storeId);
|
50 |
-
$api['pu_country'] = Mage::getStoreConfig('shipping/fadello/pu_country', $storeId);
|
51 |
-
$api['pu_phone'] = preg_replace("/[^0-9]/", "", Mage::getStoreConfig('shipping/fadello/pu_phone', $storeId));
|
52 |
-
$api['pu_email'] = Mage::getStoreConfig('shipping/fadello/pu_email', $storeId);
|
53 |
-
$api['homeno'] = Mage::getStoreConfig('shipping/fadello/seperate_homenumber', $storeId);
|
54 |
-
}
|
55 |
-
if(!empty($api['api_id']) && !empty($api['api_token'])) {
|
56 |
-
return $api;
|
57 |
-
}
|
58 |
-
}
|
59 |
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
}
|
78 |
|
79 |
-
|
80 |
-
|
81 |
-
$today = Mage::getModel('core/date')->date('d-m-Y');
|
82 |
-
$tomorrow = Mage::getModel('core/date')->date("d-m-Y", time() + 86400);
|
83 |
-
if($after_cutoff) {
|
84 |
-
$time = Mage::getModel('core/date')->date('Hi');
|
85 |
-
$cutoff = (str_replace(':', '', $cutoff) + 100);
|
86 |
-
if($time > $cutoff) {
|
87 |
-
return $tomorrow;
|
88 |
-
}
|
89 |
-
}
|
90 |
-
return $today;
|
91 |
-
}
|
92 |
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
|
104 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Fadello
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
|
|
|
|
20 |
|
21 |
+
class Magmodules_Fadello_Helper_Data extends Mage_Core_Helper_Abstract
|
22 |
+
{
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @param int $storeId
|
26 |
+
* @param int $detailed
|
27 |
+
*
|
28 |
+
* @return array|bool
|
29 |
+
*/
|
30 |
+
public function getConfig($storeId = 0, $detailed = 0)
|
31 |
+
{
|
32 |
+
$api = array();
|
33 |
+
|
34 |
+
$afterCutoff = Mage::getStoreConfig('shipping/fadello/pu_name', $storeId);
|
35 |
+
$cutoff = str_replace(' ', '', Mage::getStoreConfig('shipping/fadello/cutoff_time', $storeId));
|
36 |
+
$date = $this->getDate($afterCutoff, $cutoff);
|
37 |
+
|
38 |
+
$api['api_id'] = Mage::getStoreConfig('shipping/fadello/api_id', $storeId);
|
39 |
+
$api['api_token'] = Mage::getStoreConfig('shipping/fadello/api_token', $storeId);
|
40 |
+
$api['cutoff_time'] = $cutoff;
|
41 |
+
$api['pickup_time'] = str_replace(' ', '', Mage::getStoreConfig('shipping/fadello/pickup_time', $storeId));
|
42 |
+
$api['del_time'] = str_replace(' ', '', Mage::getStoreConfig('shipping/fadello/delivery_time', $storeId));
|
43 |
+
$api['pu_date'] = $date;
|
44 |
+
$api['del_date'] = $date;
|
45 |
+
$api['url_params'] = 'apiID=' . $api['api_id'] . '&apitoken=' . $api['api_token'];
|
46 |
+
$api['url'] = 'https://api.fadello.nl/desktopmodules/fadello_retailAPI/API/v1/';
|
47 |
+
$api['ship_type'] = 'DC';
|
48 |
+
$api['label'] = 'PDF';
|
49 |
+
if ($detailed) {
|
50 |
+
$api['pu_name'] = Mage::getStoreConfig('shipping/fadello/pu_name', $storeId);
|
51 |
+
$api['pu_street'] = Mage::getStoreConfig('shipping/fadello/pu_street', $storeId);
|
52 |
+
$api['pu_homeno'] = Mage::getStoreConfig('shipping/fadello/pu_homeno', $storeId);
|
53 |
+
$api['pu_homeno_add'] = Mage::getStoreConfig('shipping/fadello/pu_homeno_add', $storeId);
|
54 |
+
$api['pu_postalcode'] = Mage::getStoreConfig('shipping/fadello/pu_postalcode', $storeId);
|
55 |
+
$api['pu_city'] = Mage::getStoreConfig('shipping/fadello/pu_city', $storeId);
|
56 |
+
$api['pu_country'] = Mage::getStoreConfig('shipping/fadello/pu_country', $storeId);
|
57 |
+
$api['pu_phone'] = preg_replace(
|
58 |
+
"/[^0-9]/", "",
|
59 |
+
Mage::getStoreConfig('shipping/fadello/pu_phone', $storeId)
|
60 |
+
);
|
61 |
+
$api['pu_email'] = Mage::getStoreConfig('shipping/fadello/pu_email', $storeId);
|
62 |
+
$api['homeno'] = Mage::getStoreConfig('shipping/fadello/seperate_homenumber', $storeId);
|
63 |
+
}
|
64 |
+
|
65 |
+
if (!empty($api['api_id']) && !empty($api['api_token'])) {
|
66 |
+
return $api;
|
67 |
+
}
|
68 |
+
|
69 |
+
return false;
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* @return bool
|
74 |
+
*/
|
75 |
+
public function isActive()
|
76 |
+
{
|
77 |
+
$time = date('Hi', Mage::getModel('core/date')->timestamp(time()));
|
78 |
+
$day = date('N', Mage::getModel('core/date')->timestamp(time()));
|
79 |
+
$availability = @unserialize(Mage::getStoreConfig('carriers/fadello/availability'));
|
80 |
+
foreach ($availability as $option) {
|
81 |
+
if ($option['day'] == $day) {
|
82 |
+
if (!empty($option['from']) && !empty($option['to'])) {
|
83 |
+
$from = str_replace(':', '', $option['from']);
|
84 |
+
$to = str_replace(':', '', $option['to']);
|
85 |
+
if (($time > $from) && ($time < $to)) {
|
86 |
+
return $option;
|
87 |
+
}
|
88 |
+
}
|
89 |
+
}
|
90 |
+
}
|
91 |
|
92 |
+
return false;
|
93 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
|
95 |
+
/**
|
96 |
+
* @param int $afterCutoff
|
97 |
+
* @param $cutoff
|
98 |
+
*
|
99 |
+
* @return mixed
|
100 |
+
*/
|
101 |
+
public function getDate($afterCutoff = 0, $cutoff)
|
102 |
+
{
|
103 |
+
$today = Mage::getModel('core/date')->date('d-m-Y');
|
104 |
+
$tomorrow = Mage::getModel('core/date')->date("d-m-Y", time() + 86400);
|
105 |
+
if ($afterCutoff) {
|
106 |
+
$time = Mage::getModel('core/date')->date('Hi');
|
107 |
+
$cutoff = (str_replace(':', '', $cutoff) + 100);
|
108 |
+
if ($time > $cutoff) {
|
109 |
+
return $tomorrow;
|
110 |
+
}
|
111 |
+
}
|
|
|
112 |
|
113 |
+
return $today;
|
114 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
|
116 |
+
/**
|
117 |
+
* @param $postcode
|
118 |
+
*
|
119 |
+
* @return bool
|
120 |
+
*/
|
121 |
+
public function checkPostcode($postcode)
|
122 |
+
{
|
123 |
+
$postcode = substr($postcode, 0, 4);
|
124 |
+
$nonDelivery = array(
|
125 |
+
"1791",
|
126 |
+
"1792",
|
127 |
+
"1793",
|
128 |
+
"1794",
|
129 |
+
"1795",
|
130 |
+
"1796",
|
131 |
+
"1797",
|
132 |
+
"8881",
|
133 |
+
"8882",
|
134 |
+
"8883",
|
135 |
+
"8884",
|
136 |
+
"8885",
|
137 |
+
"8891",
|
138 |
+
"8892",
|
139 |
+
"8893",
|
140 |
+
"8894",
|
141 |
+
"8895",
|
142 |
+
"8896",
|
143 |
+
"8897",
|
144 |
+
"8899",
|
145 |
+
"9161",
|
146 |
+
"9162",
|
147 |
+
"9163",
|
148 |
+
"9164",
|
149 |
+
"9166",
|
150 |
+
"9988"
|
151 |
+
);
|
152 |
+
if (!in_array($postcode, $nonDelivery)) {
|
153 |
+
return true;
|
154 |
+
} else {
|
155 |
+
return false;
|
156 |
+
}
|
157 |
+
}
|
158 |
|
159 |
}
|
app/code/community/Magmodules/Fadello/Model/Adminhtml/System/Config/Backend/Design/Availability.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
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:
|
@@ -12,48 +11,71 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
|
22 |
-
class Magmodules_Fadello_Model_Adminhtml_System_Config_Backend_Design_Availability
|
|
|
|
|
23 |
|
24 |
-
|
25 |
-
|
|
|
|
|
|
|
26 |
$value = $this->getValue();
|
27 |
-
if(is_array($value)) {
|
28 |
unset($value['__empty']);
|
29 |
-
if(count($value)){
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
}
|
47 |
}
|
|
|
48 |
$this->setValue($value);
|
49 |
parent::_beforeSave();
|
50 |
}
|
51 |
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Fadello
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
|
21 |
+
class Magmodules_Fadello_Model_Adminhtml_System_Config_Backend_Design_Availability
|
22 |
+
extends Mage_Adminhtml_Model_System_Config_Backend_Serialized_Array
|
23 |
+
{
|
24 |
|
25 |
+
/**
|
26 |
+
*
|
27 |
+
*/
|
28 |
+
protected function _beforeSave()
|
29 |
+
{
|
30 |
$value = $this->getValue();
|
31 |
+
if (is_array($value)) {
|
32 |
unset($value['__empty']);
|
33 |
+
if (count($value)) {
|
34 |
+
$value = $this->orderData($value, 'day');
|
35 |
+
$keys = array();
|
36 |
+
for ($i = 0; $i < count($value); $i++) {
|
37 |
+
$keys[] = 'availability_' . uniqid();
|
38 |
+
}
|
39 |
+
|
40 |
+
foreach ($value as $key => $field) {
|
41 |
+
$from = str_replace('.', ':', $field['from']);
|
42 |
+
$to = str_replace('.', ':', $field['to']);
|
43 |
+
if (empty($from)) {
|
44 |
+
$from = '0:00';
|
45 |
+
}
|
46 |
+
|
47 |
+
if (empty($to)) {
|
48 |
+
$to = '23:59';
|
49 |
+
}
|
50 |
+
|
51 |
+
if ($to == '0:00') {
|
52 |
+
$to = '23:59';
|
53 |
+
}
|
54 |
+
|
55 |
+
$value[$key]['from'] = $from;
|
56 |
+
$value[$key]['to'] = $to;
|
57 |
+
$value[$key]['title'] = $field['title'];
|
58 |
+
}
|
59 |
+
|
60 |
+
$value = array_combine($keys, array_values($value));
|
61 |
}
|
62 |
}
|
63 |
+
|
64 |
$this->setValue($value);
|
65 |
parent::_beforeSave();
|
66 |
}
|
67 |
|
68 |
+
/**
|
69 |
+
* @param $data
|
70 |
+
* @param $sort
|
71 |
+
*
|
72 |
+
* @return mixed
|
73 |
+
*/
|
74 |
+
function orderData($data, $sort)
|
75 |
+
{
|
76 |
+
$code = "return strnatcmp(\$a['$sort'], \$b['$sort']);";
|
77 |
+
usort($data, create_function('$a,$b', $code));
|
78 |
+
return $data;
|
79 |
+
}
|
80 |
+
|
81 |
}
|
app/code/community/Magmodules/Fadello/Model/Adminhtml/System/Config/Backend/Design/Shipping.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
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:
|
@@ -12,49 +11,72 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
|
22 |
-
class Magmodules_Fadello_Model_Adminhtml_System_Config_Backend_Design_Shipping
|
|
|
|
|
23 |
|
24 |
-
|
25 |
-
|
|
|
|
|
|
|
26 |
$value = $this->getValue();
|
27 |
-
if(is_array($value)) {
|
28 |
unset($value['__empty']);
|
29 |
-
if(count($value)){
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
}
|
48 |
}
|
|
|
49 |
$this->setValue($value);
|
50 |
parent::_beforeSave();
|
51 |
}
|
52 |
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Fadello
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
|
21 |
+
class Magmodules_Fadello_Model_Adminhtml_System_Config_Backend_Design_Shipping
|
22 |
+
extends Mage_Adminhtml_Model_System_Config_Backend_Serialized_Array
|
23 |
+
{
|
24 |
|
25 |
+
/**
|
26 |
+
*
|
27 |
+
*/
|
28 |
+
protected function _beforeSave()
|
29 |
+
{
|
30 |
$value = $this->getValue();
|
31 |
+
if (is_array($value)) {
|
32 |
unset($value['__empty']);
|
33 |
+
if (count($value)) {
|
34 |
+
$value = $this->orderData($value, 'from');
|
35 |
+
$keys = array();
|
36 |
+
for ($i = 0; $i < count($value); $i++) {
|
37 |
+
$keys[] = 'shipping_' . uniqid();
|
38 |
+
}
|
39 |
+
|
40 |
+
foreach ($value as $key => $field) {
|
41 |
+
$from = str_replace(',', '.', $field['from']);
|
42 |
+
$to = str_replace(',', '.', $field['to']);
|
43 |
+
$cost = str_replace(',', '.', $field['cost']);
|
44 |
+
if (empty($from)) {
|
45 |
+
$from = '0.00';
|
46 |
+
}
|
47 |
+
|
48 |
+
if (empty($to)) {
|
49 |
+
$to = '100000.00';
|
50 |
+
}
|
51 |
+
|
52 |
+
if (empty($cost)) {
|
53 |
+
$cost = '0.00';
|
54 |
+
}
|
55 |
+
|
56 |
+
$value[$key]['from'] = number_format($from, 2, '.', '');
|
57 |
+
$value[$key]['to'] = number_format($to, 2, '.', '');
|
58 |
+
$value[$key]['cost'] = number_format($cost, 2, '.', '');
|
59 |
+
}
|
60 |
+
|
61 |
+
$value = array_combine($keys, array_values($value));
|
62 |
}
|
63 |
}
|
64 |
+
|
65 |
$this->setValue($value);
|
66 |
parent::_beforeSave();
|
67 |
}
|
68 |
|
69 |
+
/**
|
70 |
+
* @param $data
|
71 |
+
* @param $sort
|
72 |
+
*
|
73 |
+
* @return mixed
|
74 |
+
*/
|
75 |
+
function orderData($data, $sort)
|
76 |
+
{
|
77 |
+
$code = "return strnatcmp(\$a['$sort'], \$b['$sort']);";
|
78 |
+
usort($data, create_function('$a,$b', $code));
|
79 |
+
return $data;
|
80 |
+
}
|
81 |
+
|
82 |
}
|
app/code/community/Magmodules/Fadello/Model/Adminhtml/System/Config/Source/Days.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
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:
|
@@ -12,26 +11,30 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Fadello_Model_Adminhtml_System_Config_Source_Days
|
23 |
-
|
24 |
-
|
|
|
|
|
|
|
|
|
25 |
{
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
}
|
36 |
|
37 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Fadello
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
+
|
21 |
+
class Magmodules_Fadello_Model_Adminhtml_System_Config_Source_Days
|
22 |
+
{
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @return array
|
26 |
+
*/
|
27 |
+
public function toOptionArray()
|
28 |
{
|
29 |
+
$days = array();
|
30 |
+
$days[] = array('value' => '1', 'label' => Mage::helper('adminhtml')->__('Monday'));
|
31 |
+
$days[] = array('value' => '2', 'label' => Mage::helper('adminhtml')->__('Tuesday'));
|
32 |
+
$days[] = array('value' => '3', 'label' => Mage::helper('adminhtml')->__('Wednesday'));
|
33 |
+
$days[] = array('value' => '4', 'label' => Mage::helper('adminhtml')->__('Thursday'));
|
34 |
+
$days[] = array('value' => '5', 'label' => Mage::helper('adminhtml')->__('Friday'));
|
35 |
+
$days[] = array('value' => '6', 'label' => Mage::helper('adminhtml')->__('Saturday'));
|
36 |
+
$days[] = array('value' => '7', 'label' => Mage::helper('adminhtml')->__('Sunday'));
|
37 |
+
return $days;
|
38 |
}
|
39 |
|
40 |
}
|
app/code/community/Magmodules/Fadello/Model/Api.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
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:
|
@@ -12,330 +11,363 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Fadello_Model_Api extends Mage_Core_Helper_Abstract
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
341 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Fadello
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
+
|
21 |
+
class Magmodules_Fadello_Model_Api extends Mage_Core_Helper_Abstract
|
22 |
+
{
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @param $orderId
|
26 |
+
*
|
27 |
+
* @return array
|
28 |
+
*/
|
29 |
+
public function createShipment($orderId)
|
30 |
+
{
|
31 |
+
$result = array();
|
32 |
+
$order = Mage::getModel('sales/order')->load($orderId);
|
33 |
+
$storeId = $order->getStoreId();
|
34 |
+
$config = Mage::helper('fadello')->getConfig($storeId, 1);
|
35 |
+
|
36 |
+
if (empty($config)) {
|
37 |
+
$result['status'] = 'Error';
|
38 |
+
$result['error_msg'] = $this->__('Missing API details in Admin');
|
39 |
+
return $result;
|
40 |
+
}
|
41 |
+
|
42 |
+
if (empty($order)) {
|
43 |
+
$result['status'] = 'Error';
|
44 |
+
$result['error_msg'] = $this->__('Could not find Order');
|
45 |
+
return $result;
|
46 |
+
}
|
47 |
+
|
48 |
+
$post = json_encode($this->getPostOrderArray($config, $order));
|
49 |
+
|
50 |
+
$request = curl_init();
|
51 |
+
$requestUrl = $config['url'] . 'postOrder?' . $config['url_params'];
|
52 |
+
curl_setopt($request, CURLOPT_SSL_VERIFYPEER, false);
|
53 |
+
curl_setopt($request, CURLOPT_URL, $requestUrl);
|
54 |
+
curl_setopt($request, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
|
55 |
+
curl_setopt($request, CURLOPT_POST, true);
|
56 |
+
curl_setopt($request, CURLOPT_POSTFIELDS, $post);
|
57 |
+
curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
|
58 |
+
$content = curl_exec($request);
|
59 |
+
$apiResult = json_decode($content, true);
|
60 |
+
|
61 |
+
if (!empty($apiResult['Status'])) {
|
62 |
+
if ($apiResult['Status'] == 'OK') {
|
63 |
+
$transId = $apiResult['TransID'];
|
64 |
+
$deliverId = $apiResult['TransDeliverID'][0]['Deliver1'];
|
65 |
+
$barcode = $apiResult['TransDeliverID'][0]['Barcode1'];
|
66 |
+
$status = 'created';
|
67 |
+
|
68 |
+
$order->setFadelloTransId($transId)
|
69 |
+
->setFadelloDeliverId($deliverId)
|
70 |
+
->setFadelloBarcode($barcode)
|
71 |
+
->setFadelloStatus($status)
|
72 |
+
->save();
|
73 |
+
|
74 |
+
$url = Mage::helper("adminhtml")->getUrl('*/fadello/getPdf', array('order_id' => $orderId));
|
75 |
+
$result['status'] = 'Success';
|
76 |
+
$result['success_msg'] = $this->__(
|
77 |
+
'Fadello shipment created for order, %s',
|
78 |
+
'<a href="' . $url . '">Download PDF</a>'
|
79 |
+
);
|
80 |
+
return $result;
|
81 |
+
} else {
|
82 |
+
$result['status'] = $apiResult['Status'];
|
83 |
+
$result['error_msg'] = 'Fadello API: ' . $apiResult['Message'];
|
84 |
+
return $result;
|
85 |
+
}
|
86 |
+
} else {
|
87 |
+
$result['status'] = 'Error';
|
88 |
+
$result['error_msg'] = $this->__('General error in API call');
|
89 |
+
return $result;
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* @param $orderId
|
95 |
+
* @param int $magento
|
96 |
+
*
|
97 |
+
* @return array
|
98 |
+
*/
|
99 |
+
public function cancelShipment($orderId, $magento = 0)
|
100 |
+
{
|
101 |
+
$result = array();
|
102 |
+
$order = Mage::getModel('sales/order')->load($orderId);
|
103 |
+
$storeId = $order->getStoreId();
|
104 |
+
$config = Mage::helper('fadello')->getConfig($storeId, 0);
|
105 |
+
|
106 |
+
if (empty($config)) {
|
107 |
+
$result['status'] = 'Error';
|
108 |
+
$result['error_msg'] = $this->__('Missing API details in Admin');
|
109 |
+
return $result;
|
110 |
+
}
|
111 |
+
|
112 |
+
if (empty($order)) {
|
113 |
+
$result['status'] = 'Error';
|
114 |
+
$result['error_msg'] = $this->__('Could not find Order');
|
115 |
+
return $result;
|
116 |
+
}
|
117 |
+
|
118 |
+
$transId = $order->getFadelloTransId();
|
119 |
+
if (empty($transId)) {
|
120 |
+
$result['status'] = 'Error';
|
121 |
+
$result['error_msg'] = $this->__('TransID Missing');
|
122 |
+
return $result;
|
123 |
+
}
|
124 |
+
|
125 |
+
$request = curl_init();
|
126 |
+
$requestUrl = $config['url'] . 'cancelOrder?' . $config['url_params'] . '&transID=' . $transId;
|
127 |
+
curl_setopt($request, CURLOPT_SSL_VERIFYPEER, false);
|
128 |
+
curl_setopt($request, CURLOPT_URL, $requestUrl);
|
129 |
+
curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
|
130 |
+
$content = curl_exec($request);
|
131 |
+
$apiResult = json_decode($content, true);
|
132 |
+
|
133 |
+
if (!empty($apiResult['Status'])) {
|
134 |
+
if ($apiResult['Status'] == 'OK') {
|
135 |
+
if (!empty($apiResult['ErrorCode'])) {
|
136 |
+
$result['status'] = 'Error';
|
137 |
+
$result['error_msg'] = 'Fadello API: ' . $apiResult['Message'];
|
138 |
+
return $result;
|
139 |
+
} else {
|
140 |
+
$order->setFadelloTransId('')->setFadelloDeliverId('')->setFadelloBarcode('')->setFadelloStatus('');
|
141 |
+
if ($magento == 1) {
|
142 |
+
$shipments = $order->getShipmentsCollection();
|
143 |
+
foreach ($shipments as $shipment) {
|
144 |
+
$shipment->delete();
|
145 |
+
}
|
146 |
+
|
147 |
+
$items = $order->getAllVisibleItems();
|
148 |
+
foreach ($items as $i) {
|
149 |
+
$i->setQtyShipped(0);
|
150 |
+
$i->save();
|
151 |
+
}
|
152 |
+
|
153 |
+
$order->setData('state', 'processing')->setStatus('processing');
|
154 |
+
}
|
155 |
+
|
156 |
+
$order->save();
|
157 |
+
$result['status'] = 'Success';
|
158 |
+
$result['success_msg'] = $apiResult['Message'];
|
159 |
+
return $result;
|
160 |
+
}
|
161 |
+
} else {
|
162 |
+
$result['status'] = $apiResult['Status'];
|
163 |
+
$result['error_msg'] = $apiResult['Message'];
|
164 |
+
return $result;
|
165 |
+
}
|
166 |
+
} else {
|
167 |
+
$result['status'] = 'Error';
|
168 |
+
$result['error_msg'] = $this->__('General error in API call');
|
169 |
+
return $result;
|
170 |
+
}
|
171 |
+
}
|
172 |
+
|
173 |
+
/**
|
174 |
+
* @param $orderId
|
175 |
+
*
|
176 |
+
* @return array
|
177 |
+
*/
|
178 |
+
public function getPdf($orderId)
|
179 |
+
{
|
180 |
+
$order = Mage::getModel('sales/order')->load($orderId);
|
181 |
+
$storeId = $order->getStoreId();
|
182 |
+
$config = Mage::helper('fadello')->getConfig($storeId, 0);
|
183 |
+
$result = array();
|
184 |
+
|
185 |
+
if (empty($config)) {
|
186 |
+
$result['status'] = 'Error';
|
187 |
+
$result['error_msg'] = $this->__('Missing API details in Admin');
|
188 |
+
return $result;
|
189 |
+
}
|
190 |
+
|
191 |
+
if (empty($order)) {
|
192 |
+
$result['status'] = 'Error';
|
193 |
+
$result['error_msg'] = $this->__('Could not find Order');
|
194 |
+
return $result;
|
195 |
+
}
|
196 |
+
|
197 |
+
$transId = $order->getFadelloTransId();
|
198 |
+
$transDeliverId = $order->getFadelloDeliverId();
|
199 |
+
if (empty($transId) || empty($transDeliverId)) {
|
200 |
+
$result['status'] = 'Error';
|
201 |
+
$result['error_msg'] = $this->__('Trans Data Missing');
|
202 |
+
return $result;
|
203 |
+
}
|
204 |
+
|
205 |
+
$request = curl_init();
|
206 |
+
$requestUrl = $config['url'] . 'getLabel?' . $config['url_params'] . '&transID=' . $transId . '&transDeliverID=' . $transDeliverId . '&Lformat=' . $config['label'];
|
207 |
+
curl_setopt($request, CURLOPT_SSL_VERIFYPEER, false);
|
208 |
+
curl_setopt($request, CURLOPT_URL, $requestUrl);
|
209 |
+
curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
|
210 |
+
$content = curl_exec($request);
|
211 |
+
$apiResult = json_decode($content, true);
|
212 |
+
|
213 |
+
if (!empty($apiResult['Status'])) {
|
214 |
+
if ($apiResult['Status'] == 'OK') {
|
215 |
+
$labelUrl = $apiResult['Labelurl'];
|
216 |
+
$result['status'] = 'Success';
|
217 |
+
$result['increment_id'] = $order->getIncrementId();
|
218 |
+
$result['label_url'] = $labelUrl;
|
219 |
+
$result['file_name'] = 'Fadello-' . $order->getIncrementId() . '.pdf';
|
220 |
+
return $result;
|
221 |
+
} else {
|
222 |
+
$result['status'] = $apiResult['Status'];
|
223 |
+
$result['error_msg'] = $apiResult['Message'];
|
224 |
+
return $result;
|
225 |
+
}
|
226 |
+
} else {
|
227 |
+
$result['status'] = 'Error';
|
228 |
+
$result['error_msg'] = $this->__('General error in API call');
|
229 |
+
return $result;
|
230 |
+
}
|
231 |
+
}
|
232 |
+
|
233 |
+
/**
|
234 |
+
* @param $orderId
|
235 |
+
*
|
236 |
+
* @return array
|
237 |
+
*/
|
238 |
+
public function shipOrder($orderId)
|
239 |
+
{
|
240 |
+
$order = Mage::getModel('sales/order')->load($orderId);
|
241 |
+
$barcode = $order->getFadelloBarcode();
|
242 |
+
$result = array();
|
243 |
+
|
244 |
+
if (empty($order)) {
|
245 |
+
$result['status'] = 'Error';
|
246 |
+
$result['error_msg'] = $this->__('Could not find Order');
|
247 |
+
return $result;
|
248 |
+
}
|
249 |
+
|
250 |
+
if (empty($barcode)) {
|
251 |
+
$result['status'] = 'Error';
|
252 |
+
$result['error_msg'] = $this->__('Could not find Track & Trace info');
|
253 |
+
return $result;
|
254 |
+
}
|
255 |
+
|
256 |
+
$shipments = $order->getShipmentsCollection();
|
257 |
+
if (count($shipments)) {
|
258 |
+
$result['status'] = 'Error';
|
259 |
+
$result['error_msg'] = $this->__('Order %s allready shipped', $order->getInrementId());
|
260 |
+
return $result;
|
261 |
+
}
|
262 |
+
|
263 |
+
try {
|
264 |
+
$name = Mage::getStoreConfig('carriers/fadello/name');
|
265 |
+
$shipment = $order->prepareShipment();
|
266 |
+
$arrTracking = array('carrier_code' => 'fadello', 'title' => $name, 'number' => $barcode);
|
267 |
+
$track = Mage::getModel('sales/order_shipment_track')->addData($arrTracking);
|
268 |
+
$shipment->addTrack($track);
|
269 |
+
$shipment->register();
|
270 |
+
$shipment->sendEmail(true);
|
271 |
+
$shipment->setEmailSent(true);
|
272 |
+
$shipment->getOrder()->setIsInProcess(true);
|
273 |
+
Mage::getModel('core/resource_transaction')->addObject($shipment)->addObject($shipment->getOrder())->save();
|
274 |
+
unset($shipment);
|
275 |
+
} catch (Exception $e) {
|
276 |
+
$result['status'] = 'Error';
|
277 |
+
$result['error_msg'] = $e->getMessage();
|
278 |
+
return $result;
|
279 |
+
}
|
280 |
+
|
281 |
+
$order->setData('state', "complete")->setStatus("complete")->setFadelloStatus('shipped')->save();
|
282 |
+
$result['status'] = 'Success';
|
283 |
+
$result['success_msg'] = $this->__('Order %s shipped and completed', $order->getInrementId());
|
284 |
+
return $result;
|
285 |
+
}
|
286 |
+
|
287 |
+
/**
|
288 |
+
* @param $config
|
289 |
+
* @param $order
|
290 |
+
*
|
291 |
+
* @return array
|
292 |
+
*/
|
293 |
+
public function getPostOrderArray($config, $order)
|
294 |
+
{
|
295 |
+
$post = array();
|
296 |
+
$post['Name'] = $config['pu_name'];
|
297 |
+
$post['Phone'] = $config['pu_phone'];
|
298 |
+
$post['YourRef'] = $order->getIncrementId() . time();
|
299 |
+
$post['Note'] = '';
|
300 |
+
$post['Email'] = $config['pu_email'];
|
301 |
+
$post['ShipType'] = $config['ship_type'];
|
302 |
+
$post['PUname'] = $config['pu_name'];
|
303 |
+
$post['PUstreet'] = $config['pu_street'];
|
304 |
+
$post['PUpostalcode'] = $config['pu_postalcode'];
|
305 |
+
$post['PUhomeno'] = $config['pu_homeno'];
|
306 |
+
$post['PUhomenoAdd'] = $config['pu_homeno_add'];
|
307 |
+
$post['PUcity'] = $config['pu_city'];
|
308 |
+
$post['PUcountry'] = $config['pu_country'];
|
309 |
+
$post['PUphone'] = $config['pu_phone'];
|
310 |
+
$post['PUemail'] = $config['pu_email'];
|
311 |
+
$post['PUdate'] = $config['pu_date'];
|
312 |
+
$post['PUtime'] = $config['pickup_time'];
|
313 |
+
$post['PUnote'] = '';
|
314 |
+
$post['Deliver'][] = $this->getDeliveryData($config, $order);
|
315 |
+
return $post;
|
316 |
+
}
|
317 |
+
|
318 |
+
/**
|
319 |
+
* @param $config
|
320 |
+
* @param $order
|
321 |
+
*
|
322 |
+
* @return array
|
323 |
+
*/
|
324 |
+
public function getDeliveryData($config, $order)
|
325 |
+
{
|
326 |
+
$delivery = array();
|
327 |
+
$shippingAddress = $order->getShippingAddress();
|
328 |
+
$address = $this->splitStreet($shippingAddress->getStreet(), $config['homeno']);
|
329 |
+
$delivery['DELCompanyName'] = $shippingAddress->getData('company');
|
330 |
+
$delivery['DELname'] = $shippingAddress->getFirstname() . ' ' . $shippingAddress->getLastname();
|
331 |
+
$delivery['DELstreet'] = $address['street'];
|
332 |
+
$delivery['DELpostalcode'] = $shippingAddress->getPostcode();
|
333 |
+
$delivery['DELhomeno'] = $address['homeno'];
|
334 |
+
$delivery['DELhomenoAdd'] = $address['homeno_add'];
|
335 |
+
$delivery['DELcity'] = $shippingAddress->getCity();
|
336 |
+
$delivery['DELcountry'] = $shippingAddress->getCountry();
|
337 |
+
$delivery['DELphone'] = preg_replace("/[^0-9]/", "", $shippingAddress->getTelephone());
|
338 |
+
$delivery['DELemail'] = $order->getCustomerEmail();
|
339 |
+
$delivery['DELdate'] = $config['del_date'];
|
340 |
+
$delivery['DELtime'] = $config['del_time'];
|
341 |
+
$delivery['DELAaantalColli'] = 1;
|
342 |
+
$delivery['DELbarcodes'] = '';
|
343 |
+
$delivery['CreateLabel'] = 'True';
|
344 |
+
$delivery['DELnote'] = '';
|
345 |
+
return $delivery;
|
346 |
+
}
|
347 |
+
|
348 |
+
/**
|
349 |
+
* @param $streetArr
|
350 |
+
* @param int $homeNoSep
|
351 |
+
*
|
352 |
+
* @return array
|
353 |
+
*/
|
354 |
+
public function splitStreet($streetArr, $homeNoSep = 0)
|
355 |
+
{
|
356 |
+
if ($homeNoSep && isset($streetArr[1])) {
|
357 |
+
$street = $streetArr[0];
|
358 |
+
$homeNoString = str_replace(array('-', ','), ' ', $streetArr[1]);
|
359 |
+
$homeNo = @reset(array_filter(preg_split("/\D+/", $homeNoString)));
|
360 |
+
$homeNoAdd = trim(str_replace($homeNo, '', $homeNoString));
|
361 |
+
return array('street' => $street, 'homeno' => $homeNo, 'homeno_add' => $homeNoAdd);
|
362 |
+
} else {
|
363 |
+
$street = $streetArr[0];
|
364 |
+
preg_match('/^([^\d]*[^\d\s]) *(\d.*)$/', $street, $match);
|
365 |
+
$street = (isset($match[1])) ? $match[1] : '';
|
366 |
+
$homeNoString = (isset($match[2])) ? str_replace('-', ' ', $match[2]) : '';
|
367 |
+
$homeNo = @reset(array_filter(preg_split("/\D+/", $homeNoString)));
|
368 |
+
$homeNoAdd = trim(str_replace($homeNo, '', $homeNoString));
|
369 |
+
return array('street' => $street, 'homeno' => $homeNo, 'homeno_add' => $homeNoAdd);
|
370 |
+
}
|
371 |
+
}
|
372 |
+
|
373 |
}
|
app/code/community/Magmodules/Fadello/Model/Carrier/ShippingMethod.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
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:
|
@@ -12,74 +11,167 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Fadello_Model_Carrier_ShippingMethod extends Mage_Shipping_Model_Carrier_Abstract {
|
23 |
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
27 |
{
|
|
|
|
|
28 |
|
29 |
-
if(!$this->getConfigFlag('active')) {
|
30 |
return false;
|
31 |
}
|
32 |
|
33 |
-
if(!Mage::getStoreConfig('shipping/fadello/enabled')) {
|
34 |
return false;
|
35 |
}
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
$method = Mage::getModel('shipping/rate_result_method');
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
return $result;
|
78 |
}
|
79 |
-
|
80 |
-
|
|
|
|
|
|
|
81 |
{
|
82 |
return array($this->_code => $this->getConfigData('name'));
|
83 |
}
|
84 |
-
|
85 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Fadello
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
|
|
|
|
20 |
|
21 |
+
class Magmodules_Fadello_Model_Carrier_ShippingMethod extends Mage_Shipping_Model_Carrier_Abstract
|
22 |
+
{
|
23 |
+
|
24 |
+
const XML_PATH_MANAGE_STOCK = 'cataloginventory/item_options/manage_stock';
|
25 |
+
|
26 |
+
protected $_code = 'fadello';
|
27 |
|
28 |
+
/**
|
29 |
+
* @param Mage_Shipping_Model_Rate_Request $request
|
30 |
+
*
|
31 |
+
* @return mixed
|
32 |
+
*/
|
33 |
+
public function collectRates(Mage_Shipping_Model_Rate_Request $request)
|
34 |
{
|
35 |
+
$displayError = $this->getConfigFlag('showmethod');
|
36 |
+
$error = '';
|
37 |
|
38 |
+
if (!$this->getConfigFlag('active')) {
|
39 |
return false;
|
40 |
}
|
41 |
|
42 |
+
if (!Mage::getStoreConfig('shipping/fadello/enabled')) {
|
43 |
return false;
|
44 |
}
|
45 |
+
|
46 |
+
if ($maxWeight = Mage::getStoreConfig('carriers/fadello/weight')) {
|
47 |
+
if ($request->getPackageWeight() > $maxWeight) {
|
48 |
+
if ($displayError) {
|
49 |
+
$error++;
|
50 |
+
} else {
|
51 |
+
return false;
|
52 |
+
}
|
53 |
+
}
|
54 |
+
}
|
55 |
+
|
56 |
+
$active = Mage::helper('fadello')->isActive();
|
57 |
+
if (!$active) {
|
58 |
+
if ($displayError) {
|
59 |
+
$error++;
|
60 |
+
} else {
|
61 |
+
return false;
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
$postcode = $request->getDestPostcode();
|
66 |
+
if (!empty($postcode)) {
|
67 |
+
$postcodeCheck = Mage::helper('fadello')->checkPostcode($request->getDestPostcode());
|
68 |
+
if (!$postcodeCheck) {
|
69 |
+
if ($displayError) {
|
70 |
+
$error++;
|
71 |
+
} else {
|
72 |
+
return false;
|
73 |
+
}
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
+
if ($this->getConfigData('stock_check')) {
|
78 |
+
|
79 |
+
$configManageStock = (int) Mage::getStoreConfigFlag(self::XML_PATH_MANAGE_STOCK);
|
80 |
+
|
81 |
+
foreach ($request->getAllItems() as $item) {
|
82 |
+
|
83 |
+
if ($item->getProduct()->isVirtual()) {
|
84 |
+
continue;
|
85 |
+
}
|
86 |
+
|
87 |
+
if ($item->getProduct()->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE) {
|
88 |
+
continue;
|
89 |
+
}
|
90 |
+
|
91 |
+
if ($item->getProduct()->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_BUNDLE) {
|
92 |
+
continue;
|
93 |
+
}
|
94 |
+
|
95 |
+
if ($item->getParentItem()) {
|
96 |
+
$qty = $item->getParentItem()->getQty();
|
97 |
+
} else {
|
98 |
+
$qty = $item->getQty();
|
99 |
+
}
|
100 |
+
|
101 |
+
$stockItem = $item->getProduct()->getStockItem();
|
102 |
+
|
103 |
+
if ($stockItem->getUseConfigManageStock()) {
|
104 |
+
if (!$configManageStock) {
|
105 |
+
continue;
|
106 |
+
}
|
107 |
+
} else {
|
108 |
+
if (!$stockItem->getManageStock()) {
|
109 |
+
continue;
|
110 |
+
}
|
111 |
+
}
|
112 |
+
|
113 |
+
if (!$stockItem->getIsInStock()) {
|
114 |
+
if ($displayError) {
|
115 |
+
$error++;
|
116 |
+
} else {
|
117 |
+
return false;
|
118 |
+
}
|
119 |
+
}
|
120 |
+
|
121 |
+
if ($qty > $stockItem->getQty()) {
|
122 |
+
if ($displayError) {
|
123 |
+
$error++;
|
124 |
+
} else {
|
125 |
+
return false;
|
126 |
+
}
|
127 |
+
}
|
128 |
+
}
|
129 |
+
|
130 |
+
}
|
131 |
+
|
132 |
+
$prices = @unserialize($this->getConfigData('shipping_price'));
|
133 |
+
$total = $request->getBaseSubtotalInclTax();
|
134 |
+
$shippingCost = '0.00';
|
135 |
+
|
136 |
+
foreach ($prices as $shippingPrice) {
|
137 |
+
if (($total >= $shippingPrice['from']) && ($total <= $shippingPrice['to'])) {
|
138 |
+
$shippingCost = $shippingPrice['cost'];
|
139 |
+
}
|
140 |
+
}
|
141 |
+
|
142 |
+
$name = Mage::getStoreConfig('carriers/fadello/name');
|
143 |
$method = Mage::getModel('shipping/rate_result_method');
|
144 |
+
$result = Mage::getModel('shipping/rate_result');
|
145 |
+
|
146 |
+
if (empty($error)) {
|
147 |
+
|
148 |
+
$method->setCarrier('fadello');
|
149 |
+
$method->setCarrierTitle($name);
|
150 |
+
$method->setMethod('fadello');
|
151 |
+
$method->setMethodTitle($active['title']);
|
152 |
+
$method->setPrice($shippingCost);
|
153 |
+
$method->setCost('0.00');
|
154 |
+
$result->append($method);
|
155 |
+
|
156 |
+
} else {
|
157 |
+
|
158 |
+
$error = Mage::getModel('shipping/rate_result_error');
|
159 |
+
$method->setCarrier('fadello');
|
160 |
+
$method->setCarrierTitle($name);
|
161 |
+
$error->setErrorMessage($this->getConfigData('specificerrmsg'));
|
162 |
+
$result->append($error);
|
163 |
+
|
164 |
+
}
|
165 |
+
|
166 |
return $result;
|
167 |
}
|
168 |
+
|
169 |
+
/**
|
170 |
+
* @return array
|
171 |
+
*/
|
172 |
+
public function getAllowedMethods()
|
173 |
{
|
174 |
return array($this->_code => $this->getConfigData('name'));
|
175 |
}
|
176 |
+
|
177 |
}
|
app/code/community/Magmodules/Fadello/Model/Observer.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
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:
|
@@ -12,59 +11,54 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Fadello_Model_Observer {
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
public function addDataToOrderGrid($observer)
|
25 |
{
|
26 |
$block = $observer->getEvent()->getBlock();
|
27 |
-
if($block->getType() == 'adminhtml/sales_order_grid') {
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
{
|
44 |
-
if(Mage::getStoreConfig('shipping/fadello/enabled')) {
|
45 |
-
if(Mage::helper('core')->isModuleEnabled('TIG_PostNL')) {
|
46 |
-
if(Mage::helper('postnl')->isEnabled()) {
|
47 |
-
return;
|
48 |
-
}
|
49 |
-
}
|
50 |
-
$collection = $observer->getOrderGridCollection();
|
51 |
-
$sales_table = Mage::getSingleton('core/resource')->getTableName('sales_flat_order');
|
52 |
-
$collection->getSelect()->from(array(), array('shipping_method' => new Zend_Db_Expr('(SELECT `weight` FROM `' . $sales_table . '` as `o` WHERE `main_table`.`entity_id` = `o`.`entity_id`)')));
|
53 |
-
}
|
54 |
-
}
|
55 |
|
|
|
|
|
|
|
56 |
public function core_block_abstract_to_html_after($observer)
|
57 |
{
|
58 |
-
if($observer->getBlock() instanceof Mage_Checkout_Block_Onepage_Shipping_Method_Available) {
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
}
|
69 |
}
|
70 |
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Fadello
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
|
|
|
|
20 |
|
21 |
+
class Magmodules_Fadello_Model_Observer
|
22 |
+
{
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @param $observer
|
26 |
+
*/
|
27 |
public function addDataToOrderGrid($observer)
|
28 |
{
|
29 |
$block = $observer->getEvent()->getBlock();
|
30 |
+
if ($block->getType() == 'adminhtml/sales_order_grid') {
|
31 |
+
if (Mage::getStoreConfig('shipping/fadello/enabled')) {
|
32 |
+
$block->addColumnAfter(
|
33 |
+
'fadello', array(
|
34 |
+
'header' => 'Fadello',
|
35 |
+
'type' => 'text',
|
36 |
+
'index' => 'fadello',
|
37 |
+
'filter' => false,
|
38 |
+
'sortable' => false,
|
39 |
+
'renderer' => 'Magmodules_Fadello_Block_Adminhtml_Renderer_Shipment',
|
40 |
+
'width' => '120px',
|
41 |
+
), 'status'
|
42 |
+
);
|
43 |
+
}
|
44 |
+
}
|
45 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
+
/**
|
48 |
+
* @param $observer
|
49 |
+
*/
|
50 |
public function core_block_abstract_to_html_after($observer)
|
51 |
{
|
52 |
+
if ($observer->getBlock() instanceof Mage_Checkout_Block_Onepage_Shipping_Method_Available) {
|
53 |
+
$enabled = Mage::getStoreConfig('carriers/fadello/active');
|
54 |
+
$logoStyle = Mage::getStoreConfig('carriers/fadello/logo_style');
|
55 |
+
if ($enabled && $logoStyle) {
|
56 |
+
$html = $observer->getTransport()->getHtml();
|
57 |
+
$header = '<dt>' . Mage::getStoreConfig('carriers/fadello/title') . '</dt>';
|
58 |
+
$headerNew = '<dt class="fadello-class">' . Mage::getStoreConfig('carriers/fadello/title') . '</dt>';
|
59 |
+
$html = str_replace($header, $headerNew, $html);
|
60 |
+
$observer->getTransport()->setHtml($html);
|
61 |
+
}
|
62 |
}
|
63 |
}
|
64 |
|
app/code/community/Magmodules/Fadello/controllers/Adminhtml/FadelloController.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
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:
|
@@ -12,100 +11,119 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Fadello_Adminhtml_FadelloController extends Mage_Adminhtml_Controller_Action {
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
if(!empty($result['success_msg'])) {
|
47 |
-
Mage::getSingleton('core/session')->addSuccess($result['success_msg']);
|
48 |
-
}
|
49 |
-
if(!empty($result['error_msg'])) {
|
50 |
-
Mage::getSingleton('core/session')->addError($result['error_msg']);
|
51 |
-
}
|
52 |
-
} else {
|
53 |
-
$msg = $this->__('Order not found!');
|
54 |
-
Mage::getSingleton('core/session')->addError($msg);
|
55 |
-
}
|
56 |
-
$this->_redirect('adminhtml/sales_order');
|
57 |
-
}
|
58 |
-
|
59 |
-
public function cancelShipmentAction()
|
60 |
-
{
|
61 |
-
$orderId = $this->getRequest()->getParam('order_id');
|
62 |
-
$magento = $this->getRequest()->getParam('magento');
|
63 |
-
if($orderId > 0) {
|
64 |
-
$result = Mage::getModel('fadello/api')->cancelShipment($orderId, $magento);
|
65 |
-
if(!empty($result['success_msg'])) {
|
66 |
-
Mage::getSingleton('core/session')->addSuccess($result['success_msg']);
|
67 |
-
}
|
68 |
-
if(!empty($result['error_msg'])) {
|
69 |
-
Mage::getSingleton('core/session')->addError($result['error_msg']);
|
70 |
-
}
|
71 |
-
} else {
|
72 |
-
$msg = $this->__('Order not found!');
|
73 |
Mage::getSingleton('core/session')->addError($msg);
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
Mage::getSingleton('core/session')->addError($result['error_msg']);
|
92 |
-
}
|
93 |
-
}
|
94 |
-
} else {
|
95 |
-
$msg = $this->__('Order not found!');
|
96 |
-
Mage::getSingleton('core/session')->addError($msg);
|
97 |
-
}
|
98 |
-
$this->_redirect('adminhtml/sales_order');
|
99 |
-
}
|
100 |
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
return true;
|
109 |
-
}
|
110 |
-
|
111 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Fadello
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
|
|
|
|
20 |
|
21 |
+
class Magmodules_Fadello_Adminhtml_FadelloController extends Mage_Adminhtml_Controller_Action
|
22 |
+
{
|
23 |
+
|
24 |
+
/**
|
25 |
+
*
|
26 |
+
*/
|
27 |
+
public function createShipmentAction()
|
28 |
+
{
|
29 |
+
$orderId = $this->getRequest()->getParam('order_id');
|
30 |
+
if ($orderId > 0) {
|
31 |
+
$result = Mage::getModel('fadello/api')->createShipment($orderId);
|
32 |
+
if (!empty($result['success_msg'])) {
|
33 |
+
Mage::getSingleton('core/session')->addSuccess($result['success_msg']);
|
34 |
+
}
|
35 |
+
|
36 |
+
if (!empty($result['error_msg'])) {
|
37 |
+
Mage::getSingleton('core/session')->addError($result['error_msg']);
|
38 |
+
}
|
39 |
+
} else {
|
40 |
+
$msg = $this->__('Order not found!');
|
41 |
+
Mage::getSingleton('core/session')->addError($msg);
|
42 |
+
}
|
43 |
+
|
44 |
+
$this->_redirect('adminhtml/sales_order');
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
*
|
49 |
+
*/
|
50 |
+
public function shipOrderAction()
|
51 |
+
{
|
52 |
+
$orderId = $this->getRequest()->getParam('order_id');
|
53 |
+
if ($orderId > 0) {
|
54 |
+
$result = Mage::getModel('fadello/api')->shipOrder($orderId);
|
55 |
+
if (!empty($result['success_msg'])) {
|
56 |
+
Mage::getSingleton('core/session')->addSuccess($result['success_msg']);
|
57 |
+
}
|
58 |
|
59 |
+
if (!empty($result['error_msg'])) {
|
60 |
+
Mage::getSingleton('core/session')->addError($result['error_msg']);
|
61 |
+
}
|
62 |
+
} else {
|
63 |
+
$msg = $this->__('Order not found!');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
Mage::getSingleton('core/session')->addError($msg);
|
65 |
+
}
|
66 |
+
|
67 |
+
$this->_redirect('adminhtml/sales_order');
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
*
|
72 |
+
*/
|
73 |
+
public function cancelShipmentAction()
|
74 |
+
{
|
75 |
+
$orderId = $this->getRequest()->getParam('order_id');
|
76 |
+
$magento = $this->getRequest()->getParam('magento');
|
77 |
+
if ($orderId > 0) {
|
78 |
+
$result = Mage::getModel('fadello/api')->cancelShipment($orderId, $magento);
|
79 |
+
if (!empty($result['success_msg'])) {
|
80 |
+
Mage::getSingleton('core/session')->addSuccess($result['success_msg']);
|
81 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
|
83 |
+
if (!empty($result['error_msg'])) {
|
84 |
+
Mage::getSingleton('core/session')->addError($result['error_msg']);
|
85 |
+
}
|
86 |
+
} else {
|
87 |
+
$msg = $this->__('Order not found!');
|
88 |
+
Mage::getSingleton('core/session')->addError($msg);
|
89 |
+
}
|
90 |
+
|
91 |
+
$this->_redirect('adminhtml/sales_order');
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
*
|
96 |
+
*/
|
97 |
+
public function getPdfAction()
|
98 |
+
{
|
99 |
+
$orderId = $this->getRequest()->getParam('order_id');
|
100 |
+
if ($orderId > 0) {
|
101 |
+
$result = Mage::getModel('fadello/api')->getPdf($orderId);
|
102 |
+
if (!empty($result['label_url']) && !empty($result['file_name'])) {
|
103 |
+
header('Content-Type: application/pdf');
|
104 |
+
header('Content-Disposition: attachment; filename=' . $result['file_name']);
|
105 |
+
header('Pragma: no-cache');
|
106 |
+
readfile($result['label_url']);
|
107 |
+
exit;
|
108 |
+
} else {
|
109 |
+
if (!empty($result['error_msg'])) {
|
110 |
+
Mage::getSingleton('core/session')->addError($result['error_msg']);
|
111 |
+
}
|
112 |
+
}
|
113 |
+
} else {
|
114 |
+
$msg = $this->__('Order not found!');
|
115 |
+
Mage::getSingleton('core/session')->addError($msg);
|
116 |
+
}
|
117 |
+
|
118 |
+
$this->_redirect('adminhtml/sales_order');
|
119 |
+
}
|
120 |
+
|
121 |
+
/**
|
122 |
+
* @return bool
|
123 |
+
*/
|
124 |
+
protected function _isAllowed()
|
125 |
+
{
|
126 |
return true;
|
127 |
+
}
|
128 |
+
|
129 |
}
|
app/code/community/Magmodules/Fadello/etc/adminhtml.xml
CHANGED
@@ -1,31 +1,28 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<!--
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
-
*/
|
22 |
-
-->
|
23 |
<config>
|
24 |
<acl>
|
25 |
<resources>
|
26 |
<admin>
|
27 |
<children>
|
28 |
-
|
29 |
<children>
|
30 |
<config>
|
31 |
<children>
|
@@ -35,9 +32,9 @@
|
|
35 |
</children>
|
36 |
</config>
|
37 |
</children>
|
38 |
-
</system>
|
39 |
</children>
|
40 |
</admin>
|
41 |
</resources>
|
42 |
-
</acl>
|
43 |
</config>
|
1 |
<?xml version="1.0"?>
|
2 |
<!--
|
3 |
+
~ Magmodules.eu - http://www.magmodules.eu
|
4 |
+
~
|
5 |
+
~ NOTICE OF LICENSE
|
6 |
+
~ This source file is subject to the Open Software License (OSL 3.0)
|
7 |
+
~ that is bundled with this package in the file LICENSE.txt.
|
8 |
+
~ It is also available through the world-wide-web at this URL:
|
9 |
+
~ http://opensource.org/licenses/osl-3.0.php
|
10 |
+
~ If you did not receive a copy of the license and are unable to
|
11 |
+
~ obtain it through the world-wide-web, please send an email
|
12 |
+
~ to info@magmodules.eu so we can send you a copy immediately.
|
13 |
+
~
|
14 |
+
~ @category Magmodules
|
15 |
+
~ @package Magmodules_Fadello
|
16 |
+
~ @author Magmodules <info@magmodules.eu>
|
17 |
+
~ @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
~ @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
-->
|
|
|
|
|
|
|
20 |
<config>
|
21 |
<acl>
|
22 |
<resources>
|
23 |
<admin>
|
24 |
<children>
|
25 |
+
<system>
|
26 |
<children>
|
27 |
<config>
|
28 |
<children>
|
32 |
</children>
|
33 |
</config>
|
34 |
</children>
|
35 |
+
</system>
|
36 |
</children>
|
37 |
</admin>
|
38 |
</resources>
|
39 |
+
</acl>
|
40 |
</config>
|
app/code/community/Magmodules/Fadello/etc/config.xml
CHANGED
@@ -1,69 +1,67 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<!--
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
*/
|
22 |
-
-->
|
23 |
<config>
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
<helpers>
|
36 |
<fadello>
|
37 |
<class>Magmodules_Fadello_Helper</class>
|
38 |
</fadello>
|
39 |
-
</helpers>
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
<observers>
|
58 |
<fadello>
|
59 |
<class>fadello/observer</class>
|
60 |
<method>core_block_abstract_to_html_after</method>
|
61 |
</fadello>
|
62 |
</observers>
|
63 |
-
</core_block_abstract_to_html_after>
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
<translate>
|
68 |
<modules>
|
69 |
<magmodules_fadello>
|
@@ -73,24 +71,16 @@
|
|
73 |
</magmodules_fadello>
|
74 |
</modules>
|
75 |
</translate>
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
<observers>
|
87 |
-
<fadello_sales_order_grid_collection_load_before>
|
88 |
-
<model>fadello/observer</model>
|
89 |
-
<method>salesOrderGridCollectionLoadBefore</method>
|
90 |
-
</fadello_sales_order_grid_collection_load_before>
|
91 |
-
</observers>
|
92 |
-
</sales_order_grid_collection_load_before>
|
93 |
-
</events>
|
94 |
</adminhtml>
|
95 |
<admin>
|
96 |
<routers>
|
@@ -103,37 +93,37 @@
|
|
103 |
</adminhtml>
|
104 |
</routers>
|
105 |
</admin>
|
106 |
-
|
107 |
<layout>
|
108 |
<updates>
|
109 |
<fadello>
|
110 |
<file>magmodules_fadello.xml</file>
|
111 |
</fadello>
|
112 |
</updates>
|
113 |
-
</layout>
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
</default>
|
139 |
</config>
|
1 |
<?xml version="1.0"?>
|
2 |
<!--
|
3 |
+
~ Magmodules.eu - http://www.magmodules.eu
|
4 |
+
~
|
5 |
+
~ NOTICE OF LICENSE
|
6 |
+
~ This source file is subject to the Open Software License (OSL 3.0)
|
7 |
+
~ that is bundled with this package in the file LICENSE.txt.
|
8 |
+
~ It is also available through the world-wide-web at this URL:
|
9 |
+
~ http://opensource.org/licenses/osl-3.0.php
|
10 |
+
~ If you did not receive a copy of the license and are unable to
|
11 |
+
~ obtain it through the world-wide-web, please send an email
|
12 |
+
~ to info@magmodules.eu so we can send you a copy immediately.
|
13 |
+
~
|
14 |
+
~ @category Magmodules
|
15 |
+
~ @package Magmodules_Fadello
|
16 |
+
~ @author Magmodules <info@magmodules.eu>
|
17 |
+
~ @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
~ @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
-->
|
20 |
+
|
|
|
|
|
21 |
<config>
|
22 |
+
<modules>
|
23 |
+
<Magmodules_Fadello>
|
24 |
+
<version>1.0.2</version>
|
25 |
+
</Magmodules_Fadello>
|
26 |
+
</modules>
|
27 |
+
<global>
|
28 |
+
<models>
|
29 |
+
<fadello>
|
30 |
+
<class>Magmodules_Fadello_Model</class>
|
31 |
+
</fadello>
|
32 |
+
</models>
|
33 |
<helpers>
|
34 |
<fadello>
|
35 |
<class>Magmodules_Fadello_Helper</class>
|
36 |
</fadello>
|
37 |
+
</helpers>
|
38 |
+
<blocks>
|
39 |
+
<fadello>
|
40 |
+
<class>Magmodules_Fadello_Block</class>
|
41 |
+
</fadello>
|
42 |
+
</blocks>
|
43 |
+
<resources>
|
44 |
+
<fadello_setup>
|
45 |
+
<setup>
|
46 |
+
<module>Magmodules_Fadello</module>
|
47 |
+
</setup>
|
48 |
+
<connection>
|
49 |
+
<use>core_setup</use>
|
50 |
+
</connection>
|
51 |
+
</fadello_setup>
|
52 |
+
</resources>
|
53 |
+
<events>
|
54 |
+
<core_block_abstract_to_html_after>
|
55 |
<observers>
|
56 |
<fadello>
|
57 |
<class>fadello/observer</class>
|
58 |
<method>core_block_abstract_to_html_after</method>
|
59 |
</fadello>
|
60 |
</observers>
|
61 |
+
</core_block_abstract_to_html_after>
|
62 |
+
</events>
|
63 |
+
</global>
|
64 |
+
<adminhtml>
|
65 |
<translate>
|
66 |
<modules>
|
67 |
<magmodules_fadello>
|
71 |
</magmodules_fadello>
|
72 |
</modules>
|
73 |
</translate>
|
74 |
+
<events>
|
75 |
+
<core_block_abstract_prepare_layout_before>
|
76 |
+
<observers>
|
77 |
+
<fadello_core_block_abstract_prepare_layout_before>
|
78 |
+
<class>fadello/observer</class>
|
79 |
+
<method>addDataToOrderGrid</method>
|
80 |
+
</fadello_core_block_abstract_prepare_layout_before>
|
81 |
+
</observers>
|
82 |
+
</core_block_abstract_prepare_layout_before>
|
83 |
+
</events>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
</adminhtml>
|
85 |
<admin>
|
86 |
<routers>
|
93 |
</adminhtml>
|
94 |
</routers>
|
95 |
</admin>
|
96 |
+
<frontend>
|
97 |
<layout>
|
98 |
<updates>
|
99 |
<fadello>
|
100 |
<file>magmodules_fadello.xml</file>
|
101 |
</fadello>
|
102 |
</updates>
|
103 |
+
</layout>
|
104 |
+
</frontend>
|
105 |
+
<default>
|
106 |
+
<shipping>
|
107 |
+
<fadello>
|
108 |
+
<cutoff_time>13:00</cutoff_time>
|
109 |
+
<cutoff_time>13:00-16:00</cutoff_time>
|
110 |
+
<cutoff_time>18:00-22:30</cutoff_time>
|
111 |
+
<pu_country>NL</pu_country>
|
112 |
+
<show_all_shipments>0</show_all_shipments>
|
113 |
+
<after_cutoff>0</after_cutoff>
|
114 |
+
<seperate_homenumber>0</seperate_homenumber>
|
115 |
+
</fadello>
|
116 |
+
</shipping>
|
117 |
+
<carriers>
|
118 |
+
<fadello>
|
119 |
+
<active>1</active>
|
120 |
+
<model>Magmodules_Fadello_Model_Carrier_ShippingMethod</model>
|
121 |
+
<name>Standaard gratis verzending</name>
|
122 |
+
<specificerrmsg>This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.</specificerrmsg>
|
123 |
+
<sallowspecific>1</sallowspecific>
|
124 |
+
<specificcountry>NL</specificcountry>
|
125 |
+
<sort_order>10</sort_order>
|
126 |
+
</fadello>
|
127 |
+
</carriers>
|
128 |
+
</default>
|
129 |
</config>
|
app/code/community/Magmodules/Fadello/etc/system.xml
CHANGED
@@ -1,42 +1,39 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<!--
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
-
*/
|
22 |
-
-->
|
23 |
<config>
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
<groups>
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
<fields>
|
41 |
<about_heading translate="label">
|
42 |
<label>About the Extension</label>
|
@@ -45,16 +42,16 @@
|
|
45 |
<show_in_default>1</show_in_default>
|
46 |
<show_in_website>1</show_in_website>
|
47 |
<show_in_store>1</show_in_store>
|
48 |
-
</about_heading>
|
49 |
-
|
50 |
<label><![CDATA[<p>This extension is developed by <a href="http://www.magmodules.eu/">Magmodules</a>. We are a Magento only E-commerce Agency located in the Netherlands.<br></p><p><strong>Read everything about the extension configuration in our <a href="https://www.magmodules.eu/help/fadello" target="_blank">Knowledgebase.</a></strong></p>]]></label>
|
51 |
<frontend_model>fadello/adminhtml_system_config_form_field_note</frontend_model>
|
52 |
<sort_order>2</sort_order>
|
53 |
<show_in_default>1</show_in_default>
|
54 |
<show_in_website>1</show_in_website>
|
55 |
-
<show_in_store>1</show_in_store>
|
56 |
-
</about_note>
|
57 |
-
|
58 |
<extension_heading translate="label">
|
59 |
<label>General Settings</label>
|
60 |
<frontend_model>fadello/adminhtml_system_config_form_field_heading</frontend_model>
|
@@ -62,7 +59,7 @@
|
|
62 |
<show_in_default>1</show_in_default>
|
63 |
<show_in_website>1</show_in_website>
|
64 |
<show_in_store>1</show_in_store>
|
65 |
-
</extension_heading>
|
66 |
<version translate="label">
|
67 |
<label>Extension Version</label>
|
68 |
<frontend_type>text</frontend_type>
|
@@ -71,7 +68,7 @@
|
|
71 |
<show_in_default>1</show_in_default>
|
72 |
<show_in_website>0</show_in_website>
|
73 |
<show_in_store>0</show_in_store>
|
74 |
-
</version>
|
75 |
<enabled translate="label">
|
76 |
<label>Enabled</label>
|
77 |
<frontend_type>select</frontend_type>
|
@@ -88,15 +85,15 @@
|
|
88 |
<show_in_default>1</show_in_default>
|
89 |
<show_in_website>1</show_in_website>
|
90 |
<show_in_store>1</show_in_store>
|
91 |
-
</api_heading>
|
92 |
-
|
93 |
<label><![CDATA[<p>Enter the API details as supplied by Fadello.<br>Note that Fadello has seperate API keys depending on live and testing environment.</p><br/>]]></label>
|
94 |
<frontend_model>fadello/adminhtml_system_config_form_field_note</frontend_model>
|
95 |
<sort_order>21</sort_order>
|
96 |
<show_in_default>1</show_in_default>
|
97 |
<show_in_website>1</show_in_website>
|
98 |
-
<show_in_store>1</show_in_store>
|
99 |
-
</api_note>
|
100 |
<api_id translate="label">
|
101 |
<label>API ID</label>
|
102 |
<frontend_type>text</frontend_type>
|
@@ -104,7 +101,7 @@
|
|
104 |
<show_in_default>1</show_in_default>
|
105 |
<show_in_website>1</show_in_website>
|
106 |
<show_in_store>1</show_in_store>
|
107 |
-
</api_id>
|
108 |
<api_token translate="label">
|
109 |
<label>API Key</label>
|
110 |
<frontend_type>text</frontend_type>
|
@@ -121,14 +118,14 @@
|
|
121 |
<show_in_website>1</show_in_website>
|
122 |
<show_in_store>1</show_in_store>
|
123 |
</shipping_heading>
|
124 |
-
|
125 |
<label><![CDATA[<p>Enter the Cut Off, Pickup and Delivery Time as supplies by Fadello.<br>Note that these settings needs to correspond with the settings in the Fadello dashboard.<br>See the tooltip for default values and representation.</p><br/>]]></label>
|
126 |
<frontend_model>fadello/adminhtml_system_config_form_field_note</frontend_model>
|
127 |
<sort_order>31</sort_order>
|
128 |
<show_in_default>1</show_in_default>
|
129 |
<show_in_website>1</show_in_website>
|
130 |
-
<show_in_store>1</show_in_store>
|
131 |
-
</shipping_note>
|
132 |
<cutoff_time translate="label">
|
133 |
<label>Cut Off Time</label>
|
134 |
<frontend_type>text</frontend_type>
|
@@ -137,7 +134,7 @@
|
|
137 |
<show_in_website>1</show_in_website>
|
138 |
<show_in_store>1</show_in_store>
|
139 |
<tooltip>Data as supplied by Fadello, eg. 13:00</tooltip>
|
140 |
-
</cutoff_time>
|
141 |
<pickup_time translate="label">
|
142 |
<label>Pickup Time</label>
|
143 |
<frontend_type>text</frontend_type>
|
@@ -146,7 +143,7 @@
|
|
146 |
<show_in_website>1</show_in_website>
|
147 |
<show_in_store>1</show_in_store>
|
148 |
<tooltip>Data as supplied by Fadello, eg. 13:00-16:00</tooltip>
|
149 |
-
</pickup_time>
|
150 |
<delivery_time translate="label">
|
151 |
<label>Delivery Time</label>
|
152 |
<frontend_type>text</frontend_type>
|
@@ -155,7 +152,7 @@
|
|
155 |
<show_in_website>1</show_in_website>
|
156 |
<show_in_store>1</show_in_store>
|
157 |
<tooltip>Data as supplied by Fadello, eg. 18:00-22:30</tooltip>
|
158 |
-
</delivery_time>
|
159 |
<sender_heading translate="label">
|
160 |
<label>Pickup / Label Information</label>
|
161 |
<frontend_model>fadello/adminhtml_system_config_form_field_heading</frontend_model>
|
@@ -164,14 +161,14 @@
|
|
164 |
<show_in_website>1</show_in_website>
|
165 |
<show_in_store>1</show_in_store>
|
166 |
</sender_heading>
|
167 |
-
|
168 |
<label><![CDATA[<p>Enter the pickup information for the packages. This data will also be used on the shipping labels.</p><br/>]]></label>
|
169 |
<frontend_model>fadello/adminhtml_system_config_form_field_note</frontend_model>
|
170 |
<sort_order>41</sort_order>
|
171 |
<show_in_default>1</show_in_default>
|
172 |
<show_in_website>1</show_in_website>
|
173 |
-
<show_in_store>1</show_in_store>
|
174 |
-
</sender_note>
|
175 |
<pu_name translate="label">
|
176 |
<label>Company Name</label>
|
177 |
<frontend_type>text</frontend_type>
|
@@ -179,7 +176,7 @@
|
|
179 |
<show_in_default>1</show_in_default>
|
180 |
<show_in_website>1</show_in_website>
|
181 |
<show_in_store>1</show_in_store>
|
182 |
-
</pu_name>
|
183 |
<pu_street translate="label">
|
184 |
<label>Street</label>
|
185 |
<frontend_type>text</frontend_type>
|
@@ -187,7 +184,7 @@
|
|
187 |
<show_in_default>1</show_in_default>
|
188 |
<show_in_website>1</show_in_website>
|
189 |
<show_in_store>1</show_in_store>
|
190 |
-
</pu_street>
|
191 |
<pu_homeno translate="label">
|
192 |
<label>Home Number</label>
|
193 |
<frontend_type>text</frontend_type>
|
@@ -195,7 +192,7 @@
|
|
195 |
<show_in_default>1</show_in_default>
|
196 |
<show_in_website>1</show_in_website>
|
197 |
<show_in_store>1</show_in_store>
|
198 |
-
</pu_homeno>
|
199 |
<pu_homeno_add translate="label">
|
200 |
<label>Home Number Addition</label>
|
201 |
<frontend_type>text</frontend_type>
|
@@ -203,7 +200,7 @@
|
|
203 |
<show_in_default>1</show_in_default>
|
204 |
<show_in_website>1</show_in_website>
|
205 |
<show_in_store>1</show_in_store>
|
206 |
-
</pu_homeno_add>
|
207 |
<pu_postalcode translate="label">
|
208 |
<label>Postalcode</label>
|
209 |
<frontend_type>text</frontend_type>
|
@@ -211,7 +208,7 @@
|
|
211 |
<show_in_default>1</show_in_default>
|
212 |
<show_in_website>1</show_in_website>
|
213 |
<show_in_store>1</show_in_store>
|
214 |
-
</pu_postalcode>
|
215 |
<pu_city translate="label">
|
216 |
<label>City</label>
|
217 |
<frontend_type>text</frontend_type>
|
@@ -219,16 +216,16 @@
|
|
219 |
<show_in_default>1</show_in_default>
|
220 |
<show_in_website>1</show_in_website>
|
221 |
<show_in_store>1</show_in_store>
|
222 |
-
</pu_city>
|
223 |
<pu_country translate="label">
|
224 |
<label>Country</label>
|
225 |
<frontend_type>select</frontend_type>
|
226 |
-
|
227 |
<sort_order>48</sort_order>
|
228 |
<show_in_default>1</show_in_default>
|
229 |
<show_in_website>1</show_in_website>
|
230 |
<show_in_store>1</show_in_store>
|
231 |
-
</pu_country>
|
232 |
<pu_phone translate="label">
|
233 |
<label>Telephone</label>
|
234 |
<frontend_type>text</frontend_type>
|
@@ -236,7 +233,7 @@
|
|
236 |
<show_in_default>1</show_in_default>
|
237 |
<show_in_website>1</show_in_website>
|
238 |
<show_in_store>1</show_in_store>
|
239 |
-
</pu_phone>
|
240 |
<pu_email translate="label">
|
241 |
<label>Email</label>
|
242 |
<frontend_type>text</frontend_type>
|
@@ -244,7 +241,7 @@
|
|
244 |
<show_in_default>1</show_in_default>
|
245 |
<show_in_website>1</show_in_website>
|
246 |
<show_in_store>1</show_in_store>
|
247 |
-
</pu_email>
|
248 |
<general_heading translate="label">
|
249 |
<label>General Settings</label>
|
250 |
<frontend_model>fadello/adminhtml_system_config_form_field_heading</frontend_model>
|
@@ -252,7 +249,7 @@
|
|
252 |
<show_in_default>1</show_in_default>
|
253 |
<show_in_website>1</show_in_website>
|
254 |
<show_in_store>1</show_in_store>
|
255 |
-
</general_heading>
|
256 |
<seperate_homenumber translate="label">
|
257 |
<label>Home Number on second street</label>
|
258 |
<frontend_type>select</frontend_type>
|
@@ -272,7 +269,7 @@
|
|
272 |
<show_in_website>1</show_in_website>
|
273 |
<show_in_store>1</show_in_store>
|
274 |
<tooltip>Enable this function to create shipments for next day. Will be available one hour after Cut Off Time.</tooltip>
|
275 |
-
</after_cutoff>
|
276 |
<show_all_shipments translate="label">
|
277 |
<label>Allow Shipment for non-Fadello orders</label>
|
278 |
<frontend_type>select</frontend_type>
|
@@ -282,20 +279,20 @@
|
|
282 |
<show_in_website>0</show_in_website>
|
283 |
<show_in_store>0</show_in_store>
|
284 |
<tooltip>Enable this function to create shipments in depend of the selected shipment carrier.</tooltip>
|
285 |
-
</show_all_shipments>
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
<fields>
|
300 |
<active translate="label">
|
301 |
<label>Enabled</label>
|
@@ -330,7 +327,7 @@
|
|
330 |
<show_in_default>1</show_in_default>
|
331 |
<show_in_website>1</show_in_website>
|
332 |
<show_in_store>0</show_in_store>
|
333 |
-
</sort_order>
|
334 |
<price_heading translate="label">
|
335 |
<label>Pricing</label>
|
336 |
<frontend_model>fadello/adminhtml_system_config_form_field_heading</frontend_model>
|
@@ -339,23 +336,23 @@
|
|
339 |
<show_in_website>1</show_in_website>
|
340 |
<show_in_store>1</show_in_store>
|
341 |
</price_heading>
|
342 |
-
|
343 |
<label><![CDATA[<p>Set the shipping price rules by using a from and to price.<br>For eg. a €5.00 shipping price for all orders under €100.00 needs to be configured with the start price of 0.00 and the end price of 100.00.</p><br/>]]></label>
|
344 |
<frontend_model>fadello/adminhtml_system_config_form_field_note</frontend_model>
|
345 |
<sort_order>11</sort_order>
|
346 |
<show_in_default>1</show_in_default>
|
347 |
<show_in_website>1</show_in_website>
|
348 |
-
<show_in_store>1</show_in_store>
|
349 |
-
</price_note>
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
<availability_heading translate="label">
|
360 |
<label>Availability</label>
|
361 |
<frontend_model>fadello/adminhtml_system_config_form_field_heading</frontend_model>
|
@@ -363,24 +360,24 @@
|
|
363 |
<show_in_default>1</show_in_default>
|
364 |
<show_in_website>1</show_in_website>
|
365 |
<show_in_store>1</show_in_store>
|
366 |
-
</availability_heading>
|
367 |
-
|
368 |
<label><![CDATA[<p>Set the availability and naming of the method based on time and day.<br>For eg. offer Sameday Delivery on weekdays before 13:00 and offer Nextday Evening Delivery between 13:00 and 23:59.<br>You can use different descriptions for these timespans, like: "Maandagavond levering 18:00-22:30".</p><br/>]]></label>
|
369 |
<frontend_model>fadello/adminhtml_system_config_form_field_note</frontend_model>
|
370 |
<sort_order>31</sort_order>
|
371 |
<show_in_default>1</show_in_default>
|
372 |
<show_in_website>1</show_in_website>
|
373 |
-
<show_in_store>1</show_in_store>
|
374 |
-
</availability_note>
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
<heading_sort translate="label">
|
385 |
<label>Limitations</label>
|
386 |
<frontend_model>fadello/adminhtml_system_config_form_field_heading</frontend_model>
|
@@ -388,7 +385,7 @@
|
|
388 |
<show_in_default>1</show_in_default>
|
389 |
<show_in_website>1</show_in_website>
|
390 |
<show_in_store>1</show_in_store>
|
391 |
-
</heading_sort>
|
392 |
<weight translate="label">
|
393 |
<label>Maximum weight</label>
|
394 |
<frontend_type>text</frontend_type>
|
@@ -397,7 +394,17 @@
|
|
397 |
<show_in_website>1</show_in_website>
|
398 |
<show_in_store>1</show_in_store>
|
399 |
<tooltip>Fill in the Maximum weight of a shipment with the same data format as used in the Products.</tooltip>
|
400 |
-
</weight>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
401 |
<showmethod translate="label">
|
402 |
<label>Show Method if Not Applicable</label>
|
403 |
<frontend_type>select</frontend_type>
|
@@ -414,10 +421,10 @@
|
|
414 |
<show_in_default>1</show_in_default>
|
415 |
<show_in_website>1</show_in_website>
|
416 |
<show_in_store>1</show_in_store>
|
417 |
-
</specificerrmsg>
|
418 |
</fields>
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
</config>
|
1 |
<?xml version="1.0"?>
|
2 |
<!--
|
3 |
+
~ Magmodules.eu - http://www.magmodules.eu
|
4 |
+
~
|
5 |
+
~ NOTICE OF LICENSE
|
6 |
+
~ This source file is subject to the Open Software License (OSL 3.0)
|
7 |
+
~ that is bundled with this package in the file LICENSE.txt.
|
8 |
+
~ It is also available through the world-wide-web at this URL:
|
9 |
+
~ http://opensource.org/licenses/osl-3.0.php
|
10 |
+
~ If you did not receive a copy of the license and are unable to
|
11 |
+
~ obtain it through the world-wide-web, please send an email
|
12 |
+
~ to info@magmodules.eu so we can send you a copy immediately.
|
13 |
+
~
|
14 |
+
~ @category Magmodules
|
15 |
+
~ @package Magmodules_Fadello
|
16 |
+
~ @author Magmodules <info@magmodules.eu>
|
17 |
+
~ @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
~ @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
-->
|
|
|
|
|
|
|
20 |
<config>
|
21 |
+
<tabs>
|
22 |
+
<magmodules translate="label" module="fadello">
|
23 |
+
<label>Magmodules</label>
|
24 |
+
<sort_order>200</sort_order>
|
25 |
+
</magmodules>
|
26 |
+
</tabs>
|
27 |
+
<sections>
|
28 |
+
<shipping>
|
29 |
<groups>
|
30 |
+
<fadello translate="label" module="fadello">
|
31 |
+
<label>Fadello - Same Day Delivery</label>
|
32 |
+
<frontend_type>text</frontend_type>
|
33 |
+
<sort_order>103</sort_order>
|
34 |
+
<show_in_default>1</show_in_default>
|
35 |
+
<show_in_website>1</show_in_website>
|
36 |
+
<show_in_store>1</show_in_store>
|
37 |
<fields>
|
38 |
<about_heading translate="label">
|
39 |
<label>About the Extension</label>
|
42 |
<show_in_default>1</show_in_default>
|
43 |
<show_in_website>1</show_in_website>
|
44 |
<show_in_store>1</show_in_store>
|
45 |
+
</about_heading>
|
46 |
+
<about_note translate="label">
|
47 |
<label><![CDATA[<p>This extension is developed by <a href="http://www.magmodules.eu/">Magmodules</a>. We are a Magento only E-commerce Agency located in the Netherlands.<br></p><p><strong>Read everything about the extension configuration in our <a href="https://www.magmodules.eu/help/fadello" target="_blank">Knowledgebase.</a></strong></p>]]></label>
|
48 |
<frontend_model>fadello/adminhtml_system_config_form_field_note</frontend_model>
|
49 |
<sort_order>2</sort_order>
|
50 |
<show_in_default>1</show_in_default>
|
51 |
<show_in_website>1</show_in_website>
|
52 |
+
<show_in_store>1</show_in_store>
|
53 |
+
</about_note>
|
54 |
+
|
55 |
<extension_heading translate="label">
|
56 |
<label>General Settings</label>
|
57 |
<frontend_model>fadello/adminhtml_system_config_form_field_heading</frontend_model>
|
59 |
<show_in_default>1</show_in_default>
|
60 |
<show_in_website>1</show_in_website>
|
61 |
<show_in_store>1</show_in_store>
|
62 |
+
</extension_heading>
|
63 |
<version translate="label">
|
64 |
<label>Extension Version</label>
|
65 |
<frontend_type>text</frontend_type>
|
68 |
<show_in_default>1</show_in_default>
|
69 |
<show_in_website>0</show_in_website>
|
70 |
<show_in_store>0</show_in_store>
|
71 |
+
</version>
|
72 |
<enabled translate="label">
|
73 |
<label>Enabled</label>
|
74 |
<frontend_type>select</frontend_type>
|
85 |
<show_in_default>1</show_in_default>
|
86 |
<show_in_website>1</show_in_website>
|
87 |
<show_in_store>1</show_in_store>
|
88 |
+
</api_heading>
|
89 |
+
<api_note translate="label">
|
90 |
<label><![CDATA[<p>Enter the API details as supplied by Fadello.<br>Note that Fadello has seperate API keys depending on live and testing environment.</p><br/>]]></label>
|
91 |
<frontend_model>fadello/adminhtml_system_config_form_field_note</frontend_model>
|
92 |
<sort_order>21</sort_order>
|
93 |
<show_in_default>1</show_in_default>
|
94 |
<show_in_website>1</show_in_website>
|
95 |
+
<show_in_store>1</show_in_store>
|
96 |
+
</api_note>
|
97 |
<api_id translate="label">
|
98 |
<label>API ID</label>
|
99 |
<frontend_type>text</frontend_type>
|
101 |
<show_in_default>1</show_in_default>
|
102 |
<show_in_website>1</show_in_website>
|
103 |
<show_in_store>1</show_in_store>
|
104 |
+
</api_id>
|
105 |
<api_token translate="label">
|
106 |
<label>API Key</label>
|
107 |
<frontend_type>text</frontend_type>
|
118 |
<show_in_website>1</show_in_website>
|
119 |
<show_in_store>1</show_in_store>
|
120 |
</shipping_heading>
|
121 |
+
<shipping_note translate="label">
|
122 |
<label><![CDATA[<p>Enter the Cut Off, Pickup and Delivery Time as supplies by Fadello.<br>Note that these settings needs to correspond with the settings in the Fadello dashboard.<br>See the tooltip for default values and representation.</p><br/>]]></label>
|
123 |
<frontend_model>fadello/adminhtml_system_config_form_field_note</frontend_model>
|
124 |
<sort_order>31</sort_order>
|
125 |
<show_in_default>1</show_in_default>
|
126 |
<show_in_website>1</show_in_website>
|
127 |
+
<show_in_store>1</show_in_store>
|
128 |
+
</shipping_note>
|
129 |
<cutoff_time translate="label">
|
130 |
<label>Cut Off Time</label>
|
131 |
<frontend_type>text</frontend_type>
|
134 |
<show_in_website>1</show_in_website>
|
135 |
<show_in_store>1</show_in_store>
|
136 |
<tooltip>Data as supplied by Fadello, eg. 13:00</tooltip>
|
137 |
+
</cutoff_time>
|
138 |
<pickup_time translate="label">
|
139 |
<label>Pickup Time</label>
|
140 |
<frontend_type>text</frontend_type>
|
143 |
<show_in_website>1</show_in_website>
|
144 |
<show_in_store>1</show_in_store>
|
145 |
<tooltip>Data as supplied by Fadello, eg. 13:00-16:00</tooltip>
|
146 |
+
</pickup_time>
|
147 |
<delivery_time translate="label">
|
148 |
<label>Delivery Time</label>
|
149 |
<frontend_type>text</frontend_type>
|
152 |
<show_in_website>1</show_in_website>
|
153 |
<show_in_store>1</show_in_store>
|
154 |
<tooltip>Data as supplied by Fadello, eg. 18:00-22:30</tooltip>
|
155 |
+
</delivery_time>
|
156 |
<sender_heading translate="label">
|
157 |
<label>Pickup / Label Information</label>
|
158 |
<frontend_model>fadello/adminhtml_system_config_form_field_heading</frontend_model>
|
161 |
<show_in_website>1</show_in_website>
|
162 |
<show_in_store>1</show_in_store>
|
163 |
</sender_heading>
|
164 |
+
<sender_note translate="label">
|
165 |
<label><![CDATA[<p>Enter the pickup information for the packages. This data will also be used on the shipping labels.</p><br/>]]></label>
|
166 |
<frontend_model>fadello/adminhtml_system_config_form_field_note</frontend_model>
|
167 |
<sort_order>41</sort_order>
|
168 |
<show_in_default>1</show_in_default>
|
169 |
<show_in_website>1</show_in_website>
|
170 |
+
<show_in_store>1</show_in_store>
|
171 |
+
</sender_note>
|
172 |
<pu_name translate="label">
|
173 |
<label>Company Name</label>
|
174 |
<frontend_type>text</frontend_type>
|
176 |
<show_in_default>1</show_in_default>
|
177 |
<show_in_website>1</show_in_website>
|
178 |
<show_in_store>1</show_in_store>
|
179 |
+
</pu_name>
|
180 |
<pu_street translate="label">
|
181 |
<label>Street</label>
|
182 |
<frontend_type>text</frontend_type>
|
184 |
<show_in_default>1</show_in_default>
|
185 |
<show_in_website>1</show_in_website>
|
186 |
<show_in_store>1</show_in_store>
|
187 |
+
</pu_street>
|
188 |
<pu_homeno translate="label">
|
189 |
<label>Home Number</label>
|
190 |
<frontend_type>text</frontend_type>
|
192 |
<show_in_default>1</show_in_default>
|
193 |
<show_in_website>1</show_in_website>
|
194 |
<show_in_store>1</show_in_store>
|
195 |
+
</pu_homeno>
|
196 |
<pu_homeno_add translate="label">
|
197 |
<label>Home Number Addition</label>
|
198 |
<frontend_type>text</frontend_type>
|
200 |
<show_in_default>1</show_in_default>
|
201 |
<show_in_website>1</show_in_website>
|
202 |
<show_in_store>1</show_in_store>
|
203 |
+
</pu_homeno_add>
|
204 |
<pu_postalcode translate="label">
|
205 |
<label>Postalcode</label>
|
206 |
<frontend_type>text</frontend_type>
|
208 |
<show_in_default>1</show_in_default>
|
209 |
<show_in_website>1</show_in_website>
|
210 |
<show_in_store>1</show_in_store>
|
211 |
+
</pu_postalcode>
|
212 |
<pu_city translate="label">
|
213 |
<label>City</label>
|
214 |
<frontend_type>text</frontend_type>
|
216 |
<show_in_default>1</show_in_default>
|
217 |
<show_in_website>1</show_in_website>
|
218 |
<show_in_store>1</show_in_store>
|
219 |
+
</pu_city>
|
220 |
<pu_country translate="label">
|
221 |
<label>Country</label>
|
222 |
<frontend_type>select</frontend_type>
|
223 |
+
<source_model>adminhtml/system_config_source_country</source_model>
|
224 |
<sort_order>48</sort_order>
|
225 |
<show_in_default>1</show_in_default>
|
226 |
<show_in_website>1</show_in_website>
|
227 |
<show_in_store>1</show_in_store>
|
228 |
+
</pu_country>
|
229 |
<pu_phone translate="label">
|
230 |
<label>Telephone</label>
|
231 |
<frontend_type>text</frontend_type>
|
233 |
<show_in_default>1</show_in_default>
|
234 |
<show_in_website>1</show_in_website>
|
235 |
<show_in_store>1</show_in_store>
|
236 |
+
</pu_phone>
|
237 |
<pu_email translate="label">
|
238 |
<label>Email</label>
|
239 |
<frontend_type>text</frontend_type>
|
241 |
<show_in_default>1</show_in_default>
|
242 |
<show_in_website>1</show_in_website>
|
243 |
<show_in_store>1</show_in_store>
|
244 |
+
</pu_email>
|
245 |
<general_heading translate="label">
|
246 |
<label>General Settings</label>
|
247 |
<frontend_model>fadello/adminhtml_system_config_form_field_heading</frontend_model>
|
249 |
<show_in_default>1</show_in_default>
|
250 |
<show_in_website>1</show_in_website>
|
251 |
<show_in_store>1</show_in_store>
|
252 |
+
</general_heading>
|
253 |
<seperate_homenumber translate="label">
|
254 |
<label>Home Number on second street</label>
|
255 |
<frontend_type>select</frontend_type>
|
269 |
<show_in_website>1</show_in_website>
|
270 |
<show_in_store>1</show_in_store>
|
271 |
<tooltip>Enable this function to create shipments for next day. Will be available one hour after Cut Off Time.</tooltip>
|
272 |
+
</after_cutoff>
|
273 |
<show_all_shipments translate="label">
|
274 |
<label>Allow Shipment for non-Fadello orders</label>
|
275 |
<frontend_type>select</frontend_type>
|
279 |
<show_in_website>0</show_in_website>
|
280 |
<show_in_store>0</show_in_store>
|
281 |
<tooltip>Enable this function to create shipments in depend of the selected shipment carrier.</tooltip>
|
282 |
+
</show_all_shipments>
|
283 |
+
</fields>
|
284 |
+
</fadello>
|
285 |
+
</groups>
|
286 |
+
</shipping>
|
287 |
+
<carriers>
|
288 |
+
<groups>
|
289 |
+
<fadello translate="label" module="fadello">
|
290 |
+
<label>Fadello - Same Day Delivery</label>
|
291 |
+
<frontend_type>text</frontend_type>
|
292 |
+
<sort_order>103</sort_order>
|
293 |
+
<show_in_default>1</show_in_default>
|
294 |
+
<show_in_website>1</show_in_website>
|
295 |
+
<show_in_store>1</show_in_store>
|
296 |
<fields>
|
297 |
<active translate="label">
|
298 |
<label>Enabled</label>
|
327 |
<show_in_default>1</show_in_default>
|
328 |
<show_in_website>1</show_in_website>
|
329 |
<show_in_store>0</show_in_store>
|
330 |
+
</sort_order>
|
331 |
<price_heading translate="label">
|
332 |
<label>Pricing</label>
|
333 |
<frontend_model>fadello/adminhtml_system_config_form_field_heading</frontend_model>
|
336 |
<show_in_website>1</show_in_website>
|
337 |
<show_in_store>1</show_in_store>
|
338 |
</price_heading>
|
339 |
+
<price_note translate="label">
|
340 |
<label><![CDATA[<p>Set the shipping price rules by using a from and to price.<br>For eg. a €5.00 shipping price for all orders under €100.00 needs to be configured with the start price of 0.00 and the end price of 100.00.</p><br/>]]></label>
|
341 |
<frontend_model>fadello/adminhtml_system_config_form_field_note</frontend_model>
|
342 |
<sort_order>11</sort_order>
|
343 |
<show_in_default>1</show_in_default>
|
344 |
<show_in_website>1</show_in_website>
|
345 |
+
<show_in_store>1</show_in_store>
|
346 |
+
</price_note>
|
347 |
+
<shipping_price>
|
348 |
+
<label>Shipping Price</label>
|
349 |
+
<frontend_model>fadello/adminhtml_config_form_field_shipping</frontend_model>
|
350 |
+
<backend_model>fadello/adminhtml_system_config_backend_design_shipping</backend_model>
|
351 |
+
<sort_order>12</sort_order>
|
352 |
+
<show_in_default>1</show_in_default>
|
353 |
+
<show_in_website>1</show_in_website>
|
354 |
+
<show_in_store>1</show_in_store>
|
355 |
+
</shipping_price>
|
356 |
<availability_heading translate="label">
|
357 |
<label>Availability</label>
|
358 |
<frontend_model>fadello/adminhtml_system_config_form_field_heading</frontend_model>
|
360 |
<show_in_default>1</show_in_default>
|
361 |
<show_in_website>1</show_in_website>
|
362 |
<show_in_store>1</show_in_store>
|
363 |
+
</availability_heading>
|
364 |
+
<availability_note translate="label">
|
365 |
<label><![CDATA[<p>Set the availability and naming of the method based on time and day.<br>For eg. offer Sameday Delivery on weekdays before 13:00 and offer Nextday Evening Delivery between 13:00 and 23:59.<br>You can use different descriptions for these timespans, like: "Maandagavond levering 18:00-22:30".</p><br/>]]></label>
|
366 |
<frontend_model>fadello/adminhtml_system_config_form_field_note</frontend_model>
|
367 |
<sort_order>31</sort_order>
|
368 |
<show_in_default>1</show_in_default>
|
369 |
<show_in_website>1</show_in_website>
|
370 |
+
<show_in_store>1</show_in_store>
|
371 |
+
</availability_note>
|
372 |
+
<availability>
|
373 |
+
<label>Method Availability</label>
|
374 |
+
<frontend_model>fadello/adminhtml_config_form_field_availability</frontend_model>
|
375 |
+
<backend_model>fadello/adminhtml_system_config_backend_design_availability</backend_model>
|
376 |
+
<sort_order>32</sort_order>
|
377 |
+
<show_in_default>1</show_in_default>
|
378 |
+
<show_in_website>1</show_in_website>
|
379 |
+
<show_in_store>1</show_in_store>
|
380 |
+
</availability>
|
381 |
<heading_sort translate="label">
|
382 |
<label>Limitations</label>
|
383 |
<frontend_model>fadello/adminhtml_system_config_form_field_heading</frontend_model>
|
385 |
<show_in_default>1</show_in_default>
|
386 |
<show_in_website>1</show_in_website>
|
387 |
<show_in_store>1</show_in_store>
|
388 |
+
</heading_sort>
|
389 |
<weight translate="label">
|
390 |
<label>Maximum weight</label>
|
391 |
<frontend_type>text</frontend_type>
|
394 |
<show_in_website>1</show_in_website>
|
395 |
<show_in_store>1</show_in_store>
|
396 |
<tooltip>Fill in the Maximum weight of a shipment with the same data format as used in the Products.</tooltip>
|
397 |
+
</weight>
|
398 |
+
<stock_check translate="label">
|
399 |
+
<label>In Stock Check</label>
|
400 |
+
<frontend_type>select</frontend_type>
|
401 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
402 |
+
<sort_order>92</sort_order>
|
403 |
+
<show_in_default>1</show_in_default>
|
404 |
+
<show_in_website>1</show_in_website>
|
405 |
+
<show_in_store>1</show_in_store>
|
406 |
+
<tooltip>Only show method when complete cart is in stock based on quantity & stock status.</tooltip>
|
407 |
+
</stock_check>
|
408 |
<showmethod translate="label">
|
409 |
<label>Show Method if Not Applicable</label>
|
410 |
<frontend_type>select</frontend_type>
|
421 |
<show_in_default>1</show_in_default>
|
422 |
<show_in_website>1</show_in_website>
|
423 |
<show_in_store>1</show_in_store>
|
424 |
+
</specificerrmsg>
|
425 |
</fields>
|
426 |
+
</fadello>
|
427 |
+
</groups>
|
428 |
+
</carriers>
|
429 |
+
</sections>
|
430 |
</config>
|
app/code/community/Magmodules/Fadello/sql/fadello_setup/mysql4-install-0.9.0.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
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:
|
@@ -12,55 +11,66 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
$installer = new Mage_Sales_Model_Mysql4_Setup('core_setup');
|
23 |
$installer->startSetup();
|
24 |
|
25 |
-
$installer->addAttribute(
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
|
|
|
|
34 |
|
35 |
-
$installer->addAttribute(
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
|
|
|
|
44 |
|
45 |
-
$installer->addAttribute(
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
|
|
|
|
54 |
|
55 |
-
$installer->addAttribute(
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
|
|
|
|
64 |
|
65 |
-
$installer->getConnection()->addColumn(
|
|
|
|
|
|
|
66 |
$installer->endSetup();
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Fadello
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
+
|
21 |
$installer = new Mage_Sales_Model_Mysql4_Setup('core_setup');
|
22 |
$installer->startSetup();
|
23 |
|
24 |
+
$installer->addAttribute(
|
25 |
+
'order', 'fadello_trans_id', array(
|
26 |
+
'type' => 'varchar',
|
27 |
+
'default' => null,
|
28 |
+
'label' => 'Fadello: TransID',
|
29 |
+
'visible' => false,
|
30 |
+
'required' => false,
|
31 |
+
'visible_on_front' => false,
|
32 |
+
'user_defined' => false,
|
33 |
+
)
|
34 |
+
);
|
35 |
|
36 |
+
$installer->addAttribute(
|
37 |
+
'order', 'fadello_deliver_id', array(
|
38 |
+
'type' => 'varchar',
|
39 |
+
'default' => null,
|
40 |
+
'label' => 'Fadello: TransDeliverID',
|
41 |
+
'visible' => false,
|
42 |
+
'required' => false,
|
43 |
+
'visible_on_front' => false,
|
44 |
+
'user_defined' => false,
|
45 |
+
)
|
46 |
+
);
|
47 |
|
48 |
+
$installer->addAttribute(
|
49 |
+
'order', 'fadello_barcode', array(
|
50 |
+
'type' => 'varchar',
|
51 |
+
'default' => null,
|
52 |
+
'label' => 'Fadello: Barcode',
|
53 |
+
'visible' => false,
|
54 |
+
'required' => false,
|
55 |
+
'visible_on_front' => false,
|
56 |
+
'user_defined' => false,
|
57 |
+
)
|
58 |
+
);
|
59 |
|
60 |
+
$installer->addAttribute(
|
61 |
+
'order', 'fadello_status', array(
|
62 |
+
'type' => 'varchar',
|
63 |
+
'default' => null,
|
64 |
+
'label' => 'Fadello: Status',
|
65 |
+
'visible' => false,
|
66 |
+
'required' => false,
|
67 |
+
'visible_on_front' => false,
|
68 |
+
'user_defined' => false,
|
69 |
+
)
|
70 |
+
);
|
71 |
|
72 |
+
$installer->getConnection()->addColumn(
|
73 |
+
$this->getTable('sales/order_grid'), 'fadello_status',
|
74 |
+
'varchar(255) not null default ""'
|
75 |
+
);
|
76 |
$installer->endSetup();
|
app/design/frontend/base/default/layout/magmodules_fadello.xml
CHANGED
@@ -1,8 +1,29 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
</layout>
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
~ Magmodules.eu - http://www.magmodules.eu
|
4 |
+
~
|
5 |
+
~ NOTICE OF LICENSE
|
6 |
+
~ This source file is subject to the Open Software License (OSL 3.0)
|
7 |
+
~ that is bundled with this package in the file LICENSE.txt.
|
8 |
+
~ It is also available through the world-wide-web at this URL:
|
9 |
+
~ http://opensource.org/licenses/osl-3.0.php
|
10 |
+
~ If you did not receive a copy of the license and are unable to
|
11 |
+
~ obtain it through the world-wide-web, please send an email
|
12 |
+
~ to info@magmodules.eu so we can send you a copy immediately.
|
13 |
+
~
|
14 |
+
~ @category Magmodules
|
15 |
+
~ @package Magmodules_Fadello
|
16 |
+
~ @author Magmodules <info@magmodules.eu>
|
17 |
+
~ @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
~ @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
-->
|
20 |
+
|
21 |
+
<layout version="0.1.0">
|
22 |
+
<default>
|
23 |
+
<reference name="head">
|
24 |
+
<action method="addCss" ifconfig="carriers/fadello/active">
|
25 |
+
<stylesheet>magmodules/fadello/style.css</stylesheet>
|
26 |
+
</action>
|
27 |
+
</reference>
|
28 |
+
</default>
|
29 |
</layout>
|
app/etc/modules/Magmodules_Fadello.xml
CHANGED
@@ -1,25 +1,23 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
*/
|
22 |
-
-->
|
23 |
<config>
|
24 |
<modules>
|
25 |
<Magmodules_Fadello>
|
1 |
<?xml version="1.0"?>
|
2 |
+
|
3 |
+
<!--
|
4 |
+
~ Magmodules.eu - http://www.magmodules.eu
|
5 |
+
~
|
6 |
+
~ NOTICE OF LICENSE
|
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 info@magmodules.eu so we can send you a copy immediately.
|
14 |
+
~
|
15 |
+
~ @category Magmodules
|
16 |
+
~ @package Magmodules_Fadello
|
17 |
+
~ @author Magmodules <info@magmodules.eu>
|
18 |
+
~ @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
19 |
+
~ @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
-->
|
|
|
|
|
21 |
<config>
|
22 |
<modules>
|
23 |
<Magmodules_Fadello>
|
app/locale/en_US/Magmodules_Fadello.csv
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
"<p>This extension is developed by <a href="http://www.magmodules.eu/">Magmodules</a>. We are a Magento only E-commerce Agency located in the Netherlands.<br></p><p><strong>Read everything about the extension configuration in our <a href="https://www.magmodules.eu/help/fadello" target="_blank">Knowledgebase.</a></strong></p>","<p>This extension is developed by <a href="http://www.magmodules.eu/">Magmodules</a>. We are a Magento only E-commerce Agency located in the Netherlands.<br></p><p><strong>Read everything about the extension configuration in our <a href="https://www.magmodules.eu/help/fadello" target="_blank">Knowledgebase.</a></strong></p>"
|
2 |
"About the Extension","About the Extension"
|
3 |
"General Settings","General Settings"
|
4 |
"Enabled","Enabled"
|
@@ -36,7 +35,7 @@
|
|
36 |
"<p>Set the shipping price rules by using a from and to price.<br>For eg. a €5.00 shipping price for all orders under €100.00 needs to be configured with the start price of 0.00 and the end price of 100.00.</p><br/>","<p>Set the shipping price rules by using a from and to price.<br>For eg. a €5.00 shipping price for all orders under €100.00 needs to be configured with the start price of 0.00 and the end price of 100.00.</p><br/>"
|
37 |
"Shipping Price","Shipping Price"
|
38 |
"Availability","Availability"
|
39 |
-
"<p>Set the availability and naming of the method based on time and day.<br>For eg. offer Sameday Delivery on weekdays before 13:00 and offer Nextday Evening Delivery between 13:00 and 23:59.<br>You can use different descriptions for these timespans, like: "Maandagavond levering 18:00-22:30".</p><br/>","<p>Set the availability and naming of the method based on time and day.<br>For eg. offer Sameday Delivery on weekdays before 13:00 and offer Nextday Evening Delivery between 13:00 and 23:59.<br>You can use different descriptions for these timespans, like: "Maandagavond levering 18:00-22:30".</p><br/>"
|
40 |
"Method Availability","Method Availability"
|
41 |
"Limitations","Limitations"
|
42 |
"Maximum weight","Maximum weight"
|
|
|
1 |
"About the Extension","About the Extension"
|
2 |
"General Settings","General Settings"
|
3 |
"Enabled","Enabled"
|
35 |
"<p>Set the shipping price rules by using a from and to price.<br>For eg. a €5.00 shipping price for all orders under €100.00 needs to be configured with the start price of 0.00 and the end price of 100.00.</p><br/>","<p>Set the shipping price rules by using a from and to price.<br>For eg. a €5.00 shipping price for all orders under €100.00 needs to be configured with the start price of 0.00 and the end price of 100.00.</p><br/>"
|
36 |
"Shipping Price","Shipping Price"
|
37 |
"Availability","Availability"
|
38 |
+
"<p>Set the availability and naming of the method based on time and day.<br>For eg. offer Sameday Delivery on weekdays before 13:00 and offer Nextday Evening Delivery between 13:00 and 23:59.<br>You can use different descriptions for these timespans, like: ""Maandagavond levering 18:00-22:30"".</p><br/>","<p>Set the availability and naming of the method based on time and day.<br>For eg. offer Sameday Delivery on weekdays before 13:00 and offer Nextday Evening Delivery between 13:00 and 23:59.<br>You can use different descriptions for these timespans, like: ""Maandagavond levering 18:00-22:30"".</p><br/>"
|
39 |
"Method Availability","Method Availability"
|
40 |
"Limitations","Limitations"
|
41 |
"Maximum weight","Maximum weight"
|
app/locale/nl_NL/Magmodules_Fadello.csv
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
"<p>This extension is developed by <a href="http://www.magmodules.eu/">Magmodules</a>. We are a Magento only E-commerce Agency located in the Netherlands.<br></p><p><strong>Read everything about the extension configuration in our <a href="https://www.magmodules.eu/help/fadello" target="_blank">Knowledgebase.</a></strong></p>","<p>Deze extensie is ontwikkeld door <a href="http://www.magmodules.eu/">Magmodules</a>.</p><p><strong>Meer informatie over de configuratie van deze extensie zijn te vinden in onze<a href="https://www.magmodules.eu/help/fadello" target="_blank">Knowledgebase.</a></strong></p>"
|
2 |
"About the Extension","Over deze extensie"
|
3 |
"Add Fadello logo","Fadello Logo toevoegen"
|
4 |
"General Settings","Algemene instellingen"
|
@@ -51,4 +50,5 @@
|
|
51 |
"Create Shipment","Verzending aanmaken"
|
52 |
"Cancel this Fadello Shipment","Annuleer deze Fadello verzending"
|
53 |
"Open PDF","Open PDF"
|
54 |
-
"Ship This Order","Verzend deze bestelling"
|
|
|
|
1 |
"About the Extension","Over deze extensie"
|
2 |
"Add Fadello logo","Fadello Logo toevoegen"
|
3 |
"General Settings","Algemene instellingen"
|
50 |
"Create Shipment","Verzending aanmaken"
|
51 |
"Cancel this Fadello Shipment","Annuleer deze Fadello verzending"
|
52 |
"Open PDF","Open PDF"
|
53 |
+
"Ship This Order","Verzend deze bestelling"
|
54 |
+
"<p>This extension is developed by <a href=""http://www.magmodules.eu/"" target=""_blank"">Magmodules</a>. We are a Magento only E-commerce Agency located in the Netherlands.<br></p><p><strong>Read everything about the extension configuration in our <a href=""https://www.magmodules.eu/help/fadello"" target=""_blank"">Knowledgebase.</a></strong></p>","<p>Deze extensie is ontwikkeld door <a href=""http://www.magmodules.eu/"" target=""_blank"">Magmodules</a>. Magmodules is een Magento Bureau gevestigd in Nederland.<br></p><p><strong>Lees alles over de de configuratie van deze extensie in onze <a href=""https://www.magmodules.eu/help/fadello"" target=""_blank"">knowledgebase.</a></strong></p>"
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Magmodules_Fadello</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.magmodules.eu/license-agreement/">Single Server License</license>
|
7 |
<channel>community</channel>
|
@@ -10,9 +10,9 @@
|
|
10 |
<description>Fadello</description>
|
11 |
<notes>Fadello</notes>
|
12 |
<authors><author><name>Magmodules</name><user>magmodules</user><email>info@magmodules.nl</email></author></authors>
|
13 |
-
<date>
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="Magmodules"><dir name="Fadello"><dir name="Block"><dir name="Adminhtml"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Availability.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Magmodules_Fadello</name>
|
4 |
+
<version>1.0.2</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.magmodules.eu/license-agreement/">Single Server License</license>
|
7 |
<channel>community</channel>
|
10 |
<description>Fadello</description>
|
11 |
<notes>Fadello</notes>
|
12 |
<authors><author><name>Magmodules</name><user>magmodules</user><email>info@magmodules.nl</email></author></authors>
|
13 |
+
<date>2017-01-31</date>
|
14 |
+
<time>10:06:40</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Magmodules"><dir name="Fadello"><dir name="Block"><dir name="Adminhtml"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Availability.php" hash="64913b7814babacd1ca98be1f7b471df"/><file name="Shipping.php" hash="e3b5fbe95d7ba0c851ecdeb9af1a0828"/></dir><dir name="Renderer"><file name="Select.php" hash="0cec29d42fd9cd861947d81b77b5e8b8"/></dir></dir></dir><dir name="Renderer"><file name="Shipment.php" hash="e93d10328c8d0ac118cafd84b3bc9b65"/></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Heading.php" hash="bfd7dd907ddac09e81909a1a2922c9e0"/><file name="Note.php" hash="5a8bf11167605594868a392cc57c6579"/><file name="Version.php" hash="bb824bb532efc7446dc49f63e5fbc7be"/></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="eabc58ff518d33e6dce0d6dcf5391f4d"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Design"><file name="Availability.php" hash="416edf5e4a158fbd35157052289e41fb"/><file name="Shipping.php" hash="428c16b799df750709d6512cdded0884"/></dir></dir><dir name="Source"><file name="Days.php" hash="d2da23bd5162598137da002010c33272"/></dir></dir></dir></dir><file name="Api.php" hash="19dd3ee4b0418c2fae33e85b6a706f34"/><dir name="Carrier"><file name="ShippingMethod.php" hash="d1ab5b2bfdf59d17481e81c8ffd0f275"/></dir><file name="Observer.php" hash="afcb8e193677a8cd696d4db4013c1e69"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="FadelloController.php" hash="b1ec6d48e97b82ac3e348bc9ec0a634b"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="c21568b2ecfbe36b0271e4e7fe37a0f3"/><file name="config.xml" hash="834a929a48159a6e55dc17c5da60d135"/><file name="system.xml" hash="7b7e83a214ca4ed3d82f5fa820078d0d"/></dir><dir name="sql"><dir name="fadello_setup"><file name="mysql4-install-0.9.0.php" hash="d51f8f1f961f798d1e7da372c02a4a32"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Magmodules_Fadello.xml" hash="5565183cd8b0543c266a95077d90c622"/></dir></target><target name="magelocale"><dir><dir name="en_US"><file name="Magmodules_Fadello.csv" hash="396606fa364a8f170e15d6be1c408ebe"/></dir><dir name="nl_NL"><file name="Magmodules_Fadello.csv" hash="a99468173196eeeb79e2e9d6673d1fb1"/></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="fadello"><file name="close.png" hash="c057a83b891418703c155c9a1382f8b9"/><file name="export.png" hash="21cef3823db6739081aea971e5789fa9"/><file name="pdf.png" hash="8df694ac11eae7090ccad5062b415020"/><file name="ship.png" hash="05c70f071c5d3cfe6ffa86a1cd3561f7"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="magmodules"><dir name="fadello"><dir name="images"><file name="Fadello_logo3.png" hash="87130480e8187cf4c2fff28142440aa1"/></dir><file name="style.css" hash="ff9b3d7c2f1a166fee23007fc1ea7f4a"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="magmodules_fadello.xml" hash="569e347f70b4731daf77b6acc5a4488a"/></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
skin/frontend/base/default/magmodules/fadello/style.css
CHANGED
@@ -1,21 +1,24 @@
|
|
1 |
-
|
2 |
-
* Magmodules.eu - http://www.magmodules.eu
|
3 |
-
*
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the
|
6 |
-
*
|
7 |
-
*
|
8 |
-
*
|
9 |
-
*
|
10 |
-
*
|
11 |
-
*
|
12 |
-
*
|
13 |
-
* @
|
14 |
-
*
|
|
|
|
|
|
|
15 |
*/
|
16 |
-
|
17 |
.fadello-class {
|
18 |
-
color: #
|
19 |
background: url(./images/Fadello_logo3.png) no-repeat right;
|
20 |
background-size: 125px;
|
21 |
padding-bottom: 10px;
|
1 |
+
/*
|
2 |
+
* Magmodules.eu - http://www.magmodules.eu
|
3 |
+
*
|
4 |
+
* NOTICE OF LICENSE
|
5 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
+
* that is bundled with this package in the file LICENSE.txt.
|
7 |
+
* It is also available through the world-wide-web at this URL:
|
8 |
+
* http://opensource.org/licenses/osl-3.0.php
|
9 |
+
* If you did not receive a copy of the license and are unable to
|
10 |
+
* obtain it through the world-wide-web, please send an email
|
11 |
+
* to info@magmodules.eu so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @category Magmodules
|
14 |
+
* @package Magmodules_Fadello
|
15 |
+
* @author Magmodules <info@magmodules.eu>
|
16 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
17 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
18 |
*/
|
19 |
+
|
20 |
.fadello-class {
|
21 |
+
color: #0C9;
|
22 |
background: url(./images/Fadello_logo3.png) no-repeat right;
|
23 |
background-size: 125px;
|
24 |
padding-bottom: 10px;
|