zitec_dpd - Version 1.0.7

Version Notes

Added postcode database management form

Download this release

Release Info

Developer Zitec
Extension zitec_dpd
Version 1.0.7
Comparing to
See all releases


Code changes from version 1.0.5 to 1.0.7

Files changed (230) hide show
  1. app/code/community/Zitec/Dpd/Block/Addresslength.php +138 -138
  2. app/code/community/Zitec/Dpd/Block/Adminhtml/Customer/Edit/Form/Addresslength.php +80 -80
  3. app/code/community/Zitec/Dpd/Block/Adminhtml/Order/Form.php +80 -0
  4. app/code/community/Zitec/Dpd/Block/Adminhtml/Order/Totals/Cashondeliverysurcharge/Newcreditmemo.php +39 -39
  5. app/code/community/Zitec/Dpd/Block/Adminhtml/Postcode/FormContainer.php +52 -0
  6. app/code/community/Zitec/Dpd/Block/Adminhtml/Postcode/Update/Files.php +57 -0
  7. app/code/community/Zitec/Dpd/Block/Adminhtml/Postcode/UpdateForm/Form.php +66 -0
  8. app/code/community/Zitec/Dpd/Block/Adminhtml/Sales/Order/Address/Form/Addresslength.php +107 -107
  9. app/code/community/Zitec/Dpd/Block/Adminhtml/Sales/Order/Shipment/View.php +74 -74
  10. app/code/community/Zitec/Dpd/Block/Adminhtml/Sales/Order/Shipment/View/Tracking.php +80 -80
  11. app/code/community/Zitec/Dpd/Block/Adminhtml/Sales/Shipment/Grid.php +119 -119
  12. app/code/community/Zitec/Dpd/Block/Adminhtml/Sales/Shipment/Grid/Renderer/Manifest.php +52 -52
  13. app/code/community/Zitec/Dpd/Block/Adminhtml/Shipment/Postcode/Autocompleter.php +31 -31
  14. app/code/community/Zitec/Dpd/Block/Adminhtml/System/Config/Button/Export.php +48 -48
  15. app/code/community/Zitec/Dpd/Block/Adminhtml/Tablerate/Grid.php +155 -155
  16. app/code/community/Zitec/Dpd/Block/Checkout/Onepage/Addresslength.php +37 -37
  17. app/code/community/Zitec/Dpd/Block/Customer/Address/Edit/Addresslength.php +37 -37
  18. app/code/community/Zitec/Dpd/Block/Order/Creditmemo/Totals/Cashondeliverysurcharge.php +72 -72
  19. app/code/community/Zitec/Dpd/Block/Order/Invoice/Totals/Cashondeliverysurcharge.php +72 -72
  20. app/code/community/Zitec/Dpd/Block/Order/Totals/Cashondeliverysurchage.php +160 -160
  21. app/code/community/Zitec/Dpd/Block/Tax/Checkout/Cashondeliverysurchage.php +125 -125
  22. app/code/community/Zitec/Dpd/Helper/Compatibility.php +76 -76
  23. app/code/community/Zitec/Dpd/Helper/Data.php +594 -594
  24. app/code/community/Zitec/Dpd/Helper/Layout.php +107 -107
  25. app/code/community/Zitec/Dpd/Helper/Payment.php +56 -56
  26. app/code/community/Zitec/Dpd/Helper/Postcode/Search.php +211 -181
  27. app/code/community/Zitec/Dpd/Helper/Ws.php +395 -395
  28. app/code/community/Zitec/Dpd/Model/Config/Data/Abstract.php +75 -75
  29. app/code/community/Zitec/Dpd/Model/Config/Data/Mode.php +66 -66
  30. app/code/community/Zitec/Dpd/Model/Config/Data/Tablerate.php +47 -47
  31. app/code/community/Zitec/Dpd/Model/Config/Source/Abstract.php +58 -58
  32. app/code/community/Zitec/Dpd/Model/Config/Source/Order/Status/Pendingpayment.php +30 -30
  33. app/code/community/Zitec/Dpd/Model/Config/Source/Service.php +113 -113
  34. app/code/community/Zitec/Dpd/Model/Config/Source/Wscountry.php +57 -57
  35. app/code/community/Zitec/Dpd/Model/Dpd/Manifest.php +296 -296
  36. app/code/community/Zitec/Dpd/Model/Dpd/Pickup.php +41 -41
  37. app/code/community/Zitec/Dpd/Model/Dpd/Ship.php +40 -40
  38. app/code/community/Zitec/Dpd/Model/Mysql4/Carrier/Tablerate.php +734 -734
  39. app/code/community/Zitec/Dpd/Model/Mysql4/Carrier/Tablerate/Collection.php +109 -109
  40. app/code/community/Zitec/Dpd/Model/Mysql4/Dpd/Manifest.php +57 -57
  41. app/code/community/Zitec/Dpd/Model/Mysql4/Dpd/Pickup.php +34 -34
  42. app/code/community/Zitec/Dpd/Model/Mysql4/Dpd/Ship.php +41 -41
  43. app/code/community/Zitec/Dpd/Model/Mysql4/Dpd/Ship/Collection.php +92 -92
  44. app/code/community/Zitec/Dpd/Model/Observer/Address.php +179 -179
  45. app/code/community/Zitec/Dpd/Model/Observer/Manifest.php +54 -54
  46. app/code/community/Zitec/Dpd/Model/Observer/Payment.php +59 -59
  47. app/code/community/Zitec/Dpd/Model/Observer/Pickup.php +80 -80
  48. app/code/community/Zitec/Dpd/Model/Observer/Shipment.php +454 -454
  49. app/code/community/Zitec/Dpd/Model/Payment/Cashondelivery.php +213 -213
  50. app/code/community/Zitec/Dpd/Model/Payment/Cashondelivery/Source/AmountType.php +41 -41
  51. app/code/community/Zitec/Dpd/Model/Payment/Cashondelivery/Source/Codpaymenttype.php +42 -42
  52. app/code/community/Zitec/Dpd/Model/Payment/Cashondelivery/Source/Country.php +64 -64
  53. app/code/community/Zitec/Dpd/Model/Payment/Cashondelivery/Source/Service.php +66 -66
  54. app/code/community/Zitec/Dpd/Model/Sales/Order/Creditmemo/Total/Cashondeliverysurchage.php +61 -61
  55. app/code/community/Zitec/Dpd/Model/Sales/Order/Creditmemo/Total/Tax.php +50 -50
  56. app/code/community/Zitec/Dpd/Model/Sales/Order/Invoice/Total/Cashondeliverysurchage.php +60 -60
  57. app/code/community/Zitec/Dpd/Model/Sales/Order/Invoice/Total/Tax.php +60 -60
  58. app/code/community/Zitec/Dpd/Model/Sales/Order/Pdf/Total/Cashondeliverysurchage.php +113 -113
  59. app/code/community/Zitec/Dpd/Model/Sales/Order/Total/Cashondeliverysurchage.php +41 -41
  60. app/code/community/Zitec/Dpd/Model/Sales/Quote/Address/Total/Cashondeliverysurchage.php +182 -182
  61. app/code/community/Zitec/Dpd/Model/Shipping/Carrier/Abstract.php +87 -87
  62. app/code/community/Zitec/Dpd/Model/Shipping/Carrier/Dpd.php +541 -541
  63. app/code/community/Zitec/Dpd/controllers/Adminhtml/ConfigController.php +39 -39
  64. app/code/community/Zitec/Dpd/controllers/Adminhtml/PostcodeController.php +185 -0
  65. app/code/community/Zitec/Dpd/controllers/Adminhtml/ShipmentController.php +463 -463
  66. app/code/community/Zitec/Dpd/etc/adminhtml.xml +79 -74
  67. app/code/community/Zitec/Dpd/etc/config.xml +397 -397
  68. app/code/community/Zitec/Dpd/etc/system.xml +379 -379
  69. app/code/community/Zitec/Dpd/sql/zitec_dpd_setup/mysql4-install-1.0.0.php +208 -208
  70. app/code/community/Zitec/Dpd/sql/zitec_dpd_setup/mysql4-upgrade-1.0.0-1.0.1.php +43 -43
  71. app/code/community/Zitec/Dpd/sql/zitec_dpd_setup/mysql4-upgrade-1.0.1-1.0.2.php +36 -36
  72. app/code/community/Zitec/Dpd/sql/zitec_dpd_setup/mysql4-upgrade-1.0.2-1.0.3.php +37 -37
  73. app/code/community/Zitec/PackedShipment/Block/Addressvalidationdialog.php +105 -105
  74. app/code/community/Zitec/PackedShipment/Block/Addressvalidationinfojs.php +130 -130
  75. app/code/community/Zitec/PackedShipment/Helper/Data.php +143 -143
  76. app/code/community/Zitec/PackedShipment/Model/Carrier/Interface.php +96 -96
  77. app/code/community/Zitec/PackedShipment/Model/Package.php +272 -272
  78. app/code/community/Zitec/PackedShipment/Model/PackedShipment.php +50 -50
  79. app/code/community/Zitec/PackedShipment/controllers/Adminhtml/IndexController.php +119 -119
  80. app/code/community/Zitec/PackedShipment/etc/config.xml +61 -61
  81. app/code/community/Zitec/PrintShippingLabel/Block/Adminhtml/Sales/Order/Shipment/View.php +63 -63
  82. app/code/community/Zitec/PrintShippingLabel/Block/Adminhtml/Sales/View.php +69 -69
  83. app/code/community/Zitec/PrintShippingLabel/Helper/Data.php +29 -29
  84. app/code/community/Zitec/PrintShippingLabel/controllers/Adminhtml/IndexController.php +148 -148
  85. app/code/community/Zitec/PrintShippingLabel/etc/config.xml +89 -89
  86. app/code/community/Zitec/ReportsCommon/Block/RecordsReport/Grid.php +631 -631
  87. app/code/community/Zitec/ReportsCommon/Block/Renderer/Posnegcurrency.php +43 -43
  88. app/code/community/Zitec/ReportsCommon/Controller/Adminhtml/RecordsreportController.php +115 -115
  89. app/code/community/Zitec/ReportsCommon/Helper/Data.php +29 -29
  90. app/code/community/Zitec/ReportsCommon/etc/adminhtml.xml +31 -31
  91. app/code/community/Zitec/ReportsCommon/etc/config.xml +21 -21
  92. app/code/community/Zitec/ShippingReports/Block/Adminhtml/Profitability.php +47 -47
  93. app/code/community/Zitec/ShippingReports/Block/Adminhtml/Profitability/Grid.php +126 -126
  94. app/code/community/Zitec/ShippingReports/Block/Adminhtml/Profitability/Renderer/Orderref.php +39 -39
  95. app/code/community/Zitec/ShippingReports/Helper/Data.php +28 -28
  96. app/code/community/Zitec/ShippingReports/Model/Mysql4/Profitability/Collection.php +72 -72
  97. app/code/community/Zitec/ShippingReports/Model/Observer/Order.php +58 -58
  98. app/code/community/Zitec/ShippingReports/Model/Observer/Shipment.php +89 -89
  99. app/code/community/Zitec/ShippingReports/controllers/Adminhtml/Reports/ProfitabilityController.php +35 -35
  100. app/code/community/Zitec/ShippingReports/etc/adminhtml.xml +42 -42
  101. app/code/community/Zitec/ShippingReports/etc/config.xml +79 -79
  102. app/code/community/Zitec/ShippingReports/sql/zitec_shippingreports_setup/mysql4-install-1.0.0.php +41 -41
  103. app/code/community/Zitec/TableRates/Block/Adminhtml/Tablerate.php +75 -75
  104. app/code/community/Zitec/TableRates/Block/Adminhtml/Tablerate/Edit.php +356 -356
  105. app/code/community/Zitec/TableRates/Block/Adminhtml/Tablerate/Edit/Form.php +276 -276
  106. app/code/community/Zitec/TableRates/Block/Adminhtml/Tablerate/Export.php +62 -62
  107. app/code/community/Zitec/TableRates/Block/Adminhtml/Tablerate/Export/Form.php +75 -75
  108. app/code/community/Zitec/TableRates/Block/Adminhtml/Tablerate/Grid.php +350 -350
  109. app/code/community/Zitec/TableRates/Block/Adminhtml/Tablerate/Grid/Renderer/Shippingpercentage.php +38 -38
  110. app/code/community/Zitec/TableRates/Block/Adminhtml/Tablerate/Import.php +61 -61
  111. app/code/community/Zitec/TableRates/Block/Adminhtml/Tablerate/Import/Form.php +78 -78
  112. app/code/community/Zitec/TableRates/Block/Adminhtml/Widget/Grid/Column/Filter/Region.php +41 -41
  113. app/code/community/Zitec/TableRates/Helper/Data.php +267 -267
  114. app/code/community/Zitec/TableRates/Helper/Directory.php +75 -75
  115. app/code/community/Zitec/TableRates/Model/Mysql4/Tablerate.php +180 -180
  116. app/code/community/Zitec/TableRates/Model/Mysql4/Tablerate/Collection.php +92 -92
  117. app/code/community/Zitec/TableRates/Model/Source/Website.php +55 -55
  118. app/code/community/Zitec/TableRates/Model/Tablerate.php +88 -88
  119. app/code/community/Zitec/TableRates/controllers/Adminhtml/IndexController.php +461 -461
  120. app/code/community/Zitec/TableRates/etc/adminhtml.xml +21 -21
  121. app/code/community/Zitec/TableRates/etc/config.xml +100 -100
  122. app/design/adminhtml/default/default/layout/zitec_dpd.xml +94 -94
  123. app/design/adminhtml/default/default/layout/zitec_packedshipment.xml +34 -34
  124. app/design/adminhtml/default/default/layout/zitec_shippingreports.xml +7 -7
  125. app/design/adminhtml/default/default/layout/zitec_tablerates.xml +37 -37
  126. app/design/adminhtml/default/default/template/zitec_dpd/potcode/update/available-files.phtml +25 -0
  127. app/design/adminhtml/default/default/template/zitec_dpd/sales/order/address/postcode/alert-problem.phtml +24 -24
  128. app/design/adminhtml/default/default/template/zitec_dpd/sales/order/address/postcode/validate.phtml +37 -37
  129. app/design/adminhtml/default/default/template/zitec_dpd/sales/order/address/street/alert-problem.phtml +22 -22
  130. app/design/adminhtml/default/default/template/zitec_dpd/sales/order/shipment/postcode/autocompleter.phtml +14 -14
  131. app/design/adminhtml/default/default/template/zitec_dpd/sales/order/shipment/view/tracking.phtml +86 -86
  132. app/design/adminhtml/default/default/template/zitec_dpd/sales/order/shipment/view/tracking_17.phtml +86 -86
  133. app/design/adminhtml/default/default/template/zitec_packedshipment/sales/order/shipment/create/address_validation_dialog.phtml +142 -142
  134. app/design/adminhtml/default/default/template/zitec_packedshipment/sales/order/shipment/create/address_validation_info_js.phtml +17 -17
  135. app/design/adminhtml/default/default/template/zitec_packedshipment/sales/order/shipment/create/items.phtml +362 -362
  136. app/design/adminhtml/default/default/template/zitec_reportscommon/records_report_container.phtml +27 -27
  137. app/design/adminhtml/default/default/template/zitec_reportscommon/records_report_grid.phtml +215 -215
  138. app/design/frontend/base/default/layout/zitec_dpd.xml +79 -79
  139. app/design/frontend/base/default/template/zitec_dpd/shipping/tracking/popup.phtml +178 -178
  140. app/design/frontend/base/default/template/zitec_dpd/tax/checkout/cashondeliverysurchage.phtml +38 -38
  141. app/etc/modules/Zitec_Dpd.xml +10 -10
  142. app/etc/modules/Zitec_FieldLengths.xml +9 -9
  143. app/etc/modules/Zitec_PackedShipment.xml +10 -10
  144. app/etc/modules/Zitec_PrintShippingLabel.xml +8 -8
  145. app/etc/modules/Zitec_ReportsCommon.xml +7 -7
  146. app/etc/modules/Zitec_ShippingReports.xml +10 -10
  147. app/etc/modules/Zitec_TableRates.xml +9 -9
  148. app/locale/en_GB/Zitec_Dpd.csv +182 -182
  149. app/locale/en_GB/Zitec_PackedShipment.csv +20 -20
  150. app/locale/en_GB/Zitec_PrintShippingLabel.csv +1 -1
  151. app/locale/en_GB/Zitec_TableRates.csv +78 -78
  152. app/locale/en_US/Zitec_Dpd.csv +141 -141
  153. app/locale/en_US/Zitec_PackedShipment.csv +20 -20
  154. app/locale/en_US/Zitec_PrintShippingLabel.csv +1 -1
  155. app/locale/en_US/Zitec_TableRates.csv +78 -78
  156. app/locale/es_ES/Zitec_Dpd.csv +139 -139
  157. app/locale/es_ES/Zitec_PackedShipment.csv +20 -20
  158. app/locale/es_ES/Zitec_TableRates.csv +79 -79
  159. app/locale/hr_HR/Zitec_Dpd.csv +136 -136
  160. app/locale/hr_HR/Zitec_PackedShipment.csv +20 -20
  161. app/locale/hr_HR/Zitec_PrintShippingLabel.csv +1 -1
  162. app/locale/hr_HR/Zitec_TableRates.csv +78 -78
  163. app/locale/ro_RO/Zitec_Dpd.csv +189 -189
  164. app/locale/ro_RO/Zitec_PackedShipment.csv +18 -18
  165. app/locale/ro_RO/Zitec_PrintShippingLabel.csv +5 -5
  166. app/locale/ro_RO/Zitec_TableRates.csv +68 -68
  167. app/locale/sl_SI/Zitec_Dpd.csv +137 -137
  168. app/locale/sl_SI/Zitec_PackedShipment.csv +20 -20
  169. app/locale/sl_SI/Zitec_PrintShippingLabel.csv +1 -1
  170. app/locale/sl_SI/Zitec_TableRates.csv +78 -78
  171. js/zitec/dpd/admin/PostcodeAutocompleter.js +15 -15
  172. js/zitec/dpd/admin/sales.js +11 -11
  173. js/zitec_fieldlengths/validator.js +58 -58
  174. js/zitec_packedshipment/packedshipment.js +632 -632
  175. lib/Zitec/Dpd/Api.php +123 -123
  176. lib/Zitec/Dpd/Api/Abstract.php +361 -361
  177. lib/Zitec/Dpd/Api/Configs.php +130 -130
  178. lib/Zitec/Dpd/Api/Manifest.php +23 -23
  179. lib/Zitec/Dpd/Api/Manifest/Close.php +156 -156
  180. lib/Zitec/Dpd/Api/Manifest/Close/Response.php +62 -62
  181. lib/Zitec/Dpd/Api/Manifest/Response.php +29 -29
  182. lib/Zitec/Dpd/Api/Pickup.php +27 -27
  183. lib/Zitec/Dpd/Api/Pickup/Create.php +161 -161
  184. lib/Zitec/Dpd/Api/Pickup/Create/Response.php +46 -46
  185. lib/Zitec/Dpd/Api/Pickup/Response.php +21 -21
  186. lib/Zitec/Dpd/Api/Response.php +138 -138
  187. lib/Zitec/Dpd/Api/Shipment.php +32 -32
  188. lib/Zitec/Dpd/Api/Shipment/CalculatePrice.php +123 -123
  189. lib/Zitec/Dpd/Api/Shipment/CalculatePrice/Response.php +110 -110
  190. lib/Zitec/Dpd/Api/Shipment/Delete.php +65 -65
  191. lib/Zitec/Dpd/Api/Shipment/Delete/Response.php +20 -20
  192. lib/Zitec/Dpd/Api/Shipment/GetLabel.php +78 -78
  193. lib/Zitec/Dpd/Api/Shipment/GetLabel/Response.php +28 -28
  194. lib/Zitec/Dpd/Api/Shipment/GetShipmentStatus.php +65 -65
  195. lib/Zitec/Dpd/Api/Shipment/GetShipmentStatus/Response.php +178 -178
  196. lib/Zitec/Dpd/Api/Shipment/Response.php +21 -21
  197. lib/Zitec/Dpd/Api/Shipment/Save.php +321 -321
  198. lib/Zitec/Dpd/Api/Shipment/Save/Exception/ReceiverAddressTooLong.php +29 -29
  199. lib/Zitec/Dpd/Api/Shipment/Save/Response.php +71 -71
  200. lib/Zitec/Dpd/Api/Soapclient.php +87 -87
  201. lib/Zitec/Dpd/ApiTest/test-dpd-calculatePrice.php +127 -127
  202. lib/Zitec/Dpd/ApiTest/test-dpd-createShipment.php +134 -134
  203. lib/Zitec/Dpd/Postcode/Search.php +194 -161
  204. lib/Zitec/Dpd/Postcode/Search/Abstract.php +143 -139
  205. lib/Zitec/Dpd/Postcode/Search/Interface.php +60 -60
  206. lib/Zitec/Dpd/Postcode/Search/Model.php +116 -110
  207. lib/Zitec/Dpd/Postcode/Search/Model/CachedData.php +11029 -11028
  208. lib/Zitec/Dpd/Postcode/Search/Model/Interface.php +60 -60
  209. lib/Zitec/Dpd/Postcode/Search/Model/Mysql.php +1129 -828
  210. lib/Zitec/Dpd/Postcode/data/data.csv +51850 -51850
  211. lib/Zitec/Dpd/Postcode/data/data.sql +52344 -52366
  212. lib/Zitec/Dpd/readme.txt +5 -5
  213. package.xml +5 -5
  214. skin/adminhtml/default/default/zitec_dpd/zitec_dpd.css +14 -14
  215. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/alert.css +119 -119
  216. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/alert_lite.css +88 -88
  217. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/alphacube.css +150 -150
  218. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/behavior.htc +50 -50
  219. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/darkX.css +121 -121
  220. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/debug.css +25 -25
  221. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/default.css +157 -157
  222. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/iefix/iepngfix.css +3 -3
  223. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/iefix/iepngfix.htc +53 -53
  224. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting.css +960 -960
  225. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/pngbehavior.htc +67 -67
  226. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/mac_os_x.css +333 -333
  227. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/mac_os_x_dialog.css +160 -160
  228. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/magento.css +39 -39
  229. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/nuncio.css +164 -164
  230. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/spread.css +108 -108
app/code/community/Zitec/Dpd/Block/Addresslength.php CHANGED
@@ -1,138 +1,138 @@
1
- <?php
2
- /**
3
- * Zitec_Dpd – shipping carrier extension
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- *
12
- * @category Zitec
13
- * @package Zitec_Dpd
14
- * @copyright Copyright (c) 2014 Zitec COM
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
-
18
- /**
19
- *
20
- * @category Zitec
21
- * @package Zitec_Dpd
22
- * @author Zitec COM <magento@zitec.ro>
23
- */
24
- class Zitec_Dpd_Block_Addresslength extends Mage_Core_Block_Template
25
- {
26
- /**
27
- *
28
- * @return string
29
- */
30
- public function getClassName()
31
- {
32
- return "zitec_dpd-address-length-validate";
33
- }
34
-
35
- /**
36
- *
37
- * @return int
38
- */
39
- public function getMaxLength()
40
- {
41
- return Zitec_Dpd_Api_Configs::SHIPMENT_LIST_RECEIVER_STREET_MAX_LENGTH;
42
- }
43
-
44
- public function getMinLength()
45
- {
46
- return 35;
47
- }
48
-
49
- /**
50
- *
51
- * @return array
52
- */
53
- public function getFieldNames()
54
- {
55
- return array();
56
- }
57
-
58
- /**
59
- *
60
- * @return string
61
- */
62
- public function getMessage()
63
- {
64
- return $this->__("The total length of the address cannot be more than %s characters.", $this->getMaxLength());
65
- }
66
-
67
- /**
68
- *
69
- * @param array $fieldNames
70
- *
71
- * @return string
72
- */
73
- protected function _getHtml(array $fieldNames)
74
- {
75
- if (!$fieldNames) {
76
- return '';
77
- }
78
-
79
- $fieldsHtml = '';
80
- foreach ($fieldNames as $fieldName) {
81
- $fieldsHtml .= "
82
- field = $('{$fieldName}');
83
- if (field) {
84
- fields.push(field);
85
- }";
86
- }
87
-
88
- $html = "
89
- <script type='text/javascript'>
90
- //<![CDATA[
91
- var className = '{$this->getClassName()}',
92
- fields = [],
93
- field = null,
94
- message = '{$this->getMessage()}',
95
- maxLength = {$this->getMaxLength()},
96
- minLength = {$this->getMinLength()};
97
-
98
- {$fieldsHtml}
99
-
100
- new zitecFieldLengths.Validator(className, fields, message, maxLength, minLength);
101
- //]]>
102
- </script>";
103
-
104
- return $html;
105
- }
106
-
107
- /**
108
- *
109
- * @return string
110
- */
111
- protected function _toHtml()
112
- {
113
- if ($this->_showBlock()) {
114
- return $this->_getHtml($this->getFieldNames());
115
- } else {
116
- return '';
117
- }
118
- }
119
-
120
- /**
121
- *
122
- * @return boolean
123
- */
124
- protected function _showBlock()
125
- {
126
- return $this->_getHelper()->moduleIsActive();
127
- }
128
-
129
- /**
130
- *
131
- * @return Zitec_Dpd_Helper_Data
132
- */
133
- protected function _getHelper()
134
- {
135
- return Mage::helper('zitec_dpd');
136
- }
137
- }
138
-
1
+ <?php
2
+ /**
3
+ * Zitec_Dpd – shipping carrier extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Zitec
13
+ * @package Zitec_Dpd
14
+ * @copyright Copyright (c) 2014 Zitec COM
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+
18
+ /**
19
+ *
20
+ * @category Zitec
21
+ * @package Zitec_Dpd
22
+ * @author Zitec COM <magento@zitec.ro>
23
+ */
24
+ class Zitec_Dpd_Block_Addresslength extends Mage_Core_Block_Template
25
+ {
26
+ /**
27
+ *
28
+ * @return string
29
+ */
30
+ public function getClassName()
31
+ {
32
+ return "zitec_dpd-address-length-validate";
33
+ }
34
+
35
+ /**
36
+ *
37
+ * @return int
38
+ */
39
+ public function getMaxLength()
40
+ {
41
+ return Zitec_Dpd_Api_Configs::SHIPMENT_LIST_RECEIVER_STREET_MAX_LENGTH;
42
+ }
43
+
44
+ public function getMinLength()
45
+ {
46
+ return 35;
47
+ }
48
+
49
+ /**
50
+ *
51
+ * @return array
52
+ */
53
+ public function getFieldNames()
54
+ {
55
+ return array();
56
+ }
57
+
58
+ /**
59
+ *
60
+ * @return string
61
+ */
62
+ public function getMessage()
63
+ {
64
+ return $this->__("The total length of the address cannot be more than %s characters.", $this->getMaxLength());
65
+ }
66
+
67
+ /**
68
+ *
69
+ * @param array $fieldNames
70
+ *
71
+ * @return string
72
+ */
73
+ protected function _getHtml(array $fieldNames)
74
+ {
75
+ if (!$fieldNames) {
76
+ return '';
77
+ }
78
+
79
+ $fieldsHtml = '';
80
+ foreach ($fieldNames as $fieldName) {
81
+ $fieldsHtml .= "
82
+ field = $('{$fieldName}');
83
+ if (field) {
84
+ fields.push(field);
85
+ }";
86
+ }
87
+
88
+ $html = "
89
+ <script type='text/javascript'>
90
+ //<![CDATA[
91
+ var className = '{$this->getClassName()}',
92
+ fields = [],
93
+ field = null,
94
+ message = '{$this->getMessage()}',
95
+ maxLength = {$this->getMaxLength()},
96
+ minLength = {$this->getMinLength()};
97
+
98
+ {$fieldsHtml}
99
+
100
+ new zitecFieldLengths.Validator(className, fields, message, maxLength, minLength);
101
+ //]]>
102
+ </script>";
103
+
104
+ return $html;
105
+ }
106
+
107
+ /**
108
+ *
109
+ * @return string
110
+ */
111
+ protected function _toHtml()
112
+ {
113
+ if ($this->_showBlock()) {
114
+ return $this->_getHtml($this->getFieldNames());
115
+ } else {
116
+ return '';
117
+ }
118
+ }
119
+
120
+ /**
121
+ *
122
+ * @return boolean
123
+ */
124
+ protected function _showBlock()
125
+ {
126
+ return $this->_getHelper()->moduleIsActive();
127
+ }
128
+
129
+ /**
130
+ *
131
+ * @return Zitec_Dpd_Helper_Data
132
+ */
133
+ protected function _getHelper()
134
+ {
135
+ return Mage::helper('zitec_dpd');
136
+ }
137
+ }
138
+
app/code/community/Zitec/Dpd/Block/Adminhtml/Customer/Edit/Form/Addresslength.php CHANGED
@@ -1,80 +1,80 @@
1
- <?php
2
- /**
3
- * Zitec_Dpd – shipping carrier extension
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- *
12
- * @category Zitec
13
- * @package Zitec_Dpd
14
- * @copyright Copyright (c) 2014 Zitec COM
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
-
18
- /**
19
- *
20
- * @category Zitec
21
- * @package Zitec_Dpd
22
- * @author Zitec COM <magento@zitec.ro>
23
- */
24
- class Zitec_Dpd_Block_Adminhtml_Customer_Edit_Form_Addresslength extends Zitec_Dpd_Block_Addresslength
25
- {
26
-
27
-
28
- /**
29
- *
30
- * @return array
31
- */
32
- public function getFieldNames()
33
- {
34
- return array("street0", "street1", "street2", "street3");
35
- }
36
-
37
- /**
38
- *
39
- * @param array $fieldNames
40
- *
41
- * @return string
42
- */
43
- protected function _getHtml(array $fieldNames)
44
- {
45
- if (!$fieldNames) {
46
- return '';
47
- }
48
-
49
- $fieldsHtml = '';
50
- foreach ($fieldNames as $fieldName) {
51
- $fieldsHtml .= "
52
- field = $('{$fieldName}');
53
- if (field) {
54
- fields.push(field);
55
- }";
56
- }
57
-
58
- $html = "
59
- <script type='text/javascript'>
60
- //<![CDATA[
61
- var className = '{$this->getClassName()}',
62
- fields = [],
63
- field = null,
64
- message = '{$this->getMessage()}',
65
- maxLength = {$this->getMaxLength()},
66
- minLength = {$this->getMinLength()};
67
-
68
- {$fieldsHtml}
69
-
70
- new zitecFieldLengths.Validator(className, fields, message, maxLength, minLength);
71
- //]]>
72
- </script>";
73
-
74
- return $html;
75
- }
76
-
77
-
78
- }
79
-
80
-
1
+ <?php
2
+ /**
3
+ * Zitec_Dpd – shipping carrier extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Zitec
13
+ * @package Zitec_Dpd
14
+ * @copyright Copyright (c) 2014 Zitec COM
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+
18
+ /**
19
+ *
20
+ * @category Zitec
21
+ * @package Zitec_Dpd
22
+ * @author Zitec COM <magento@zitec.ro>
23
+ */
24
+ class Zitec_Dpd_Block_Adminhtml_Customer_Edit_Form_Addresslength extends Zitec_Dpd_Block_Addresslength
25
+ {
26
+
27
+
28
+ /**
29
+ *
30
+ * @return array
31
+ */
32
+ public function getFieldNames()
33
+ {
34
+ return array("street0", "street1", "street2", "street3");
35
+ }
36
+
37
+ /**
38
+ *
39
+ * @param array $fieldNames
40
+ *
41
+ * @return string
42
+ */
43
+ protected function _getHtml(array $fieldNames)
44
+ {
45
+ if (!$fieldNames) {
46
+ return '';
47
+ }
48
+
49
+ $fieldsHtml = '';
50
+ foreach ($fieldNames as $fieldName) {
51
+ $fieldsHtml .= "
52
+ field = $('{$fieldName}');
53
+ if (field) {
54
+ fields.push(field);
55
+ }";
56
+ }
57
+
58
+ $html = "
59
+ <script type='text/javascript'>
60
+ //<![CDATA[
61
+ var className = '{$this->getClassName()}',
62
+ fields = [],
63
+ field = null,
64
+ message = '{$this->getMessage()}',
65
+ maxLength = {$this->getMaxLength()},
66
+ minLength = {$this->getMinLength()};
67
+
68
+ {$fieldsHtml}
69
+
70
+ new zitecFieldLengths.Validator(className, fields, message, maxLength, minLength);
71
+ //]]>
72
+ </script>";
73
+
74
+ return $html;
75
+ }
76
+
77
+
78
+ }
79
+
80
+
app/code/community/Zitec/Dpd/Block/Adminhtml/Order/Form.php ADDED
@@ -0,0 +1,80 @@
1
+ <?php
2
+ /**
3
+ * Zitec_Dpd – shipping carrier extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Zitec
13
+ * @package Zitec_Dpd
14
+ * @copyright Copyright (c) 2014 Zitec COM
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+
18
+ /**
19
+ *
20
+ * @category Zitec
21
+ * @package Zitec_Dpd
22
+ * @author Zitec COM <magento@zitec.ro>
23
+ */
24
+ class Zitec_Dpd_Block_Adminhtml_Customer_Edit_Form_Addresslength extends Zitec_Dpd_Block_Addresslength
25
+ {
26
+
27
+
28
+ /**
29
+ *
30
+ * @return array
31
+ */
32
+ public function getFieldNames()
33
+ {
34
+ return array("street0", "street1", "street2", "street3");
35
+ }
36
+
37
+ /**
38
+ *
39
+ * @param array $fieldNames
40
+ *
41
+ * @return string
42
+ */
43
+ protected function _getHtml(array $fieldNames)
44
+ {
45
+ if (!$fieldNames) {
46
+ return '';
47
+ }
48
+
49
+ $fieldsHtml = '';
50
+ foreach ($fieldNames as $fieldName) {
51
+ $fieldsHtml .= "
52
+ field = $('{$fieldName}');
53
+ if (field) {
54
+ fields.push(field);
55
+ }";
56
+ }
57
+
58
+ $html = "
59
+ <script type='text/javascript'>
60
+ //<![CDATA[
61
+ var className = '{$this->getClassName()}',
62
+ fields = [],
63
+ field = null,
64
+ message = '{$this->getMessage()}',
65
+ maxLength = {$this->getMaxLength()},
66
+ minLength = {$this->getMinLength()};
67
+
68
+ {$fieldsHtml}
69
+
70
+ new zitecFieldLengths.Validator(className, fields, message, maxLength, minLength);
71
+ //]]>
72
+ </script>";
73
+
74
+ return $html;
75
+ }
76
+
77
+
78
+ }
79
+
80
+
app/code/community/Zitec/Dpd/Block/Adminhtml/Order/Totals/Cashondeliverysurcharge/Newcreditmemo.php CHANGED
@@ -1,39 +1,39 @@
1
- <?php
2
- /**
3
- * Zitec_Dpd – shipping carrier extension
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- *
12
- * @category Zitec
13
- * @package Zitec_Dpd
14
- * @copyright Copyright (c) 2014 Zitec COM
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
-
18
- /**
19
- *
20
- * @category Zitec
21
- * @package Zitec_Dpd
22
- * @author Zitec COM <magento@zitec.ro>
23
- */
24
- class Zitec_Dpd_Block_Adminhtml_Order_Totals_Cashondeliverysurcharge_Newcreditmemo extends Zitec_Dpd_Block_Order_Creditmemo_Totals_Cashondeliverysurcharge
25
- {
26
-
27
- /**
28
- *
29
- * @return string
30
- */
31
- protected function _getAfter()
32
- {
33
- return $this->_getConfig()->displaySalesSubtotalBoth($this->_getStore()) ? 'subtotal_incl' : 'subtotal';
34
- }
35
-
36
-
37
- }
38
-
39
-
1
+ <?php
2
+ /**
3
+ * Zitec_Dpd – shipping carrier extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Zitec
13
+ * @package Zitec_Dpd
14
+ * @copyright Copyright (c) 2014 Zitec COM
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+
18
+ /**
19
+ *
20
+ * @category Zitec
21
+ * @package Zitec_Dpd
22
+ * @author Zitec COM <magento@zitec.ro>
23
+ */
24
+ class Zitec_Dpd_Block_Adminhtml_Order_Totals_Cashondeliverysurcharge_Newcreditmemo extends Zitec_Dpd_Block_Order_Creditmemo_Totals_Cashondeliverysurcharge
25
+ {
26
+
27
+ /**
28
+ *
29
+ * @return string
30
+ */
31
+ protected function _getAfter()
32
+ {
33
+ return $this->_getConfig()->displaySalesSubtotalBoth($this->_getStore()) ? 'subtotal_incl' : 'subtotal';
34
+ }
35
+
36
+
37
+ }
38
+
39
+
app/code/community/Zitec/Dpd/Block/Adminhtml/Postcode/FormContainer.php ADDED
@@ -0,0 +1,52 @@
1
+ <?php
2
+ /**
3
+ * Zitec_Dpd – shipping carrier extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Zitec
13
+ * @package Zitec_Dpd
14
+ * @copyright Copyright (c) 2014 Zitec COM
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+
18
+ /**
19
+ *
20
+ * @category Zitec
21
+ * @package Zitec_Dpd
22
+ * @author Zitec COM <magento@zitec.ro>
23
+ */
24
+ class Zitec_Dpd_Block_Adminhtml_Postcode_FormContainer extends Mage_Adminhtml_Block_Widget_Form_Container
25
+ {
26
+
27
+
28
+ public function __construct()
29
+ {
30
+ parent::__construct();
31
+ $this->_objectId = 'id';
32
+ $this->_blockGroup = 'zitec_dpd';
33
+ $this->_controller = 'adminhtml_postcode';
34
+ $this->_mode = 'updateForm';
35
+ $this->_headerText = Mage::helper('core')->__('Update postcode database - for DPD Carrier');
36
+
37
+ $this->_updateButton('save', 'label', Mage::helper('core')->__('Import'));
38
+
39
+ }
40
+
41
+
42
+
43
+
44
+ public function getBackUrl()
45
+ {
46
+ return $this->getUrl('*/slider/manage_blocks');
47
+ }
48
+
49
+
50
+ }
51
+
52
+
app/code/community/Zitec/Dpd/Block/Adminhtml/Postcode/Update/Files.php ADDED
@@ -0,0 +1,57 @@
1
+ <?php
2
+ /**
3
+ * Zitec_Dpd – shipping carrier extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Zitec
13
+ * @package Zitec_Dpd
14
+ * @copyright Copyright (c) 2014 Zitec COM
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+
18
+ /**
19
+ *
20
+ * @category Zitec
21
+ * @package Zitec_Dpd
22
+ * @author Zitec COM <magento@zitec.ro>
23
+ */
24
+ class Zitec_Dpd_Block_Adminhtml_Postcode_Update_Files extends Mage_Adminhtml_Block_Widget
25
+ {
26
+ public function __construct(){
27
+ $this->setTemplate('zitec_dpd/potcode/update/available-files.phtml');
28
+ }
29
+
30
+ /**
31
+ * return all csv files in the predefined path
32
+ * @return array
33
+ */
34
+ public function getAvailableCsvFiles()
35
+ {
36
+ $path = Mage::helper('zitec_dpd/postcode_search')->getPathToDatabaseUpgradeFiles();
37
+ $files = array();
38
+ if ($handle = opendir($path)) {
39
+ while (false !== ($entry = readdir($handle))) {
40
+ if($entry=='.' || $entry == '..'){
41
+ continue;
42
+ }
43
+ $ext = pathinfo($entry, PATHINFO_EXTENSION);
44
+ if(strtolower($ext) !== 'csv'){
45
+ continue;
46
+ }
47
+ $files[$entry] = filemtime($path.$entry);
48
+ }
49
+ closedir($handle);
50
+ }
51
+ asort ($files);
52
+ return $files;
53
+
54
+ }
55
+ }
56
+
57
+
app/code/community/Zitec/Dpd/Block/Adminhtml/Postcode/UpdateForm/Form.php ADDED
@@ -0,0 +1,66 @@
1
+ <?php
2
+ /**
3
+ * Zitec_Dpd – shipping carrier extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Zitec
13
+ * @package Zitec_Dpd
14
+ * @copyright Copyright (c) 2014 Zitec COM
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+
18
+ /**
19
+ *
20
+ * @category Zitec
21
+ * @package Zitec_Dpd
22
+ * @author Zitec COM <magento@zitec.ro>
23
+ */
24
+ class Zitec_Dpd_Block_Adminhtml_Postcode_UpdateForm_Form extends Mage_Adminhtml_Block_Widget_Form
25
+ {
26
+
27
+ /**
28
+ * prepare form fields
29
+ *
30
+ * @return Mage_Adminhtml_Block_Widget_Form
31
+ * @throws Exception
32
+ */
33
+ protected function _prepareForm()
34
+ {
35
+ $form = new Varien_Data_Form(array(
36
+ 'id' => 'edit_form',
37
+ 'action' => $this->getUrl('*/adminhtml_postcode/import', array('id' => $this->getRequest()->getParam('id'))),
38
+ 'enctype' => 'multipart/form-data',
39
+ 'method' => 'post',
40
+ )
41
+ );
42
+
43
+ $fieldset = $form->addFieldset('csv_upload', array('legend' => 'Upload a CSV to update the postcode database - DPD'));
44
+ $fieldset->addField('csv', 'file',
45
+ array(
46
+ 'label' => 'CSV file received from DPD',
47
+ 'name' => 'csv'
48
+ ));
49
+
50
+ $fieldset = $form->addFieldset('csv_file_path', array('legend' => ' Import an existing file'));
51
+ $fieldset->addField('path_to_csv', 'text',
52
+ array(
53
+ 'label' => 'File name of the CSV found in media/dpd/postcode_update',
54
+ 'name' => 'path_to_csv'
55
+ ));
56
+
57
+
58
+ $form->setUseContainer(true);
59
+ $this->setForm($form);
60
+
61
+ return parent::_prepareForm();
62
+ }
63
+
64
+ }
65
+
66
+
app/code/community/Zitec/Dpd/Block/Adminhtml/Sales/Order/Address/Form/Addresslength.php CHANGED
@@ -1,107 +1,107 @@
1
- <?php
2
- /**
3
- * Zitec_Dpd – shipping carrier extension
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- *
12
- * @category Zitec
13
- * @package Zitec_Dpd
14
- * @copyright Copyright (c) 2014 Zitec COM
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
-
18
- /**
19
- *
20
- * @category Zitec
21
- * @package Zitec_Dpd
22
- * @author Zitec COM <magento@zitec.ro>
23
- */
24
- class Zitec_Dpd_Block_Adminhtml_Sales_Order_Address_Form_Addresslength extends Zitec_Dpd_Block_Addresslength
25
- {
26
-
27
- /**
28
- *
29
- * @return array
30
- */
31
- public function getFieldNames()
32
- {
33
- return array("street0", "street1", "street2", "street3");
34
- }
35
-
36
- /**
37
- *
38
- * @return boolean
39
- */
40
- protected function _showBlock()
41
- {
42
- return parent::_showBlock() &&
43
- $this->_getAddress() &&
44
- $this->_getAddress()->getAddressType() == "shipping" &&
45
- $this->_getHelper()->isShippingMethodDpd($this->_getAddress()->getOrder()->getShippingMethod());
46
- }
47
-
48
- /**
49
- *
50
- * @return Mage_Sales_Model_Order_Address
51
- */
52
- protected function _getAddress()
53
- {
54
- return Mage::registry('order_address');
55
- }
56
-
57
-
58
-
59
-
60
- /**
61
- *
62
- * @param array $fieldNames
63
- *
64
- * @return string
65
- */
66
- protected function _getHtml(array $fieldNames)
67
- {
68
-
69
- $dpdCarrier = Mage::helper('zitec_dpd')->isDpdCarrierByOrder($this->_getAddress()->getOrder());
70
- if(!$dpdCarrier){
71
- return '';
72
- }
73
- if (!$fieldNames) {
74
- return '';
75
- }
76
-
77
- $fieldsHtml = '';
78
- foreach ($fieldNames as $fieldName) {
79
- $fieldsHtml .= "
80
- field = $('{$fieldName}');
81
- if (field) {
82
- fields.push(field);
83
- }";
84
- }
85
-
86
- $html = "
87
- <script type='text/javascript'>
88
- //<![CDATA[
89
- var className = '{$this->getClassName()}',
90
- fields = [],
91
- field = null,
92
- message = '{$this->getMessage()}',
93
- maxLength = {$this->getMaxLength()},
94
- minLength = {$this->getMinLength()};
95
-
96
- {$fieldsHtml}
97
-
98
- new zitecFieldLengths.Validator(className, fields, message, maxLength, minLength);
99
- //]]>
100
- </script>";
101
-
102
- return $html;
103
- }
104
-
105
- }
106
-
107
-
1
+ <?php
2
+ /**
3
+ * Zitec_Dpd – shipping carrier extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Zitec
13
+ * @package Zitec_Dpd
14
+ * @copyright Copyright (c) 2014 Zitec COM
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+
18
+ /**
19
+ *
20
+ * @category Zitec
21
+ * @package Zitec_Dpd
22
+ * @author Zitec COM <magento@zitec.ro>
23
+ */
24
+ class Zitec_Dpd_Block_Adminhtml_Sales_Order_Address_Form_Addresslength extends Zitec_Dpd_Block_Addresslength
25
+ {
26
+
27
+ /**
28
+ *
29
+ * @return array
30
+ */
31
+ public function getFieldNames()
32
+ {
33
+ return array("street0", "street1", "street2", "street3");
34
+ }
35
+
36
+ /**
37
+ *
38
+ * @return boolean
39
+ */
40
+ protected function _showBlock()
41
+ {
42
+ return parent::_showBlock() &&
43
+ $this->_getAddress() &&
44
+ $this->_getAddress()->getAddressType() == "shipping" &&
45
+ $this->_getHelper()->isShippingMethodDpd($this->_getAddress()->getOrder()->getShippingMethod());
46
+ }
47
+
48
+ /**
49
+ *
50
+ * @return Mage_Sales_Model_Order_Address
51
+ */
52
+ protected function _getAddress()
53
+ {
54
+ return Mage::registry('order_address');
55
+ }
56
+
57
+
58
+
59
+
60
+ /**
61
+ *
62
+ * @param array $fieldNames
63
+ *
64
+ * @return string
65
+ */
66
+ protected function _getHtml(array $fieldNames)
67
+ {
68
+
69
+ $dpdCarrier = Mage::helper('zitec_dpd')->isDpdCarrierByOrder($this->_getAddress()->getOrder());
70
+ if(!$dpdCarrier){
71
+ return '';
72
+ }
73
+ if (!$fieldNames) {
74
+ return '';
75
+ }
76
+
77
+ $fieldsHtml = '';
78
+ foreach ($fieldNames as $fieldName) {
79
+ $fieldsHtml .= "
80
+ field = $('{$fieldName}');
81
+ if (field) {
82
+ fields.push(field);
83
+ }";
84
+ }
85
+
86
+ $html = "
87
+ <script type='text/javascript'>
88
+ //<![CDATA[
89
+ var className = '{$this->getClassName()}',
90
+ fields = [],
91
+ field = null,
92
+ message = '{$this->getMessage()}',
93
+ maxLength = {$this->getMaxLength()},
94
+ minLength = {$this->getMinLength()};
95
+
96
+ {$fieldsHtml}
97
+
98
+ new zitecFieldLengths.Validator(className, fields, message, maxLength, minLength);
99
+ //]]>
100
+ </script>";
101
+
102
+ return $html;
103
+ }
104
+
105
+ }
106
+
107
+
app/code/community/Zitec/Dpd/Block/Adminhtml/Sales/Order/Shipment/View.php CHANGED
@@ -1,75 +1,75 @@
1
- <?php
2
- /**
3
- * Zitec_Dpd – shipping carrier extension
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- *
12
- * @category Zitec
13
- * @package Zitec_Dpd
14
- * @copyright Copyright (c) 2014 Zitec COM
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
-
18
- /**
19
- *
20
- * @category Zitec
21
- * @package Zitec_Dpd
22
- * @author Zitec COM <magento@zitec.ro>
23
- */
24
- class Zitec_Dpd_Block_Adminhtml_Sales_Order_Shipment_View extends Mage_Adminhtml_Block_Sales_Order_Shipment_View
25
- {
26
-
27
-
28
- public function __construct()
29
- {
30
-
31
- parent::__construct();
32
-
33
- if (!$this->_getHelper()->moduleIsActive()) {
34
- return;
35
- }
36
-
37
- if (!$this->_getHelper()->isShippingMethodDpd($this->getShipment()->getOrder()->getShippingMethod()) || $this->_getHelper()->isCancelledWithDpd($this->getShipment())) {
38
- return;
39
- }
40
-
41
-
42
- $isManifestClosed = $this->_getHelper()->isManifestClosed($this->getShipment()->getId());
43
- if ($isManifestClosed) {
44
- $onClick = 'setLocation(\'' . $this->_getManifestUrl() . '\')';
45
- } else {
46
- $onClick = "deleteConfirm('"
47
- . $this->_getHelper()->__('Once the manifest is closed, you will not be able to make further changes to the shipping address. Do you want to continue?')
48
- . "', '" . $this->_getManifestUrl() . "')";
49
- }
50
-
51
- $this->_addButton('closemanifest', array(
52
- 'label' => $isManifestClosed ? $this->_getHelper()->__('Print Manifest') : $this->_getHelper()->__('Close Manifest'),
53
- 'class' => 'save',
54
- 'onclick' => $onClick,
55
- 'sort_order' => -10
56
- ));
57
- }
58
-
59
-
60
- protected function _getManifestUrl()
61
- {
62
- return Mage::helper('adminhtml')->getUrl("zitec_dpd/adminhtml_shipment/manifest", array("shipment_ids" => $this->getShipment()->getId()));
63
- }
64
-
65
-
66
- /**
67
- *
68
- * @return Zitec_Dpd_Helper_Data
69
- */
70
- protected function _getHelper()
71
- {
72
- return Mage::helper('zitec_dpd');
73
- }
74
-
75
}
1
+ <?php
2
+ /**
3
+ * Zitec_Dpd – shipping carrier extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Zitec
13
+ * @package Zitec_Dpd
14
+ * @copyright Copyright (c) 2014 Zitec COM
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+
18
+ /**
19
+ *
20
+ * @category Zitec
21
+ * @package Zitec_Dpd
22
+ * @author Zitec COM <magento@zitec.ro>
23
+ */
24
+ class Zitec_Dpd_Block_Adminhtml_Sales_Order_Shipment_View extends Mage_Adminhtml_Block_Sales_Order_Shipment_View
25
+ {
26
+
27
+
28
+ public function __construct()
29
+ {
30
+
31
+ parent::__construct();
32
+
33
+ if (!$this->_getHelper()->moduleIsActive()) {
34
+ return;
35
+ }
36
+
37
+ if (!$this->_getHelper()->isShippingMethodDpd($this->getShipment()->getOrder()->getShippingMethod()) || $this->_getHelper()->isCancelledWithDpd($this->getShipment())) {
38
+ return;
39
+ }
40
+
41
+
42
+ $isManifestClosed = $this->_getHelper()->isManifestClosed($this->getShipment()->getId());
43
+ if ($isManifestClosed) {
44
+ $onClick = 'setLocation(\'' . $this->_getManifestUrl() . '\')';
45
+ } else {
46
+ $onClick = "deleteConfirm('"
47
+ . $this->_getHelper()->__('Once the manifest is closed, you will not be able to make further changes to the shipping address. Do you want to continue?')
48
+ . "', '" . $this->_getManifestUrl() . "')";
49
+ }
50
+
51
+ $this->_addButton('closemanifest', array(
52
+ 'label' => $isManifestClosed ? $this->_getHelper()->__('Print Manifest') : $this->_getHelper()->__('Close Manifest'),
53
+ 'class' => 'save',
54
+ 'onclick' => $onClick,
55
+ 'sort_order' => -10
56
+ ));
57
+ }
58
+
59
+
60
+ protected function _getManifestUrl()
61
+ {
62
+ return Mage::helper('adminhtml')->getUrl("zitec_dpd/adminhtml_shipment/manifest", array("shipment_ids" => $this->getShipment()->getId()));
63
+ }
64
+
65
+
66
+ /**
67
+ *
68
+ * @return Zitec_Dpd_Helper_Data
69
+ */
70
+ protected function _getHelper()
71
+ {
72
+ return Mage::helper('zitec_dpd');
73
+ }
74
+
75
}
app/code/community/Zitec/Dpd/Block/Adminhtml/Sales/Order/Shipment/View/Tracking.php CHANGED
@@ -1,81 +1,81 @@
1
- <?php
2
- /**
3
- * Zitec_Dpd – shipping carrier extension
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- *
12
- * @category Zitec
13
- * @package Zitec_Dpd
14
- * @copyright Copyright (c) 2014 Zitec COM
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
-
18
- /**
19
- *
20
- * @category Zitec
21
- * @package Zitec_Dpd
22
- * @author Zitec COM <magento@zitec.ro>
23
- */
24
- class Zitec_Dpd_Block_Adminhtml_Sales_Order_Shipment_View_Tracking extends Mage_Adminhtml_Block_Sales_Order_Shipment_View_Tracking
25
- {
26
-
27
- /**
28
- * check if the carrier code is one of DPD
29
- *
30
- * @return boolean
31
- */
32
- public function isDPD()
33
- {
34
- $shippingMethod = $this->getShipment()->getOrder()->getShippingMethod();
35
-
36
- return $this->_getHelper()->isShippingMethodDpd($shippingMethod);
37
- }
38
-
39
-
40
- public function getShipInfo()
41
- {
42
- return '';
43
- }
44
-
45
-
46
- /**
47
- *
48
- * @param type $track
49
- *
50
- * @return string
51
- */
52
- public function getRemoveUrl($track)
53
- {
54
- if ($this->isDpdTrack($track)) {
55
- Mage::helper('adminhtml')->getUrl("zitec_dpd/adminhtml_shipment/manifest", array("shipment_ids" => $this->getShipment()->getId()));
56
-
57
- return $this->getUrl('zitec_dpd/adminhtml_shipment/delete/', array(
58
- 'shipment_id' => $this->getShipment()->getId(),
59
- 'track_id' => $track->getId()
60
- ));
61
- } else {
62
- return parent::getRemoveUrl($track);
63
- }
64
- }
65
-
66
-
67
- /**
68
- *
69
- * @return Zitec_Dpd_Helper_Data
70
- */
71
- protected function _getHelper()
72
- {
73
- return Mage::helper('zitec_dpd');
74
- }
75
-
76
- public function isDpdTrack(Mage_Sales_Model_Order_Shipment_Track $track)
77
- {
78
- return $this->_getHelper()->isDpdTrack($track);
79
- }
80
-
81
}
1
+ <?php
2
+ /**
3
+ * Zitec_Dpd – shipping carrier extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Zitec
13
+ * @package Zitec_Dpd
14
+ * @copyright Copyright (c) 2014 Zitec COM
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+
18
+ /**
19
+ *
20
+ * @category Zitec
21
+ * @package Zitec_Dpd
22
+ * @author Zitec COM <magento@zitec.ro>
23
+ */
24
+ class Zitec_Dpd_Block_Adminhtml_Sales_Order_Shipment_View_Tracking extends Mage_Adminhtml_Block_Sales_Order_Shipment_View_Tracking
25
+ {
26
+
27
+ /**
28
+ * check if the carrier code is one of DPD
29
+ *
30
+ * @return boolean
31
+ */
32
+ public function isDPD()
33
+ {
34
+ $shippingMethod = $this->getShipment()->getOrder()->getShippingMethod();
35
+
36
+ return $this->_getHelper()->isShippingMethodDpd($shippingMethod);
37
+ }
38
+
39
+
40
+ public function getShipInfo()
41
+ {
42
+ return '';
43
+ }
44
+
45
+
46
+ /**
47
+ *
48
+ * @param type $track
49
+ *
50
+ * @return string
51
+ */
52
+ public function getRemoveUrl($track)
53
+ {
54
+ if ($this->isDpdTrack($track)) {
55
+ Mage::helper('adminhtml')->getUrl("zitec_dpd/adminhtml_shipment/manifest", array("shipment_ids" => $this->getShipment()->getId()));
56
+
57
+ return $this->getUrl('zitec_dpd/adminhtml_shipment/delete/', array(
58
+ 'shipment_id' => $this->getShipment()->getId(),
59
+ 'track_id' => $track->getId()
60
+ ));
61
+ } else {
62
+ return parent::getRemoveUrl($track);
63
+ }
64
+ }
65
+
66
+
67
+ /**
68
+ *
69
+ * @return Zitec_Dpd_Helper_Data
70
+ */
71
+ protected function _getHelper()
72
+ {
73
+ return Mage::helper('zitec_dpd');
74
+ }
75
+
76
+ public function isDpdTrack(Mage_Sales_Model_Order_Shipment_Track $track)
77
+ {
78
+ return $this->_getHelper()->isDpdTrack($track);
79
+ }
80
+
81
}
app/code/community/Zitec/Dpd/Block/Adminhtml/Sales/Shipment/Grid.php CHANGED
@@ -1,119 +1,119 @@
1
- <?php
2
- /**
3
- * Zitec_Dpd – shipping carrier extension
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- *
12
- * @category Zitec
13
- * @package Zitec_Dpd
14
- * @copyright Copyright (c) 2014 Zitec COM
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
-
18
- /**
19
- *
20
- * @category Zitec
21
- * @package Zitec_Dpd
22
- * @author Zitec COM <magento@zitec.ro>
23
- */
24
- class Zitec_Dpd_Block_Adminhtml_Sales_Shipment_Grid extends Mage_Adminhtml_Block_Sales_Shipment_Grid
25
- {
26
-
27
-
28
- /**
29
- * Prepare and add columns to grid
30
- *
31
- * @return Mage_Adminhtml_Block_Widget_Grid
32
- */
33
- protected function _prepareColumns()
34
- {
35
- if ($this->_getHelper()->moduleIsActive()) {
36
- $this->addColumn('zitec_dpd_manifest', array(
37
- 'header' => $this->_getHelper()->__('Manifest'),
38
- 'index' => 'zitec_manifest_id',
39
- 'type' => 'text',
40
- 'renderer' => 'Zitec_Dpd_Block_Adminhtml_Sales_Shipment_Grid_Renderer_Manifest',
41
- 'filter_condition_callback' => array($this, '_filterManifesto'),
42
- ));
43
-
44
- $this->addColumnsOrder('zitec_dpd_manifest_closed', 'total_qty');
45
-
46
- /*
47
- * removed column from frontend temporary
48
- *
49
- $this->addColumn('zitec_dpd_pickup_time', array(
50
- 'header' => $this->_getHelper()->__('DPD Pickup'),
51
- 'index' => 'zitec_dpd_pickup_time',
52
- 'type' => 'text',
53
- ));
54
- $this->addColumnsOrder('zitec_dpd_pickup_time', 'zitec_dpd_manifest');
55
- */
56
-
57
- }
58
-
59
- return parent::_prepareColumns();
60
-
61
-
62
- }
63
-
64
- /**
65
- *
66
- * @return Mage_Sales_Model_Resource_Order_Shipment_Grid_Collection
67
- */
68
- public function getCollection()
69
- {
70
- $collection = parent::getCollection();
71
- if ($collection && !$this->getIsI4ShipsJoined()) {
72
- /* @var $collection Mage_Sales_Model_Resource_Order_Shipment_Grid_Collection */
73
- $resource = Mage::getSingleton('core/resource');
74
- /* @var $resource Mage_Core_Model_Resource */
75
- $shipsTableName = $resource->getTableName('zitec_dpd_ships');
76
- $manifestTableName = $resource->getTableName('zitec_dpd_manifest');
77
-
78
- $collection->getSelect()
79
- ->joinLeft(array('ships' => $shipsTableName), 'ships.shipment_id = main_table.entity_id', array('zitec_manifest_id' => 'ships.manifest_id'))
80
- ->joinLeft(array('manifest' => $manifestTableName), 'manifest.manifest_id = ships.manifest_id', array('zitec_manifest_ref' => 'manifest.manifest_ref'));
81
- $this->setIsI4ShipsJoined(true);
82
- }
83
-
84
- return $collection;
85
- }
86
-
87
- /**
88
- *
89
- * @param Mage_Sales_Model_Resource_Order_Shipment_Grid_Collection $collection
90
- * @param Mage_Adminhtml_Block_Widget_Grid_Column $column
91
- *
92
- * @return \Zitec_Dpd_Block_Adminhtml_Sales_Shipment_Grid
93
- */
94
- protected function _filterManifesto($collection, $column)
95
- {
96
- $manifestRef = $column->getFilter()->getCondition();
97
- if ($manifestRef) {
98
- $resource = Mage::getSingleton('core/resource');
99
- /* @var $resource Mage_Core_Model_Resource */
100
- $whereClause = $resource->getConnection("core_read")->quoteInto("manifest.manifest_ref like ? ", $manifestRef);
101
- $collection->getSelect()
102
- ->where($whereClause);
103
- $debug = (string)$collection->getSelect();
104
- }
105
-
106
- return $this;
107
- }
108
-
109
- /**
110
- *
111
- * @return Zitec_Dpd_Helper_Data
112
- */
113
- protected function _getHelper()
114
- {
115
- return Mage::helper('zitec_dpd');
116
- }
117
-
118
- }
119
-
1
+ <?php
2
+ /**
3
+ * Zitec_Dpd – shipping carrier extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Zitec
13
+ * @package Zitec_Dpd
14
+ * @copyright Copyright (c) 2014 Zitec COM
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+
18
+ /**
19
+ *
20
+ * @category Zitec
21
+ * @package Zitec_Dpd
22
+ * @author Zitec COM <magento@zitec.ro>
23
+ */
24
+ class Zitec_Dpd_Block_Adminhtml_Sales_Shipment_Grid extends Mage_Adminhtml_Block_Sales_Shipment_Grid
25
+ {
26
+
27
+
28
+ /**
29
+ * Prepare and add columns to grid
30
+ *
31
+ * @return Mage_Adminhtml_Block_Widget_Grid
32
+ */
33
+ protected function _prepareColumns()
34
+ {
35
+ if ($this->_getHelper()->moduleIsActive()) {
36
+ $this->addColumn('zitec_dpd_manifest', array(
37
+ 'header' => $this->_getHelper()->__('Manifest'),
38
+ 'index' => 'zitec_manifest_id',
39
+ 'type' => 'text',
40
+ 'renderer' => 'Zitec_Dpd_Block_Adminhtml_Sales_Shipment_Grid_Renderer_Manifest',
41
+ 'filter_condition_callback' => array($this, '_filterManifesto'),
42
+ ));
43
+
44
+ $this->addColumnsOrder('zitec_dpd_manifest_closed', 'total_qty');
45
+
46
+ /*
47
+ * removed column from frontend temporary
48
+ *
49
+ $this->addColumn('zitec_dpd_pickup_time', array(
50
+ 'header' => $this->_getHelper()->__('DPD Pickup'),
51
+ 'index' => 'zitec_dpd_pickup_time',
52
+ 'type' => 'text',
53
+ ));
54
+ $this->addColumnsOrder('zitec_dpd_pickup_time', 'zitec_dpd_manifest');
55
+ */
56
+
57
+ }
58
+
59
+ return parent::_prepareColumns();
60
+
61
+
62
+ }
63
+
64
+ /**
65
+ *
66
+ * @return Mage_Sales_Model_Resource_Order_Shipment_Grid_Collection
67
+ */
68
+ public function getCollection()
69
+ {
70
+ $collection = parent::getCollection();
71
+ if ($collection && !$this->getIsI4ShipsJoined()) {
72
+ /* @var $collection Mage_Sales_Model_Resource_Order_Shipment_Grid_Collection */
73
+ $resource = Mage::getSingleton('core/resource');
74
+ /* @var $resource Mage_Core_Model_Resource */
75
+ $shipsTableName = $resource->getTableName('zitec_dpd_ships');
76
+ $manifestTableName = $resource->getTableName('zitec_dpd_manifest');
77
+
78
+ $collection->getSelect()
79
+ ->joinLeft(array('ships' => $shipsTableName), 'ships.shipment_id = main_table.entity_id', array('zitec_manifest_id' => 'ships.manifest_id'))
80
+ ->joinLeft(array('manifest' => $manifestTableName), 'manifest.manifest_id = ships.manifest_id', array('zitec_manifest_ref' => 'manifest.manifest_ref'));
81
+ $this->setIsI4ShipsJoined(true);
82
+ }
83
+
84
+ return $collection;
85
+ }
86
+
87
+ /**
88
+ *
89
+ * @param Mage_Sales_Model_Resource_Order_Shipment_Grid_Collection $collection
90
+ * @param Mage_Adminhtml_Block_Widget_Grid_Column $column
91
+ *
92
+ * @return \Zitec_Dpd_Block_Adminhtml_Sales_Shipment_Grid
93
+ */
94
+ protected function _filterManifesto($collection, $column)
95
+ {
96
+ $manifestRef = $column->getFilter()->getCondition();
97
+ if ($manifestRef) {
98
+ $resource = Mage::getSingleton('core/resource');
99
+ /* @var $resource Mage_Core_Model_Resource */
100
+ $whereClause = $resource->getConnection("core_read")->quoteInto("manifest.manifest_ref like ? ", $manifestRef);
101
+ $collection->getSelect()
102
+ ->where($whereClause);
103
+ $debug = (string)$collection->getSelect();
104
+ }
105
+
106
+ return $this;
107
+ }
108
+
109
+ /**
110
+ *
111
+ * @return Zitec_Dpd_Helper_Data
112
+ */
113
+ protected function _getHelper()
114
+ {
115
+ return Mage::helper('zitec_dpd');
116
+ }
117
+
118
+ }
119
+
app/code/community/Zitec/Dpd/Block/Adminhtml/Sales/Shipment/Grid/Renderer/Manifest.php CHANGED
@@ -1,52 +1,52 @@
1
- <?php
2
- /**
3
- * Zitec_Dpd – shipping carrier extension
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- *
12
- * @category Zitec
13
- * @package Zitec_Dpd
14
- * @copyright Copyright (c) 2014 Zitec COM
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
-
18
- /**
19
- *
20
- * @category Zitec
21
- * @package Zitec_Dpd
22
- * @author Zitec COM <magento@zitec.ro>
23
- */
24
- class Zitec_Dpd_Block_Adminhtml_Sales_Shipment_Grid_Renderer_Manifest extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
25
- {
26
-
27
- public function render(Varien_Object $row)
28
- {
29
- $manifestId = $row->getData('zitec_manifest_id');
30
- $manifestRef = $row->getData('zitec_manifest_ref');
31
- if ($manifestId && $manifestRef) {
32
- $url = $this->_getHelper()->getDownloadManifestUrl($manifestId);
33
-
34
- return "<a href='{$url}'>{$this->_getHelper()->escapeHtml($manifestRef)}</a>";
35
- } else {
36
- return '';
37
- }
38
-
39
- }
40
-
41
- /**
42
- *
43
- * @return Zitec_Dpd_Helper_Data
44
- */
45
- protected function _getHelper()
46
- {
47
- return Mage::helper('zitec_dpd');
48
- }
49
-
50
- }
51
-
52
-
1
+ <?php
2
+ /**
3
+ * Zitec_Dpd – shipping carrier extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Zitec
13
+ * @package Zitec_Dpd
14
+ * @copyright Copyright (c) 2014 Zitec COM
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+
18
+ /**
19
+ *
20
+ * @category Zitec
21
+ * @package Zitec_Dpd
22
+ * @author Zitec COM <magento@zitec.ro>
23
+ */
24
+ class Zitec_Dpd_Block_Adminhtml_Sales_Shipment_Grid_Renderer_Manifest extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
25
+ {
26
+
27
+ public function render(Varien_Object $row)
28
+ {
29
+ $manifestId = $row->getData('zitec_manifest_id');
30
+ $manifestRef = $row->getData('zitec_manifest_ref');
31
+ if ($manifestId && $manifestRef) {
32
+ $url = $this->_getHelper()->getDownloadManifestUrl($manifestId);
33
+
34
+ return "<a href='{$url}'>{$this->_getHelper()->escapeHtml($manifestRef)}</a>";
35
+ } else {
36
+ return '';
37
+ }
38
+
39
+ }
40
+
41
+ /**
42
+ *
43
+ * @return Zitec_Dpd_Helper_Data
44
+ */
45
+ protected function _getHelper()
46
+ {
47
+ return Mage::helper('zitec_dpd');
48
+ }
49
+
50
+ }
51
+
52
+
app/code/community/Zitec/Dpd/Block/Adminhtml/Shipment/Postcode/Autocompleter.php CHANGED
@@ -1,31 +1,31 @@
1
- <?php
2
- /**
3
- * Zitec_Dpd – shipping carrier extension
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- *
12
- * @category Zitec
13
- * @package Zitec_Dpd
14
- * @copyright Copyright (c) 2014 Zitec COM
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
-
18
- /**
19
- *
20
- * @category Zitec
21
- * @package Zitec_Dpd
22
- * @author Zitec COM <magento@zitec.ro>
23
- */
24
- class Zitec_Dpd_Block_Adminhtml_Shipment_Postcode_Autocompleter extends Mage_Adminhtml_Block_Template
25
- {
26
-
27
-
28
-
29
-
30
- }
31
-
1
+ <?php
2
+ /**
3
+ * Zitec_Dpd – shipping carrier extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Zitec
13
+ * @package Zitec_Dpd
14
+ * @copyright Copyright (c) 2014 Zitec COM
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+
18
+ /**
19
+ *
20
+ * @category Zitec
21
+ * @package Zitec_Dpd
22
+ * @author Zitec COM <magento@zitec.ro>
23
+ */
24
+ class Zitec_Dpd_Block_Adminhtml_Shipment_Postcode_Autocompleter extends Mage_Adminhtml_Block_Template
25
+ {
26
+
27
+
28
+
29
+
30
+ }
31
+
app/code/community/Zitec/Dpd/Block/Adminhtml/System/Config/Button/Export.php CHANGED
@@ -1,48 +1,48 @@
1
- <?php
2
- /**
3
- * Zitec_Dpd – shipping carrier extension
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- *
12
- * @category Zitec
13
- * @package Zitec_Dpd
14
- * @copyright Copyright (c) 2014 Zitec COM
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
-
18
- /**
19
- *
20
- * @category Zitec
21
- * @package Zitec_Dpd
22
- * @author Zitec COM <magento@zitec.ro>
23
- */
24
- class Zitec_Dpd_Block_Adminhtml_System_Config_Button_Export extends Mage_Adminhtml_Block_System_Config_Form_Field
25
- {
26
-
27
- protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
28
- {
29
- $buttonBlock = $element->getForm()->getParent()->getLayout()->createBlock('adminhtml/widget_button');
30
-
31
- $params = array(
32
- 'website' => $buttonBlock->getRequest()->getParam('website')
33
- );
34
-
35
- $data = array(
36
- 'label' => Mage::helper('adminhtml')->__('Export CSV'),
37
- 'onclick' => 'setLocation(\'' . Mage::helper('adminhtml')->getUrl("zitec_dpd/adminhtml_config/exportTablerates", $params) . '\')',
38
- 'class' => '',
39
- );
40
-
41
- $html = $buttonBlock->setData($data)->toHtml();
42
-
43
- return $html;
44
- }
45
-
46
- }
47
-
48
-
1
+ <?php
2
+ /**
3
+ * Zitec_Dpd – shipping carrier extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Zitec
13
+ * @package Zitec_Dpd
14
+ * @copyright Copyright (c) 2014 Zitec COM
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+
18
+ /**
19
+ *
20
+ * @category Zitec
21
+ * @package Zitec_Dpd
22
+ * @author Zitec COM <magento@zitec.ro>
23
+ */
24
+ class Zitec_Dpd_Block_Adminhtml_System_Config_Button_Export extends Mage_Adminhtml_Block_System_Config_Form_Field
25
+ {
26
+
27
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
28
+ {
29
+ $buttonBlock = $element->getForm()->getParent()->getLayout()->createBlock('adminhtml/widget_button');
30
+
31
+ $params = array(
32
+ 'website' => $buttonBlock->getRequest()->getParam('website')
33
+ );
34
+
35
+ $data = array(
36
+ 'label' => Mage::helper('adminhtml')->__('Export CSV'),
37
+ 'onclick' => 'setLocation(\'' . Mage::helper('adminhtml')->getUrl("zitec_dpd/adminhtml_config/exportTablerates", $params) . '\')',
38
+ 'class' => '',
39
+ );
40
+
41
+ $html = $buttonBlock->setData($data)->toHtml();
42
+
43
+ return $html;
44
+ }
45
+
46
+ }
47
+
48
+
app/code/community/Zitec/Dpd/Block/Adminhtml/Tablerate/Grid.php CHANGED
@@ -1,155 +1,155 @@
1
- <?php
2
- /**
3
- * Zitec_Dpd – shipping carrier extension
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- *
12
- * @category Zitec
13
- * @package Zitec_Dpd
14
- * @copyright Copyright (c) 2014 Zitec COM
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
-
18
- /**
19
- *
20
- * @category Zitec
21
- * @package Zitec_Dpd
22
- * @author Zitec COM <magento@zitec.ro>
23
- */
24
- class Zitec_Dpd_Block_Adminhtml_Tablerate_Grid extends Mage_Adminhtml_Block_Widget_Grid
25
- {
26
-
27
- /**
28
- * Website filter
29
- *
30
- * @var int
31
- */
32
- protected $_websiteId;
33
-
34
-
35
- /**
36
- * Define grid properties
37
- *
38
- * @return void
39
- */
40
- public function __construct()
41
- {
42
- parent::__construct();
43
- $this->setId('zitec_dpd_shippingTablerateGrid');
44
- $this->_exportPageSize = 10000;
45
- }
46
-
47
-
48
- /**
49
- * Set current website
50
- *
51
- * @param int $websiteId
52
- *
53
- * @return Mage_Adminhtml_Block_Shipping_Carrier_Tablerate_Grid
54
- */
55
- public function setWebsiteId($websiteId)
56
- {
57
- $this->_websiteId = Mage::app()->getWebsite($websiteId)->getId();
58
-
59
- return $this;
60
- }
61
-
62
- /**
63
- * Retrieve current website id
64
- *
65
- * @return int
66
- */
67
- public function getWebsiteId()
68
- {
69
- if (is_null($this->_websiteId)) {
70
- $this->_websiteId = Mage::app()->getWebsite()->getId();
71
- }
72
-
73
- return $this->_websiteId;
74
- }
75
-
76
- /**
77
- * Prepare shipping table rate collection
78
- *
79
- * @return Mage_Adminhtml_Block_Shipping_Carrier_Tablerate_Grid
80
- */
81
- protected function _prepareCollection()
82
- {
83
- /** @var $collection Mage_Shipping_Model_Mysql4_Carrier_Tablerate_Collection */
84
- $collection = Mage::getResourceModel('zitec_dpd/carrier_tablerate_collection');
85
- $collection->setWebsiteFilter($this->getWebsiteId());
86
-
87
- $this->setCollection($collection);
88
-
89
- return parent::_prepareCollection();
90
- }
91
-
92
- /**
93
- * Prepare table columns
94
- *
95
- * @return Mage_Adminhtml_Block_Widget_Grid
96
- */
97
- protected function _prepareColumns()
98
- {
99
-
100
- // 'website_id', 'dest_country_id', 'dest_region_id', 'dest_zip', 'weight', 'price', 'method'
101
- $this->addColumn('dest_country', array(
102
- 'header' => Mage::helper('adminhtml')->__('Country'),
103
- 'index' => 'dest_country',
104
- 'default' => '*',
105
- ));
106
-
107
- $this->addColumn('dest_region', array(
108
- 'header' => Mage::helper('adminhtml')->__('Region/State'),
109
- 'index' => 'dest_region',
110
- 'default' => '*',
111
- ));
112
-
113
- $this->addColumn('dest_zip', array(
114
- 'header' => Mage::helper('adminhtml')->__('Zip/Postal Code'),
115
- 'index' => 'dest_zip',
116
- 'default' => '*',
117
- ));
118
-
119
- $this->addColumn('weight', array(
120
- 'header' => 'Weight / Price (and above)',
121
- 'index' => 'weight',
122
- ));
123
-
124
- $this->addColumn('price', array(
125
- 'header' => Mage::helper('adminhtml')->__('Shipping Price/Percentage/Addition'),
126
- 'index' => 'shipping_price',
127
- ));
128
-
129
- $this->addColumn('Method', array(
130
- 'header' => 'Method',
131
- 'index' => 'method',
132
- ));
133
-
134
- $this->addColumn('cashondelivery_surcharge', array(
135
- 'header' => 'Cash On Delivery Surcharge',
136
- 'index' => 'cashondelivery_surcharge',
137
- 'default' => ''
138
- ));
139
-
140
- $this->addColumn('cod_min_surcharge', array(
141
- 'header' => 'Minimum COD Surcharge',
142
- 'index' => 'cod_min_surcharge',
143
- 'default' => ''
144
- ));
145
-
146
- $this->addColumn('price_vs_dest', array(
147
- 'header' => 'Price vs Dest',
148
- 'index' => 'price_vs_dest',
149
- 'default' => '0'
150
- ));
151
-
152
-
153
- return parent::_prepareColumns();
154
- }
155
- }
1
+ <?php
2
+ /**
3
+ * Zitec_Dpd – shipping carrier extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Zitec
13
+ * @package Zitec_Dpd
14
+ * @copyright Copyright (c) 2014 Zitec COM
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+
18
+ /**
19
+ *
20
+ * @category Zitec
21
+ * @package Zitec_Dpd
22
+ * @author Zitec COM <magento@zitec.ro>
23
+ */
24
+ class Zitec_Dpd_Block_Adminhtml_Tablerate_Grid extends Mage_Adminhtml_Block_Widget_Grid
25
+ {
26
+
27
+ /**
28
+ * Website filter
29
+ *
30
+ * @var int
31
+ */
32
+ protected $_websiteId;
33
+
34
+
35
+ /**
36
+ * Define grid properties
37
+ *
38
+ * @return void
39
+ */
40
+ public function __construct()
41
+ {
42
+ parent::__construct();
43
+ $this->setId('zitec_dpd_shippingTablerateGrid');
44
+ $this->_exportPageSize = 10000;
45
+ }
46
+
47
+
48
+ /**
49
+ * Set current website
50
+ *
51
+ * @param int $websiteId
52
+ *
53
+ * @return Mage_Adminhtml_Block_Shipping_Carrier_Tablerate_Grid
54
+ */
55
+ public function setWebsiteId($websiteId)
56
+ {
57
+ $this->_websiteId = Mage::app()->getWebsite($websiteId)->getId();
58
+
59
+ return $this;
60
+ }
61
+
62
+ /**
63
+ * Retrieve current website id
64
+ *
65
+ * @return int
66
+ */
67
+ public function getWebsiteId()
68
+ {
69
+ if (is_null($this->_websiteId)) {
70
+ $this->_websiteId = Mage::app()->getWebsite()->getId();
71
+ }
72
+
73
+ return $this->_websiteId;
74
+ }
75
+
76
+ /**
77
+ * Prepare shipping table rate collection
78
+ *
79
+ * @return Mage_Adminhtml_Block_Shipping_Carrier_Tablerate_Grid
80
+ */
81
+ protected function _prepareCollection()
82
+ {
83
+ /** @var $collection Mage_Shipping_Model_Mysql4_Carrier_Tablerate_Collection */
84
+ $collection = Mage::getResourceModel('zitec_dpd/carrier_tablerate_collection');
85
+ $collection->setWebsiteFilter($this->getWebsiteId());
86
+
87
+ $this->setCollection($collection);
88
+
89
+ return parent::_prepareCollection();
90
+ }
91
+
92
+ /**
93
+ * Prepare table columns
94
+ *
95
+ * @return Mage_Adminhtml_Block_Widget_Grid
96
+ */
97
+ protected function _prepareColumns()
98
+ {
99
+
100
+ // 'website_id', 'dest_country_id', 'dest_region_id', 'dest_zip', 'weight', 'price', 'method'
101
+ $this->addColumn('dest_country', array(
102
+ 'header' => Mage::helper('adminhtml')->__('Country'),
103
+ 'index' => 'dest_country',
104
+ 'default' => '*',
105
+ ));
106
+
107
+ $this->addColumn('dest_region', array(
108
+ 'header' => Mage::helper('adminhtml')->__('Region/State'),
109
+ 'index' => 'dest_region',
110
+ 'default' => '*',
111
+ ));
112
+
113
+ $this->addColumn('dest_zip', array(
114
+ 'header' => Mage::helper('adminhtml')->__('Zip/Postal Code'),
115
+ 'index' => 'dest_zip',
116
+ 'default' => '*',
117
+ ));
118
+
119
+ $this->addColumn('weight', array(
120
+ 'header' => 'Weight / Price (and above)',
121
+ 'index' => 'weight',
122
+ ));
123
+
124
+ $this->addColumn('price', array(
125
+ 'header' => Mage::helper('adminhtml')->__('Shipping Price/Percentage/Addition'),
126
+ 'index' => 'shipping_price',
127
+ ));
128
+
129
+ $this->addColumn('Method', array(
130
+ 'header' => 'Method',
131
+ 'index' => 'method',
132
+ ));
133
+
134
+ $this->addColumn('cashondelivery_surcharge', array(
135
+ 'header' => 'Cash On Delivery Surcharge',
136
+ 'index' => 'cashondelivery_surcharge',
137
+ 'default' => ''
138
+ ));
139
+
140
+ $this->addColumn('cod_min_surcharge', array(
141
+ 'header' => 'Minimum COD Surcharge',
142
+ 'index' => 'cod_min_surcharge',
143
+ 'default' => ''
144
+ ));
145
+
146
+ $this->addColumn('price_vs_dest', array(
147
+ 'header' => 'Price vs Dest',
148
+ 'index' => 'price_vs_dest',
149
+ 'default' => '0'
150
+ ));
151
+
152
+
153
+ return parent::_prepareColumns();
154
+ }
155
+ }
app/code/community/Zitec/Dpd/Block/Checkout/Onepage/Addresslength.php CHANGED
@@ -1,37 +1,37 @@
1
- <?php
2
- /**
3
- * Zitec_Dpd – shipping carrier extension
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- *
12
- * @category Zitec
13
- * @package Zitec_Dpd
14
- * @copyright Copyright (c) 2014 Zitec COM
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
-
18
- /**
19
- *
20
- * @category Zitec
21
- * @package Zitec_Dpd
22
- * @author Zitec COM <magento@zitec.ro>
23
- */
24
- class Zitec_Dpd_Block_Checkout_Onepage_Addresslength extends Zitec_Dpd_Block_Addresslength
25
- {
26
-
27
- /**
28
- *
29
- * @return array
30
- */
31
- public function getFieldNames()
32
- {
33
- return array("shipping:street1", "shipping:street2", "shipping:street3", "shipping:street4");
34
- }
35
- }
36
-
37
-
1
+ <?php
2
+ /**
3
+ * Zitec_Dpd – shipping carrier extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Zitec
13
+ * @package Zitec_Dpd
14
+ * @copyright Copyright (c) 2014 Zitec COM
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+
18
+ /**
19
+ *
20
+ * @category Zitec
21
+ * @package Zitec_Dpd
22
+ * @author Zitec COM <magento@zitec.ro>
23
+ */
24
+ class Zitec_Dpd_Block_Checkout_Onepage_Addresslength extends Zitec_Dpd_Block_Addresslength
25
+ {
26
+
27
+ /**
28
+ *
29
+ * @return array
30
+ */
31
+ public function getFieldNames()
32
+ {
33
+ return array("shipping:street1", "shipping:street2", "shipping:street3", "shipping:street4");
34
+ }
35
+ }
36
+
37
+
app/code/community/Zitec/Dpd/Block/Customer/Address/Edit/Addresslength.php CHANGED
@@ -1,37 +1,37 @@
1
- <?php
2
- /**
3
- * Zitec_Dpd – shipping carrier extension
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- *
12
- * @category Zitec
13
- * @package Zitec_Dpd
14
- * @copyright Copyright (c) 2014 Zitec COM
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
-
18
- /**
19
- *
20
- * @category Zitec
21
- * @package Zitec_Dpd
22
- * @author Zitec COM <magento@zitec.ro>
23
- */
24
- class Zitec_Dpd_Block_Customer_Address_Edit_Addresslength extends Zitec_Dpd_Block_Addresslength
25
- {
26
-
27
- /**
28
- *
29
- * @return array
30
- */
31
- public function getFieldNames()
32
- {
33
- return array("street_1", "street_2", "street_3", "street_4");
34
- }
35
- }
36
-
37
-
1
+ <?php
2
+ /**
3
+ * Zitec_Dpd – shipping carrier extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Zitec
13
+ * @package Zitec_Dpd
14
+ * @copyright Copyright (c) 2014 Zitec COM
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+
18
+ /**
19
+ *
20
+ * @category Zitec
21
+ * @package Zitec_Dpd
22
+ * @author Zitec COM <magento@zitec.ro>
23
+ */
24
+ class Zitec_Dpd_Block_Customer_Address_Edit_Addresslength extends Zitec_Dpd_Block_Addresslength
25
+ {
26
+
27
+ /**
28
+ *
29
+ * @return array
30
+ */
31
+ public function getFieldNames()
32
+ {
33
+ return array("street_1", "street_2", "street_3", "street_4");
34
+ }
35
+ }
36
+
37
+
app/code/community/Zitec/Dpd/Block/Order/Creditmemo/Totals/Cashondeliverysurcharge.php CHANGED
@@ -1,72 +1,72 @@
1
- <?php
2
- /**
3
- * Zitec_Dpd – shipping carrier extension
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- *
12
- * @category Zitec
13
- * @package Zitec_Dpd
14
- * @copyright Copyright (c) 2014 Zitec COM
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
-
18
- /**
19
- *
20
- * @category Zitec
21
- * @package Zitec_Dpd
22
- * @author Zitec COM <magento@zitec.ro>
23
- */
24
- class Zitec_Dpd_Block_Order_Creditmemo_Totals_Cashondeliverysurcharge extends Zitec_Dpd_Block_Order_Totals_Cashondeliverysurchage
25
- {
26
- /**
27
- *
28
- * @return float
29
- */
30
- protected function _getAmount()
31
- {
32
- return $this->_getCreditmemo()->getData('zitec_dpd_cashondelivery_surcharge');
33
- }
34
-
35
- /**
36
- *
37
- * @return float
38
- */
39
- protected function _getBaseAmount()
40
- {
41
- return $this->_getCreditmemo()->getData('base_zitec_dpd_cashondelivery_surcharge');
42
- }
43
-
44
- /**
45
- *
46
- * @return type
47
- */
48
- protected function _getCreditmemo()
49
- {
50
- return $this->getParentBlock()->getCreditmemo();
51
- }
52
-
53
- /**
54
- *
55
- * @return float
56
- */
57
- protected function _getBaseTax()
58
- {
59
- return $this->_getCreditmemo()->getData('base_zitec_dpd_cashondelivery_surcharge_tax');
60
- }
61
-
62
- /**
63
- *
64
- * @return float
65
- */
66
- protected function _getTax()
67
- {
68
- return $this->_getCreditmemo()->getData('zitec_dpd_cashondelivery_surcharge_tax');
69
- }
70
- }
71
-
72
-
1
+ <?php
2
+ /**
3
+ * Zitec_Dpd – shipping carrier extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Zitec
13
+ * @package Zitec_Dpd
14
+ * @copyright Copyright (c) 2014 Zitec COM
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+
18
+ /**
19
+ *
20
+ * @category Zitec
21
+ * @package Zitec_Dpd
22
+ * @author Zitec COM <magento@zitec.ro>
23
+ */
24
+ class Zitec_Dpd_Block_Order_Creditmemo_Totals_Cashondeliverysurcharge extends Zitec_Dpd_Block_Order_Totals_Cashondeliverysurchage
25
+ {
26
+ /**
27
+ *
28
+ * @return float
29
+ */
30
+ protected function _getAmount()
31
+ {
32
+ return $this->_getCreditmemo()->getData('zitec_dpd_cashondelivery_surcharge');
33
+ }
34
+
35
+ /**
36
+ *
37
+ * @return float
38
+ */
39
+ protected function _getBaseAmount()
40
+ {
41
+ return $this->_getCreditmemo()->getData('base_zitec_dpd_cashondelivery_surcharge');
42
+ }
43
+
44
+ /**
45
+ *
46
+ * @return type
47
+ */
48
+ protected function _getCreditmemo()
49
+ {
50
+ return $this->getParentBlock()->getCreditmemo();
51
+ }
52
+
53
+ /**
54
+ *
55
+ * @return float
56
+ */
57
+ protected function _getBaseTax()
58
+ {
59
+ return $this->_getCreditmemo()->getData('base_zitec_dpd_cashondelivery_surcharge_tax');
60
+ }
61
+
62
+ /**
63
+ *
64
+ * @return float
65
+ */
66
+ protected function _getTax()
67
+ {
68
+ return $this->_getCreditmemo()->getData('zitec_dpd_cashondelivery_surcharge_tax');
69
+ }
70
+ }
71
+
72
+
app/code/community/Zitec/Dpd/Block/Order/Invoice/Totals/Cashondeliverysurcharge.php CHANGED
@@ -1,72 +1,72 @@
1
- <?php
2
- /**
3
- * Zitec_Dpd – shipping carrier extension
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- *
12
- * @category Zitec
13
- * @package Zitec_Dpd
14
- * @copyright Copyright (c) 2014 Zitec COM
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
-
18
- /**
19
- *
20
- * @category Zitec
21
- * @package Zitec_Dpd
22
- * @author Zitec COM <magento@zitec.ro>
23
- */
24
- class Zitec_Dpd_Block_Order_Invoice_Totals_Cashondeliverysurcharge extends Zitec_Dpd_Block_Order_Totals_Cashondeliverysurchage
25
- {
26
- /**
27
- *
28
- * @return float
29
- */
30
- protected function _getAmount()
31
- {
32
- return $this->_getInvoice()->getData('zitec_dpd_cashondelivery_surcharge');
33
- }
34
-
35
- /**
36
- *
37
- * @return float
38
- */
39
- protected function _getBaseAmount()
40
- {
41
- return $this->_getInvoice()->getData('base_zitec_dpd_cashondelivery_surcharge');
42
- }
43
-
44
- /**
45
- *
46
- * @return type
47
- */
48
- protected function _getInvoice()
49
- {
50
- return $this->getParentBlock()->getInvoice();
51
- }
52
-
53
- /**
54
- *
55
- * @return float
56
- */
57
- protected function _getTax()
58
- {
59
- return $this->_getInvoice()->getData('zitec_dpd_cashondelivery_surcharge_tax');
60
- }
61
-
62
- /**
63
- *
64
- * @return float
65
- */
66
- protected function _getBaseTax()
67
- {
68
- return $this->_getInvoice()->getData('base_zitec_dpd_cashondelivery_surcharge_tax');
69
- }
70
- }
71
-
72
-
1
+ <?php
2
+ /**
3
+ * Zitec_Dpd – shipping carrier extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Zitec
13
+ * @package Zitec_Dpd
14
+ * @copyright Copyright (c) 2014 Zitec COM
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+
18
+ /**
19
+ *
20
+ * @category Zitec
21
+ * @package Zitec_Dpd
22
+ * @author Zitec COM <magento@zitec.ro>
23
+ */
24
+ class Zitec_Dpd_Block_Order_Invoice_Totals_Cashondeliverysurcharge extends Zitec_Dpd_Block_Order_Totals_Cashondeliverysurchage
25
+ {
26
+ /**
27
+ *
28
+ * @return float
29
+ */
30
+ protected function _getAmount()
31
+ {
32
+ return $this->_getInvoice()->getData('zitec_dpd_cashondelivery_surcharge');
33
+ }
34
+
35
+ /**
36
+ *
37
+ * @return float
38
+ */
39
+ protected function _getBaseAmount()
40
+ {
41
+ return $this->_getInvoice()->getData('base_zitec_dpd_cashondelivery_surcharge');
42
+ }
43
+
44
+ /**
45
+ *
46
+ * @return type
47
+ */
48
+ protected function _getInvoice()
49
+ {
50
+ return $this->getParentBlock()->getInvoice();
51
+ }
52
+
53
+ /**
54
+ *
55
+ * @return float
56
+ */
57
+ protected function _getTax()
58
+ {
59
+ return $this->_getInvoice()->getData('zitec_dpd_cashondelivery_surcharge_tax');
60
+ }
61
+
62
+ /**
63