zitec_dpd - Version 1.0.3

Version Notes

released first version

Download this release

Release Info

Developer Zitec
Extension zitec_dpd
Version 1.0.3
Comparing to
See all releases


Version 1.0.3

Files changed (350) hide show
  1. app/code/community/Zitec/Dpd/Block/Addresslength.php +138 -0
  2. app/code/community/Zitec/Dpd/Block/Adminhtml/Customer/Edit/Form/Addresslength.php +80 -0
  3. app/code/community/Zitec/Dpd/Block/Adminhtml/Order/Totals/Cashondeliverysurcharge/Newcreditmemo.php +39 -0
  4. app/code/community/Zitec/Dpd/Block/Adminhtml/Sales/Order/Address/Form/Addresslength.php +107 -0
  5. app/code/community/Zitec/Dpd/Block/Adminhtml/Sales/Order/Shipment/View.php +75 -0
  6. app/code/community/Zitec/Dpd/Block/Adminhtml/Sales/Order/Shipment/View/Tracking.php +81 -0
  7. app/code/community/Zitec/Dpd/Block/Adminhtml/Sales/Shipment/Grid.php +119 -0
  8. app/code/community/Zitec/Dpd/Block/Adminhtml/Sales/Shipment/Grid/Renderer/Manifest.php +52 -0
  9. app/code/community/Zitec/Dpd/Block/Adminhtml/Shipment/Postcode/Autocompleter.php +31 -0
  10. app/code/community/Zitec/Dpd/Block/Adminhtml/System/Config/Button/Export.php +48 -0
  11. app/code/community/Zitec/Dpd/Block/Adminhtml/Tablerate/Grid.php +155 -0
  12. app/code/community/Zitec/Dpd/Block/Checkout/Onepage/Addresslength.php +37 -0
  13. app/code/community/Zitec/Dpd/Block/Customer/Address/Edit/Addresslength.php +37 -0
  14. app/code/community/Zitec/Dpd/Block/Order/Creditmemo/Totals/Cashondeliverysurcharge.php +72 -0
  15. app/code/community/Zitec/Dpd/Block/Order/Invoice/Totals/Cashondeliverysurcharge.php +72 -0
  16. app/code/community/Zitec/Dpd/Block/Order/Totals/Cashondeliverysurchage.php +161 -0
  17. app/code/community/Zitec/Dpd/Block/Tax/Checkout/Cashondeliverysurchage.php +126 -0
  18. app/code/community/Zitec/Dpd/Helper/Compatibility.php +77 -0
  19. app/code/community/Zitec/Dpd/Helper/Data.php +595 -0
  20. app/code/community/Zitec/Dpd/Helper/Layout.php +107 -0
  21. app/code/community/Zitec/Dpd/Helper/Payment.php +57 -0
  22. app/code/community/Zitec/Dpd/Helper/Postcode/Search.php +182 -0
  23. app/code/community/Zitec/Dpd/Helper/Ws.php +396 -0
  24. app/code/community/Zitec/Dpd/Model/Config/Data/Abstract.php +75 -0
  25. app/code/community/Zitec/Dpd/Model/Config/Data/Mode.php +66 -0
  26. app/code/community/Zitec/Dpd/Model/Config/Data/Tablerate.php +47 -0
  27. app/code/community/Zitec/Dpd/Model/Config/Source/Abstract.php +58 -0
  28. app/code/community/Zitec/Dpd/Model/Config/Source/Order/Status/Pendingpayment.php +30 -0
  29. app/code/community/Zitec/Dpd/Model/Config/Source/Service.php +113 -0
  30. app/code/community/Zitec/Dpd/Model/Config/Source/Wscountry.php +57 -0
  31. app/code/community/Zitec/Dpd/Model/Dpd/Manifest.php +297 -0
  32. app/code/community/Zitec/Dpd/Model/Dpd/Pickup.php +41 -0
  33. app/code/community/Zitec/Dpd/Model/Dpd/Ship.php +40 -0
  34. app/code/community/Zitec/Dpd/Model/Mysql4/Carrier/Tablerate.php +735 -0
  35. app/code/community/Zitec/Dpd/Model/Mysql4/Carrier/Tablerate/Collection.php +109 -0
  36. app/code/community/Zitec/Dpd/Model/Mysql4/Dpd/Manifest.php +57 -0
  37. app/code/community/Zitec/Dpd/Model/Mysql4/Dpd/Pickup.php +34 -0
  38. app/code/community/Zitec/Dpd/Model/Mysql4/Dpd/Ship.php +41 -0
  39. app/code/community/Zitec/Dpd/Model/Mysql4/Dpd/Ship/Collection.php +92 -0
  40. app/code/community/Zitec/Dpd/Model/Observer/Address.php +179 -0
  41. app/code/community/Zitec/Dpd/Model/Observer/Manifest.php +54 -0
  42. app/code/community/Zitec/Dpd/Model/Observer/Payment.php +60 -0
  43. app/code/community/Zitec/Dpd/Model/Observer/Pickup.php +80 -0
  44. app/code/community/Zitec/Dpd/Model/Observer/Shipment.php +455 -0
  45. app/code/community/Zitec/Dpd/Model/Payment/Cashondelivery.php +213 -0
  46. app/code/community/Zitec/Dpd/Model/Payment/Cashondelivery/Source/AmountType.php +41 -0
  47. app/code/community/Zitec/Dpd/Model/Payment/Cashondelivery/Source/Codpaymenttype.php +42 -0
  48. app/code/community/Zitec/Dpd/Model/Payment/Cashondelivery/Source/Country.php +64 -0
  49. app/code/community/Zitec/Dpd/Model/Payment/Cashondelivery/Source/Service.php +66 -0
  50. app/code/community/Zitec/Dpd/Model/Sales/Order/Creditmemo/Total/Cashondeliverysurchage.php +62 -0
  51. app/code/community/Zitec/Dpd/Model/Sales/Order/Creditmemo/Total/Tax.php +50 -0
  52. app/code/community/Zitec/Dpd/Model/Sales/Order/Invoice/Total/Cashondeliverysurchage.php +61 -0
  53. app/code/community/Zitec/Dpd/Model/Sales/Order/Invoice/Total/Tax.php +60 -0
  54. app/code/community/Zitec/Dpd/Model/Sales/Order/Pdf/Total/Cashondeliverysurchage.php +114 -0
  55. app/code/community/Zitec/Dpd/Model/Sales/Order/Total/Cashondeliverysurchage.php +42 -0
  56. app/code/community/Zitec/Dpd/Model/Sales/Quote/Address/Total/Cashondeliverysurchage.php +183 -0
  57. app/code/community/Zitec/Dpd/Model/Shipping/Carrier/Abstract.php +88 -0
  58. app/code/community/Zitec/Dpd/Model/Shipping/Carrier/Dpd.php +542 -0
  59. app/code/community/Zitec/Dpd/controllers/Adminhtml/ConfigController.php +39 -0
  60. app/code/community/Zitec/Dpd/controllers/Adminhtml/ShipmentController.php +463 -0
  61. app/code/community/Zitec/Dpd/etc/adminhtml.xml +75 -0
  62. app/code/community/Zitec/Dpd/etc/config.xml +398 -0
  63. app/code/community/Zitec/Dpd/etc/system.xml +380 -0
  64. app/code/community/Zitec/Dpd/sql/zitec_dpd_setup/mysql4-install-1.0.0.php +209 -0
  65. app/code/community/Zitec/Dpd/sql/zitec_dpd_setup/mysql4-upgrade-1.0.0-1.0.1.php +44 -0
  66. app/code/community/Zitec/Dpd/sql/zitec_dpd_setup/mysql4-upgrade-1.0.1-1.0.2.php +37 -0
  67. app/code/community/Zitec/Dpd/sql/zitec_dpd_setup/mysql4-upgrade-1.0.2-1.0.3.php +38 -0
  68. app/code/community/Zitec/PackedShipment/Block/Addressvalidationdialog.php +105 -0
  69. app/code/community/Zitec/PackedShipment/Block/Addressvalidationinfojs.php +130 -0
  70. app/code/community/Zitec/PackedShipment/Helper/Data.php +143 -0
  71. app/code/community/Zitec/PackedShipment/Model/Carrier/Interface.php +97 -0
  72. app/code/community/Zitec/PackedShipment/Model/Package.php +272 -0
  73. app/code/community/Zitec/PackedShipment/Model/PackedShipment.php +51 -0
  74. app/code/community/Zitec/PackedShipment/controllers/Adminhtml/IndexController.php +119 -0
  75. app/code/community/Zitec/PackedShipment/etc/config.xml +61 -0
  76. app/code/community/Zitec/PrintShippingLabel/Block/Adminhtml/Sales/Order/Shipment/View.php +64 -0
  77. app/code/community/Zitec/PrintShippingLabel/Block/Adminhtml/Sales/View.php +69 -0
  78. app/code/community/Zitec/PrintShippingLabel/Helper/Data.php +29 -0
  79. app/code/community/Zitec/PrintShippingLabel/controllers/Adminhtml/IndexController.php +148 -0
  80. app/code/community/Zitec/PrintShippingLabel/etc/config.xml +89 -0
  81. app/code/community/Zitec/ReportsCommon/Block/RecordsReport/Grid.php +631 -0
  82. app/code/community/Zitec/ReportsCommon/Block/Renderer/Posnegcurrency.php +43 -0
  83. app/code/community/Zitec/ReportsCommon/Controller/Adminhtml/RecordsreportController.php +115 -0
  84. app/code/community/Zitec/ReportsCommon/Helper/Data.php +29 -0
  85. app/code/community/Zitec/ReportsCommon/etc/adminhtml.xml +32 -0
  86. app/code/community/Zitec/ReportsCommon/etc/config.xml +21 -0
  87. app/code/community/Zitec/ShippingReports/Block/Adminhtml/Profitability.php +47 -0
  88. app/code/community/Zitec/ShippingReports/Block/Adminhtml/Profitability/Grid.php +126 -0
  89. app/code/community/Zitec/ShippingReports/Block/Adminhtml/Profitability/Renderer/Orderref.php +39 -0
  90. app/code/community/Zitec/ShippingReports/Helper/Data.php +28 -0
  91. app/code/community/Zitec/ShippingReports/Model/Mysql4/Profitability/Collection.php +72 -0
  92. app/code/community/Zitec/ShippingReports/Model/Observer/Order.php +58 -0
  93. app/code/community/Zitec/ShippingReports/Model/Observer/Shipment.php +89 -0
  94. app/code/community/Zitec/ShippingReports/controllers/Adminhtml/Reports/ProfitabilityController.php +35 -0
  95. app/code/community/Zitec/ShippingReports/etc/adminhtml.xml +43 -0
  96. app/code/community/Zitec/ShippingReports/etc/config.xml +79 -0
  97. app/code/community/Zitec/ShippingReports/sql/zitec_shippingreports_setup/mysql4-install-1.0.0.php +41 -0
  98. app/code/community/Zitec/TableRates/Block/Adminhtml/Tablerate.php +75 -0
  99. app/code/community/Zitec/TableRates/Block/Adminhtml/Tablerate/Edit.php +357 -0
  100. app/code/community/Zitec/TableRates/Block/Adminhtml/Tablerate/Edit/Form.php +277 -0
  101. app/code/community/Zitec/TableRates/Block/Adminhtml/Tablerate/Export.php +62 -0
  102. app/code/community/Zitec/TableRates/Block/Adminhtml/Tablerate/Export/Form.php +75 -0
  103. app/code/community/Zitec/TableRates/Block/Adminhtml/Tablerate/Grid.php +351 -0
  104. app/code/community/Zitec/TableRates/Block/Adminhtml/Tablerate/Grid/Renderer/Shippingpercentage.php +38 -0
  105. app/code/community/Zitec/TableRates/Block/Adminhtml/Tablerate/Import.php +61 -0
  106. app/code/community/Zitec/TableRates/Block/Adminhtml/Tablerate/Import/Form.php +78 -0
  107. app/code/community/Zitec/TableRates/Block/Adminhtml/Widget/Grid/Column/Filter/Region.php +41 -0
  108. app/code/community/Zitec/TableRates/Helper/Data.php +267 -0
  109. app/code/community/Zitec/TableRates/Helper/Directory.php +76 -0
  110. app/code/community/Zitec/TableRates/Model/Mysql4/Tablerate.php +181 -0
  111. app/code/community/Zitec/TableRates/Model/Mysql4/Tablerate/Collection.php +92 -0
  112. app/code/community/Zitec/TableRates/Model/Source/Website.php +55 -0
  113. app/code/community/Zitec/TableRates/Model/Tablerate.php +89 -0
  114. app/code/community/Zitec/TableRates/controllers/Adminhtml/IndexController.php +462 -0
  115. app/code/community/Zitec/TableRates/etc/adminhtml.xml +21 -0
  116. app/code/community/Zitec/TableRates/etc/config.xml +101 -0
  117. app/design/adminhtml/default/default/layout/zitec_dpd.xml +94 -0
  118. app/design/adminhtml/default/default/layout/zitec_packedshipment.xml +34 -0
  119. app/design/adminhtml/default/default/layout/zitec_shippingreports.xml +8 -0
  120. app/design/adminhtml/default/default/layout/zitec_tablerates.xml +38 -0
  121. app/design/adminhtml/default/default/template/zitec_dpd/sales/order/address/postcode/alert-problem.phtml +25 -0
  122. app/design/adminhtml/default/default/template/zitec_dpd/sales/order/address/postcode/validate.phtml +38 -0
  123. app/design/adminhtml/default/default/template/zitec_dpd/sales/order/address/street/alert-problem.phtml +23 -0
  124. app/design/adminhtml/default/default/template/zitec_dpd/sales/order/shipment/postcode/autocompleter.phtml +15 -0
  125. app/design/adminhtml/default/default/template/zitec_dpd/sales/order/shipment/view/tracking.phtml +87 -0
  126. app/design/adminhtml/default/default/template/zitec_dpd/sales/order/shipment/view/tracking_17.phtml +87 -0
  127. app/design/adminhtml/default/default/template/zitec_packedshipment/sales/order/shipment/create/address_validation_dialog.phtml +142 -0
  128. app/design/adminhtml/default/default/template/zitec_packedshipment/sales/order/shipment/create/address_validation_info_js.phtml +18 -0
  129. app/design/adminhtml/default/default/template/zitec_packedshipment/sales/order/shipment/create/items.phtml +363 -0
  130. app/design/adminhtml/default/default/template/zitec_reportscommon/records_report_container.phtml +27 -0
  131. app/design/adminhtml/default/default/template/zitec_reportscommon/records_report_grid.phtml +215 -0
  132. app/design/frontend/base/default/layout/zitec_dpd.xml +79 -0
  133. app/design/frontend/base/default/template/zitec_dpd/customer/address/edit/addresslength.phtml +1 -0
  134. app/design/frontend/base/default/template/zitec_dpd/shipping/tracking/popup.phtml +178 -0
  135. app/design/frontend/base/default/template/zitec_dpd/tax/checkout/cashondeliverysurchage.phtml +38 -0
  136. app/etc/modules/Zitec_Dpd.xml +11 -0
  137. app/etc/modules/Zitec_FieldLengths.xml +9 -0
  138. app/etc/modules/Zitec_PackedShipment.xml +11 -0
  139. app/etc/modules/Zitec_PrintShippingLabel.xml +9 -0
  140. app/etc/modules/Zitec_ReportsCommon.xml +8 -0
  141. app/etc/modules/Zitec_ShippingReports.xml +11 -0
  142. app/etc/modules/Zitec_TableRates.xml +9 -0
  143. app/locale/en_GB/Zitec_Dpd.csv +182 -0
  144. app/locale/en_GB/Zitec_PackedShipment.csv +20 -0
  145. app/locale/en_GB/Zitec_PrintShippingLabel.csv +1 -0
  146. app/locale/en_GB/Zitec_TableRates.csv +78 -0
  147. app/locale/en_US/Zitec_Dpd.csv +141 -0
  148. app/locale/en_US/Zitec_PackedShipment.csv +20 -0
  149. app/locale/en_US/Zitec_PrintShippingLabel.csv +1 -0
  150. app/locale/en_US/Zitec_TableRates.csv +78 -0
  151. app/locale/es_ES/Zitec_Dpd.csv +140 -0
  152. app/locale/es_ES/Zitec_PackedShipment.csv +20 -0
  153. app/locale/es_ES/Zitec_TableRates.csv +79 -0
  154. app/locale/hr_HR/Zitec_Dpd.csv +137 -0
  155. app/locale/hr_HR/Zitec_PackedShipment.csv +20 -0
  156. app/locale/hr_HR/Zitec_PrintShippingLabel.csv +1 -0
  157. app/locale/hr_HR/Zitec_TableRates.csv +78 -0
  158. app/locale/ro_RO/Zitec_Dpd.csv +189 -0
  159. app/locale/ro_RO/Zitec_PackedShipment.csv +18 -0
  160. app/locale/ro_RO/Zitec_PrintShippingLabel.csv +6 -0
  161. app/locale/ro_RO/Zitec_TableRates.csv +68 -0
  162. app/locale/sl_SI/Zitec_Dpd.csv +137 -0
  163. app/locale/sl_SI/Zitec_PackedShipment.csv +20 -0
  164. app/locale/sl_SI/Zitec_PrintShippingLabel.csv +1 -0
  165. app/locale/sl_SI/Zitec_TableRates.csv +78 -0
  166. js/zitec/dpd/admin/PostcodeAutocompleter.js +16 -0
  167. js/zitec/dpd/admin/sales.js +11 -0
  168. js/zitec_fieldlengths/validator.js +58 -0
  169. js/zitec_packedshipment/packedshipment.js +632 -0
  170. lib/Zitec/Dpd/Api.php +124 -0
  171. lib/Zitec/Dpd/Api/Abstract.php +361 -0
  172. lib/Zitec/Dpd/Api/Configs.php +130 -0
  173. lib/Zitec/Dpd/Api/Manifest.php +23 -0
  174. lib/Zitec/Dpd/Api/Manifest/Close.php +140 -0
  175. lib/Zitec/Dpd/Api/Manifest/Close/Response.php +62 -0
  176. lib/Zitec/Dpd/Api/Manifest/Response.php +29 -0
  177. lib/Zitec/Dpd/Api/Pickup.php +27 -0
  178. lib/Zitec/Dpd/Api/Pickup/Create.php +161 -0
  179. lib/Zitec/Dpd/Api/Pickup/Create/Response.php +46 -0
  180. lib/Zitec/Dpd/Api/Pickup/Response.php +21 -0
  181. lib/Zitec/Dpd/Api/Response.php +138 -0
  182. lib/Zitec/Dpd/Api/Shipment.php +32 -0
  183. lib/Zitec/Dpd/Api/Shipment/CalculatePrice.php +123 -0
  184. lib/Zitec/Dpd/Api/Shipment/CalculatePrice/Response.php +110 -0
  185. lib/Zitec/Dpd/Api/Shipment/Delete.php +65 -0
  186. lib/Zitec/Dpd/Api/Shipment/Delete/Response.php +20 -0
  187. lib/Zitec/Dpd/Api/Shipment/GetLabel.php +78 -0
  188. lib/Zitec/Dpd/Api/Shipment/GetLabel/Response.php +28 -0
  189. lib/Zitec/Dpd/Api/Shipment/GetShipmentStatus.php +65 -0
  190. lib/Zitec/Dpd/Api/Shipment/GetShipmentStatus/Response.php +178 -0
  191. lib/Zitec/Dpd/Api/Shipment/Response.php +21 -0
  192. lib/Zitec/Dpd/Api/Shipment/Save.php +316 -0
  193. lib/Zitec/Dpd/Api/Shipment/Save/Exception/ReceiverAddressTooLong.php +29 -0
  194. lib/Zitec/Dpd/Api/Shipment/Save/Response.php +71 -0
  195. lib/Zitec/Dpd/Api/Soapclient.php +87 -0
  196. lib/Zitec/Dpd/ApiTest/test-dpd-calculatePrice.php +128 -0
  197. lib/Zitec/Dpd/ApiTest/test-dpd-createShipment.php +135 -0
  198. lib/Zitec/Dpd/Postcode/Search.php +162 -0
  199. lib/Zitec/Dpd/Postcode/Search/Abstract.php +140 -0
  200. lib/Zitec/Dpd/Postcode/Search/Interface.php +61 -0
  201. lib/Zitec/Dpd/Postcode/Search/Model.php +111 -0
  202. lib/Zitec/Dpd/Postcode/Search/Model/CachedData.php +11029 -0
  203. lib/Zitec/Dpd/Postcode/Search/Model/Interface.php +61 -0
  204. lib/Zitec/Dpd/Postcode/Search/Model/Mysql.php +829 -0
  205. lib/Zitec/Dpd/Postcode/data/data.csv +51850 -0
  206. lib/Zitec/Dpd/Postcode/data/data.sql +52366 -0
  207. lib/Zitec/Dpd/readme.txt +6 -0
  208. package.xml +18 -0
  209. skin/adminhtml/default/default/zitec_dpd/zitec_dpd.css +15 -0
  210. skin/adminhtml/default/default/zitec_packedshipment/images/logo-footer.png +0 -0
  211. skin/adminhtml/default/default/zitec_packedshipment/images/logoSEUR.jpg +0 -0
  212. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/alert.css +119 -0
  213. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/alert/bottom.gif +0 -0
  214. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/alert/bottom_left.gif +0 -0
  215. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/alert/bottom_right.gif +0 -0
  216. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/alert/left.gif +0 -0
  217. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/alert/overlay.png +0 -0
  218. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/alert/progress.gif +0 -0
  219. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/alert/right.gif +0 -0
  220. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/alert/top.gif +0 -0
  221. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/alert/top_left.gif +0 -0
  222. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/alert/top_right.gif +0 -0
  223. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/alert_lite.css +88 -0
  224. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/alphacube.css +150 -0
  225. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/alphacube/bottom-left-c.gif +0 -0
  226. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/alphacube/bottom-middle.gif +0 -0
  227. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/alphacube/bottom-right-c.gif +0 -0
  228. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/alphacube/button-close-focus.gif +0 -0
  229. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/alphacube/button-max-focus.gif +0 -0
  230. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/alphacube/button-min-focus.gif +0 -0
  231. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/alphacube/frame-left.gif +0 -0
  232. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/alphacube/frame-right.gif +0 -0
  233. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/alphacube/left-top.gif +0 -0
  234. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/alphacube/right-top.gif +0 -0
  235. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/alphacube/top-middle.gif +0 -0
  236. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/behavior.htc +51 -0
  237. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/darkX.css +121 -0
  238. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/darkX/button-close-focused.png +0 -0
  239. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/darkX/button-maximize-focused.png +0 -0
  240. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/darkX/button-minimize-focused.png +0 -0
  241. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/darkX/frame-bottom-left-focused.png +0 -0
  242. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/darkX/frame-bottom-mid-focused.png +0 -0
  243. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/darkX/frame-bottom-right-focused.png +0 -0
  244. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/darkX/frame-left-focused.png +0 -0
  245. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/darkX/frame-right-focused.png +0 -0
  246. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/darkX/titlebar-left-focused.png +0 -0
  247. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/darkX/titlebar-mid-focused.png +0 -0
  248. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/darkX/titlebar-right-focused.png +0 -0
  249. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/debug.css +25 -0
  250. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/default.css +157 -0
  251. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/default/bottom_left.gif +0 -0
  252. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/default/bottom_mid.gif +0 -0
  253. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/default/bottom_right.gif +0 -0
  254. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/default/bottom_right_resize.gif +0 -0
  255. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/default/center_left.gif +0 -0
  256. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/default/center_right.gif +0 -0
  257. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/default/clear.gif +0 -0
  258. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/default/close.gif +0 -0
  259. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/default/inspect.gif +0 -0
  260. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/default/maximize.gif +0 -0
  261. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/default/minimize.gif +0 -0
  262. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/default/overlay.png +0 -0
  263. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/default/resize.gif +0 -0
  264. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/default/sizer.gif +0 -0
  265. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/default/top_left.gif +0 -0
  266. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/default/top_mid.gif +0 -0
  267. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/default/top_right.gif +0 -0
  268. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/iefix/blank.gif +0 -0
  269. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/iefix/iepngfix.css +3 -0
  270. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/iefix/iepngfix.htc +54 -0
  271. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting.css +960 -0
  272. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/background_buttons.gif +0 -0
  273. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/bottom-left-blue.png +0 -0
  274. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/bottom-left-darkblue.png +0 -0
  275. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/bottom-left-green.png +0 -0
  276. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/bottom-left-grey.png +0 -0
  277. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/bottom-middle-blue.png +0 -0
  278. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/bottom-middle-darkblue.png +0 -0
  279. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/bottom-middle-green.png +0 -0
  280. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/bottom-middle-grey.png +0 -0
  281. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/bottom-right-blue.png +0 -0
  282. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/bottom-right-darkblue.png +0 -0
  283. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/bottom-right-green.png +0 -0
  284. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/bottom-right-grey.png +0 -0
  285. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/button-close-blue.png +0 -0
  286. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/button-close-darkblue.png +0 -0
  287. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/button-close-green.png +0 -0
  288. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/button-close-grey.png +0 -0
  289. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/button-maximize-blue.png +0 -0
  290. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/button-maximize-darkblue.png +0 -0
  291. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/button-maximize-green.png +0 -0
  292. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/button-maximize-grey.png +0 -0
  293. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/button-minimize-blue.png +0 -0
  294. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/button-minimize-darkblue.png +0 -0
  295. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/button-minimize-green.png +0 -0
  296. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/button-minimize-grey.png +0 -0
  297. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/left-blue.png +0 -0
  298. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/left-darkblue.png +0 -0
  299. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/left-green.png +0 -0
  300. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/left-grey.png +0 -0
  301. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/pngbehavior.htc +67 -0
  302. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/right-blue.png +0 -0
  303. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/right-darkblue.png +0 -0
  304. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/right-green.png +0 -0
  305. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/right-grey.png +0 -0
  306. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/spinner.gif +0 -0
  307. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/top-left-blue.png +0 -0
  308. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/top-left-darkblue.png +0 -0
  309. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/top-left-green.png +0 -0
  310. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/top-left-grey.png +0 -0
  311. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/top-middle-blue.png +0 -0
  312. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/top-middle-darkblue.png +0 -0
  313. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/top-middle-green.png +0 -0
  314. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/top-middle-grey.png +0 -0
  315. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/top-right-blue.png +0 -0
  316. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/top-right-darkblue.png +0 -0
  317. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/top-right-green.png +0 -0
  318. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/lighting/top-right-grey.png +0 -0
  319. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/mac_os_x.css +333 -0
  320. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/mac_os_x_dialog.css +160 -0
  321. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/magento.css +39 -0
  322. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/magento/btn_bg.gif +0 -0
  323. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/magento/content_bg.gif +0 -0
  324. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/magento/top_bg.gif +0 -0
  325. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/magento/window_close.png +0 -0
  326. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/nuncio.css +164 -0
  327. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/nuncio/bottom_left.png +0 -0
  328. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/nuncio/bottom_mid.png +0 -0
  329. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/nuncio/bottom_right.png +0 -0
  330. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/nuncio/center_left.png +0 -0
  331. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/nuncio/center_right.png +0 -0
  332. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/nuncio/close.png +0 -0
  333. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/nuncio/minimize.png +0 -0
  334. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/nuncio/overlay.png +0 -0
  335. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/nuncio/top_left.png +0 -0
  336. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/nuncio/top_mid.png +0 -0
  337. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/nuncio/top_right.png +0 -0
  338. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/spread.css +108 -0
  339. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/spread/.gif +0 -0
  340. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/spread/bottom-left-c.gif +0 -0
  341. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/spread/bottom-middle.gif +0 -0
  342. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/spread/bottom-right-c.gif +0 -0
  343. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/spread/button-close-focus.gif +0 -0
  344. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/spread/button-max-focus.gif +0 -0
  345. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/spread/button-min-focus.gif +0 -0
  346. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/spread/frame-left.gif +0 -0
  347. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/spread/frame-right.gif +0 -0
  348. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/spread/left-top.gif +0 -0
  349. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/spread/right-top.gif +0 -0
  350. skin/adminhtml/default/default/zitec_packedshipment/windows/themes/spread/top-middle.gif +0 -0
app/code/community/Zitec/Dpd/Block/Addresslength.php ADDED
@@ -0,0 +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
+
app/code/community/Zitec/Dpd/Block/Adminhtml/Customer/Edit/Form/Addresslength.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 ADDED
@@ -0,0 +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
+
app/code/community/Zitec/Dpd/Block/Adminhtml/Sales/Order/Address/Form/Addresslength.php ADDED
@@ -0,0 +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
+
app/code/community/Zitec/Dpd/Block/Adminhtml/Sales/Order/Shipment/View.php ADDED
@@ -0,0 +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
+ }
app/code/community/Zitec/Dpd/Block/Adminhtml/Sales/Order/Shipment/View/Tracking.php ADDED
@@ -0,0 +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
+ }
app/code/community/Zitec/Dpd/Block/Adminhtml/Sales/Shipment/Grid.php ADDED
@@ -0,0 +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
+
app/code/community/Zitec/Dpd/Block/Adminhtml/Sales/Shipment/Grid/Renderer/Manifest.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_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 ADDED
@@ -0,0 +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
+
app/code/community/Zitec/Dpd/Block/Adminhtml/System/Config/Button/Export.php ADDED
@@ -0,0 +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
+
app/code/community/Zitec/Dpd/Block/Adminhtml/Tablerate/Grid.php ADDED
@@ -0,0 +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
+ }
app/code/community/Zitec/Dpd/Block/Checkout/Onepage/Addresslength.php ADDED
@@ -0,0 +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
+
app/code/community/Zitec/Dpd/Block/Customer/Address/Edit/Addresslength.php ADDED
@@ -0,0 +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
+
app/code/community/Zitec/Dpd/Block/Order/Creditmemo/Totals/Cashondeliverysurcharge.php ADDED
@@ -0,0 +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
+
app/code/community/Zitec/Dpd/Block/Order/Invoice/Totals/Cashondeliverysurcharge.php ADDED
@@ -0,0 +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
+
app/code/community/Zitec/Dpd/Block/Order/Totals/Cashondeliverysurchage.php ADDED
@@ -0,0 +1,161 @@
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_Totals_Cashondeliverysurchage extends Mage_Sales_Block_Order_Totals
25
+ {
26
+
27
+ public function initTotals()
28
+ {
29
+ $title = Mage::getStoreConfig('payment/zitec_dpd_cashondelivery/total_title', $this->_getOrder()->getStoreId());
30
+
31
+ if (!round($this->_getAmount(), 2)) {
32
+ return;
33
+ }
34
+
35
+ $includingAfter = $this->_getAfter();
36
+ if ($this->_displayBoth() || $this->_displayExcludingTax()) {
37
+ $this->getParentBlock()->addTotal(new Varien_Object(array(
38
+ 'code' => 'zitec_dpd_cashondelivery_surcharge',
39
+ 'value' => $this->_getAmount(),
40
+ 'base_value' => $this->_getBaseAmount(),
41
+ 'label' => $title . ($this->_displayBoth() ? ' ' . $this->_getHelper()->__('(Excl.Tax)') : ''),
42
+ )), $this->_getAfter());
43
+ $includingAfter = 'zitec_dpd_cashondelivery_surcharge';
44
+ }
45
+
46
+ if ($this->_displayIncludingTax() || $this->_displayBoth()) {
47
+ $this->getParentBlock()->addTotal(new Varien_Object(array(
48
+ 'code' => 'zitec_dpd_cashondelivery_surcharge_incl_tax',
49
+ 'value' => $this->_getAmount() + $this->_getTax(),
50
+ 'base_value' => $this->_getBaseAmount() + $this->_getBaseTax(),
51
+ 'label' => $title . ($this->_displayBoth() ? ' ' . $this->_getHelper()->__('(Incl.Tax)') : ''),
52
+ )), $includingAfter);
53
+ }
54
+ }
55
+
56
+ /**
57
+ *
58
+ * @return Mage_Sales_Model_Order
59
+ */
60
+ protected function _getOrder()
61
+ {
62
+ return $this->getParentBlock()->getOrder();
63
+ }
64
+
65
+ protected function _getStore()
66
+ {
67
+ return $this->_getOrder()->getStore();
68
+ }
69
+
70
+ /**
71
+ *
72
+ * @return string
73
+ */
74
+ protected function _getAfter()
75
+ {
76
+ return $this->_displayBoth() ? 'shipping_incl' : 'shipping';
77
+ }
78
+
79
+
80
+ /**
81
+ *
82
+ * @return float
83
+ */
84
+ protected function _getAmount()
85
+ {
86
+ return $this->_getOrder()->getData('zitec_dpd_cashondelivery_surcharge');
87
+ }
88
+
89
+ /**
90
+ *
91
+ * @return float
92
+ */
93
+ protected function _getBaseAmount()
94
+ {
95
+ return $this->_getOrder()->getData('base_zitec_dpd_cashondelivery_surcharge');
96
+ }
97
+
98
+ /**
99
+ *
100
+ * @return float
101
+ */
102
+ protected function _getTax()
103
+ {
104
+ return $this->_getOrder()->getData('zitec_dpd_cashondelivery_surcharge_tax');
105
+ }
106
+
107
+ /**
108
+ *
109
+ * @return float
110
+ */
111
+ protected function _getBaseTax()
112
+ {
113
+ return $this->_getOrder()->getData('base_zitec_dpd_cashondelivery_surcharge_tax');
114
+ }
115
+
116
+ /**
117
+ *
118
+ * @return boolean
119
+ */
120
+ protected function _displayBoth()
121
+ {
122
+ return $this->_getConfig()->displaySalesShippingBoth($this->_getStore());
123
+ }
124
+
125
+ /**
126
+ *
127
+ * @return boolean
128
+ */
129
+ protected function _displayIncludingTax()
130
+ {
131
+ return $this->_getConfig()->displaySalesShippingInclTax($this->_getStore());
132
+ }
133
+
134
+ /**
135
+ *
136
+ * @return boolean
137
+ */
138
+ protected function _displayExcludingTax()
139
+ {
140
+ return $this->_getConfig()->displaySalesShippingExclTax($this->_getStore());
141
+ }
142
+
143
+ /**
144
+ *
145
+ * @return Mage_Tax_Model_Config
146
+ */
147
+ protected function _getConfig()
148
+ {
149
+ return Mage::getSingleton('tax/config');
150
+ }
151
+
152
+ /**
153
+ *
154
+ * @return Zitec_Dpd_Helper_Data
155
+ */
156
+ protected function _getHelper()
157
+ {
158
+ return Mage::helper('zitec_dpd');
159
+ }
160
+
161
+ }
app/code/community/Zitec/Dpd/Block/Tax/Checkout/Cashondeliverysurchage.php ADDED
@@ -0,0 +1,126 @@
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_Tax_Checkout_Cashondeliverysurchage extends Mage_Checkout_Block_Total_Default
25
+ {
26
+
27
+ protected $_template = 'zitec_dpd/tax/checkout/cashondeliverysurchage.phtml';
28
+
29
+ /**
30
+ *
31
+ * @return float
32
+ */
33
+ protected function _getCashOnDeliverySurcharge()
34
+ {
35
+ return $this->getTotal()->getAddress()->getData('zitec_dpd_cashondelivery_surcharge');
36
+ }
37
+
38
+ /**
39
+ *
40
+ * @return float
41
+ */
42
+ protected function _getCashOnDeliverySurchargeTax()
43
+ {
44
+ return $this->getTotal()->getAddress()->getData('zitec_dpd_cashondelivery_surcharge_tax');
45
+ }
46
+
47
+
48
+ /**
49
+ * Check if we need display shipping include and exclude tax
50
+ *
51
+ * @return bool
52
+ */
53
+ public function displayBoth()
54
+ {
55
+ return Mage::getSingleton('tax/config')->displayCartShippingBoth($this->getStore());
56
+ }
57
+
58
+ /**
59
+ * Check if we need display shipping include tax
60
+ *
61
+ * @return bool
62
+ */
63
+ public function displayIncludeTax()
64
+ {
65
+ return Mage::getSingleton('tax/config')->displayCartShippingInclTax($this->getStore());
66
+ }
67
+
68
+
69
+ /**
70
+ * Get label for cash on delivery surcharge including tax
71
+ *
72
+ * @return float
73
+ */
74
+ public function getIncludeTaxLabel()
75
+ {
76
+ return $this->_getTitle() . $this->_getHelper()->__(' Incl. tax');
77
+ }
78
+
79
+ /**
80
+ * Get label for cash on delivery surcharge excluding tax
81
+ *
82
+ * @return float
83
+ */
84
+ public function getExcludeTaxLabel()
85
+ {
86
+ return $this->_getTitle() . $this->_getHelper()->__(' Excl. tax');
87
+ }
88
+
89
+ /**
90
+ *
91
+ * @return float
92
+ */
93
+ public function getCashOnDeliverySurchargeExcludeTax()
94
+ {
95
+ return $this->_getCashOnDeliverySurcharge();
96
+ }
97
+
98
+ /**
99
+ *
100
+ * @return float
101
+ */
102
+ public function getCashOnDeliverySurchargeIncludeTax()
103
+ {
104
+ return $this->_getCashOnDeliverySurcharge() + $this->_getCashOnDeliverySurchargeTax();
105
+ }
106
+
107
+ /**
108
+ *
109
+ * @return Zitec_Dpd_Helper_Data
110
+ */
111
+ protected function _getHelper()
112
+ {
113
+ return Mage::helper('zitec_dpd');
114
+ }
115
+
116
+ /**
117
+ *
118
+ * @return string
119
+ */
120
+ protected function _getTitle()
121
+ {
122
+ return $this->getTotal()->getTitle();
123
+ }
124
+
125
+
126
+ }
app/code/community/Zitec/Dpd/Helper/Compatibility.php ADDED
@@ -0,0 +1,77 @@
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
+ * this class is used for
20
+ * @category Zitec
21
+ * @package Zitec_Dpd
22
+ * @author Zitec COM <magento@zitec.ro>
23
+ */
24
+ class Zitec_Dpd_Helper_Compatibility extends Mage_Core_Helper_Abstract
25
+ {
26
+
27
+
28
+ /**
29
+ * Checks the possibility of creating shipping label by current carrier
30
+ *
31
+ * compatibility with magento less then 1.6.2
32
+ * @param $shipment
33
+ */
34
+ public function canCreateShippingLabel($shipment){
35
+ $shippingCarrier = $this->getOrder($shipment)->getShippingCarrier();
36
+ return $shippingCarrier && $shippingCarrier->isShippingLabelsAvailable();
37
+ }
38
+
39
+
40
+ /**
41
+ * checko compatibility for print shipping label pdf in Mage_Adminhtml_Sales_Order_ShipmentController
42
+ * compatibility with magento less then 1.6.2
43
+ *
44
+ * @return bool
45
+ */
46
+ public function checkMassPrintShippingLabelExists(){
47
+ if($this->versionIsAtLeast16()){
48
+ return true;
49
+ }
50
+
51
+ return false;
52
+ }
53
+
54
+
55
+ public function versionIsAtLeast16()
56
+ {
57
+ $versionInfo = Mage::getVersionInfo();
58
+ if ($versionInfo['major'] >= 1) {
59
+ if ($versionInfo['minor'] >= 6) {
60
+ return true;
61
+ }
62
+ }
63
+
64
+ return false;
65
+ }
66
+
67
+ /**
68
+ * Retrieve invoice order
69
+ *
70
+ * @return Mage_Sales_Model_Order
71
+ */
72
+ public function getOrder($shipment)
73
+ {
74
+ return $shipment->getOrder();
75
+ }
76
+
77
+ }
app/code/community/Zitec/Dpd/Helper/Data.php ADDED
@@ -0,0 +1,595 @@