Amosoft_Dropship - Version 1.0.0

Version Notes

It is a stable version

Download this release

Release Info

Developer Ray Zhang
Extension Amosoft_Dropship
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

Files changed (353) hide show
  1. app/code/local/Amosoft/Dropship/Block/Adminhtml/Amosoft.php +19 -0
  2. app/code/local/Amosoft/Dropship/Block/Adminhtml/Inventory.php +19 -0
  3. app/code/local/Amosoft/Dropship/Block/Adminhtml/Inventory/Edit/Tab/Addvendorfield.php +99 -0
  4. app/code/local/Amosoft/Dropship/Block/Adminhtml/Inventory/Edit/Tab/Amosoftvendor.php +83 -0
  5. app/code/local/Amosoft/Dropship/Block/Adminhtml/Inventory/Edit/Tab/Vendortabhistory.php +30 -0
  6. app/code/local/Amosoft/Dropship/Block/Adminhtml/Inventory/Edit/Vendortab.php +37 -0
  7. app/code/local/Amosoft/Dropship/Block/Adminhtml/Inventory/Edit/Vendortabhistory.php +37 -0
  8. app/code/local/Amosoft/Dropship/Block/Adminhtml/Inventory/Grid.php +137 -0
  9. app/code/local/Amosoft/Dropship/Block/Adminhtml/Notification.php +107 -0
  10. app/code/local/Amosoft/Dropship/Block/Adminhtml/Ranking.php +62 -0
  11. app/code/local/Amosoft/Dropship/Block/Adminhtml/Ranking/Grid.php +87 -0
  12. app/code/local/Amosoft/Dropship/Block/Adminhtml/Sales/Order/View/Items.php +23 -0
  13. app/code/local/Amosoft/Dropship/Block/Adminhtml/Showhistory.php +39 -0
  14. app/code/local/Amosoft/Dropship/Block/Adminhtml/Sourcing.php +27 -0
  15. app/code/local/Amosoft/Dropship/Block/Adminhtml/Sourcing/Edit.php +67 -0
  16. app/code/local/Amosoft/Dropship/Block/Adminhtml/Sourcing/Edit/Form.php +26 -0
  17. app/code/local/Amosoft/Dropship/Block/Adminhtml/Sourcing/Edit/Tab/Form.php +69 -0
  18. app/code/local/Amosoft/Dropship/Block/Adminhtml/Sourcing/Edit/Tabs.php +32 -0
  19. app/code/local/Amosoft/Dropship/Block/Adminhtml/Sourcing/Grid.php +211 -0
  20. app/code/local/Amosoft/Dropship/Block/Adminhtml/Sourcing/History/Renderer/Action.php +30 -0
  21. app/code/local/Amosoft/Dropship/Block/Adminhtml/Sourcing/History/View.php +47 -0
  22. app/code/local/Amosoft/Dropship/Block/Adminhtml/Sourcing/History/View/Form.php +30 -0
  23. app/code/local/Amosoft/Dropship/Block/Adminhtml/Sourcing/History/View/Tabs.php +30 -0
  24. app/code/local/Amosoft/Dropship/Block/Adminhtml/System/Config/Crontime.php +59 -0
  25. app/code/local/Amosoft/Dropship/Block/Adminhtml/System/Config/Fieldset/Hint.php +44 -0
  26. app/code/local/Amosoft/Dropship/Block/Adminhtml/System/Config/Helplink.php +18 -0
  27. app/code/local/Amosoft/Dropship/Block/Adminhtml/System/Config/Singuplink.php +18 -0
  28. app/code/local/Amosoft/Dropship/Block/Adminhtml/System/Config/Submitbutton.php +25 -0
  29. app/code/local/Amosoft/Dropship/Block/Adminhtml/System/Config/Time.php +76 -0
  30. app/code/local/Amosoft/Dropship/Block/Adminhtml/Upload.php +110 -0
  31. app/code/local/Amosoft/Dropship/Block/Adminhtml/Upload/Bulkassign.php +182 -0
  32. app/code/local/Amosoft/Dropship/Block/Adminhtml/Upload/Edit/Button.php +22 -0
  33. app/code/local/Amosoft/Dropship/Block/Adminhtml/Upload/Edit/Form.php +63 -0
  34. app/code/local/Amosoft/Dropship/Block/Adminhtml/Vendorproductuploadhistory.php +142 -0
  35. app/code/local/Amosoft/Dropship/Block/Adminhtml/Widget/Grid/Column/Nameaction.php +29 -0
  36. app/code/local/Amosoft/Dropship/Block/Adminhtml/Widget/Grid/Column/Orderaction.php +27 -0
  37. app/code/local/Amosoft/Dropship/Block/Adminhtml/Widget/Grid/Column/Skuaction.php +34 -0
  38. app/code/local/Amosoft/Dropship/Block/Adminhtml/Widget/Grid/Column/Textaction.php +38 -0
  39. app/code/local/Amosoft/Dropship/Helper/Data.php +488 -0
  40. app/code/local/Amosoft/Dropship/Model/Amosoft.php +233 -0
  41. app/code/local/Amosoft/Dropship/Model/Api2/Createroleandrule.php +248 -0
  42. app/code/local/Amosoft/Dropship/Model/Api2/Inventory.php +19 -0
  43. app/code/local/Amosoft/Dropship/Model/Api2/Inventory/Rest.php +53 -0
  44. app/code/local/Amosoft/Dropship/Model/Api2/Inventory/Rest/Admin/V1.php +37 -0
  45. app/code/local/Amosoft/Dropship/Model/Api2/Inventory/Rest/Customer/V1.php +65 -0
  46. app/code/local/Amosoft/Dropship/Model/Api2/Inventory/Rest/Guest/V1.php +12 -0
  47. app/code/local/Amosoft/Dropship/Model/Api2/Product.php +18 -0
  48. app/code/local/Amosoft/Dropship/Model/Api2/Product/Rest.php +53 -0
  49. app/code/local/Amosoft/Dropship/Model/Api2/Product/Rest/Admin/V1.php +44 -0
  50. app/code/local/Amosoft/Dropship/Model/Api2/Product/Rest/Customer/V1.php +65 -0
  51. app/code/local/Amosoft/Dropship/Model/Api2/Product/Rest/Guest/V1.php +12 -0
  52. app/code/local/Amosoft/Dropship/Model/Carrier/Flatrateperproduct.php +65 -0
  53. app/code/local/Amosoft/Dropship/Model/Csvparser.php +265 -0
  54. app/code/local/Amosoft/Dropship/Model/Inventory.php +468 -0
  55. app/code/local/Amosoft/Dropship/Model/Inventorylog.php +17 -0
  56. app/code/local/Amosoft/Dropship/Model/Observer.php +508 -0
  57. app/code/local/Amosoft/Dropship/Model/Order/Api.php +312 -0
  58. app/code/local/Amosoft/Dropship/Model/Order/Dropship/Api.php +352 -0
  59. app/code/local/Amosoft/Dropship/Model/Order/Invoice.php +31 -0
  60. app/code/local/Amosoft/Dropship/Model/Orderitems.php +186 -0
  61. app/code/local/Amosoft/Dropship/Model/Ordersourcing.php +90 -0
  62. app/code/local/Amosoft/Dropship/Model/Productimport.php +596 -0
  63. app/code/local/Amosoft/Dropship/Model/Ranking.php +64 -0
  64. app/code/local/Amosoft/Dropship/Model/Rankinglog.php +18 -0
  65. app/code/local/Amosoft/Dropship/Model/Resource/Inventory.php +16 -0
  66. app/code/local/Amosoft/Dropship/Model/Resource/Inventory/Collection.php +20 -0
  67. app/code/local/Amosoft/Dropship/Model/Resource/Inventorylog.php +16 -0
  68. app/code/local/Amosoft/Dropship/Model/Resource/Inventorylog/Collection.php +20 -0
  69. app/code/local/Amosoft/Dropship/Model/Resource/Orderitems.php +58 -0
  70. app/code/local/Amosoft/Dropship/Model/Resource/Orderitems/Collection.php +20 -0
  71. app/code/local/Amosoft/Dropship/Model/Resource/Ordersourcing.php +52 -0
  72. app/code/local/Amosoft/Dropship/Model/Resource/Ordersourcing/Collection.php +20 -0
  73. app/code/local/Amosoft/Dropship/Model/Resource/Ranking.php +16 -0
  74. app/code/local/Amosoft/Dropship/Model/Resource/Ranking/Collection.php +20 -0
  75. app/code/local/Amosoft/Dropship/Model/Resource/Rankinglog.php +16 -0
  76. app/code/local/Amosoft/Dropship/Model/Resource/Rankinglog/Collection.php +20 -0
  77. app/code/local/Amosoft/Dropship/Model/Resource/Setup.php +72 -0
  78. app/code/local/Amosoft/Dropship/Model/Resource/Uploadvendor.php +16 -0
  79. app/code/local/Amosoft/Dropship/Model/Resource/Uploadvendor/Collection.php +20 -0
  80. app/code/local/Amosoft/Dropship/Model/Resource/Vendorimportlog.php +38 -0
  81. app/code/local/Amosoft/Dropship/Model/System/Config/Backend/Oudatedinventory/Email.php +61 -0
  82. app/code/local/Amosoft/Dropship/Model/System/Config/Backend/Sourcing/Cronbackorder.php +63 -0
  83. app/code/local/Amosoft/Dropship/Model/System/Config/Backend/Sourcing/Cronsourcing.php +61 -0
  84. app/code/local/Amosoft/Dropship/Model/System/Config/Backend/Uploadvendor/Cron.php +61 -0
  85. app/code/local/Amosoft/Dropship/Model/System/Config/Source/Attributecodes.php +37 -0
  86. app/code/local/Amosoft/Dropship/Model/System/Config/Source/Category.php +32 -0
  87. app/code/local/Amosoft/Dropship/Model/System/Config/Source/Ediqualifier.php +65 -0
  88. app/code/local/Amosoft/Dropship/Model/System/Config/Source/Optionvalues.php +62 -0
  89. app/code/local/Amosoft/Dropship/Model/System/Config/Source/Ranktype.php +21 -0
  90. app/code/local/Amosoft/Dropship/Model/System/Config/Source/Store.php +31 -0
  91. app/code/local/Amosoft/Dropship/Model/System/Config/Source/Time.php +33 -0
  92. app/code/local/Amosoft/Dropship/Model/System/Config/Source/Vendorlist.php +94 -0
  93. app/code/local/Amosoft/Dropship/Model/Uploadvendor.php +1540 -0
  94. app/code/local/Amosoft/Dropship/Model/Versions/Api.php +23 -0
  95. app/code/local/Amosoft/Dropship/Model/Versions/Api/V2.php +11 -0
  96. app/code/local/Amosoft/Dropship/controllers/Adminhtml/AmosoftController.php +264 -0
  97. app/code/local/Amosoft/Dropship/controllers/Adminhtml/InventoryController.php +81 -0
  98. app/code/local/Amosoft/Dropship/controllers/Adminhtml/RankingController.php +210 -0
  99. app/code/local/Amosoft/Dropship/controllers/Adminhtml/SourcingController.php +182 -0
  100. app/code/local/Amosoft/Dropship/controllers/Adminhtml/UploadController.php +389 -0
  101. app/code/local/Amosoft/Dropship/data/dropship_setup/data-install-1.0.3.php +55 -0
  102. app/code/local/Amosoft/Dropship/data/dropship_setup/data-upgrade-1.0.3-1.0.4.php +104 -0
  103. app/code/local/Amosoft/Dropship/data/dropship_setup/data-upgrade-1.0.4-1.0.5.php +49 -0
  104. app/code/local/Amosoft/Dropship/data/dropship_setup/data-upgrade-1.0.5-1.0.6.php +25 -0
  105. app/code/local/Amosoft/Dropship/etc/adminhtml.xml +99 -0
  106. app/code/local/Amosoft/Dropship/etc/api.xml +442 -0
  107. app/code/local/Amosoft/Dropship/etc/api2.xml +167 -0
  108. app/code/local/Amosoft/Dropship/etc/config.xml +310 -0
  109. app/code/local/Amosoft/Dropship/etc/jstranslator.xml +17 -0
  110. app/code/local/Amosoft/Dropship/etc/system.xml +247 -0
  111. app/code/local/Amosoft/Dropship/etc/wsdl.xml +184 -0
  112. app/code/local/Amosoft/Dropship/sql/dropship_setup/mysql4-install-1.0.3.php +105 -0
  113. app/code/local/Amosoft/Dropship/sql/dropship_setup/mysql4-upgrade-1.0.4-1.0.5.php +50 -0
  114. app/code/local/Amosoft/Dropship/sql/dropship_setup/mysql4-upgrade-1.0.5-1.0.6.php +28 -0
  115. app/code/local/Amosoft/Dropship/sql/dropship_setup/mysql4-upgrade-1.0.6-1.0.7.php +54 -0
  116. app/code/local/Amosoft/Dropship/sql/dropship_setup/mysql4-upgrade-1.0.7-1.0.8.php +12 -0
  117. app/design/adminhtml/default/default/layout/amosoftdropship.xml +185 -0
  118. app/design/adminhtml/default/default/template/amosoft/add_help_js.phtml +26 -0
  119. app/design/adminhtml/default/default/template/amosoft/addvendorfields.phtml +142 -0
  120. app/design/adminhtml/default/default/template/amosoft/bundle/renderer.phtml +441 -0
  121. app/design/adminhtml/default/default/template/amosoft/custom-msg.phtml +1 -0
  122. app/design/adminhtml/default/default/template/amosoft/downloadable/downloadable.phtml +301 -0
  123. app/design/adminhtml/default/default/template/amosoft/html/pager.phtml +124 -0
  124. app/design/adminhtml/default/default/template/amosoft/import/form/after.phtml +14 -0
  125. app/design/adminhtml/default/default/template/amosoft/import/form/before.phtml +126 -0
  126. app/design/adminhtml/default/default/template/amosoft/import/frame/result.phtml +31 -0
  127. app/design/adminhtml/default/default/template/amosoft/inline-edit.phtml +89 -0
  128. app/design/adminhtml/default/default/template/amosoft/item_order_history.phtml +37 -0
  129. app/design/adminhtml/default/default/template/amosoft/popup.phtml +62 -0
  130. app/design/adminhtml/default/default/template/amosoft/process-profile.phtml +290 -0
  131. app/design/adminhtml/default/default/template/amosoft/result.phtml +80 -0
  132. app/design/adminhtml/default/default/template/amosoft/sales/default.phtml +312 -0
  133. app/design/adminhtml/default/default/template/amosoft/sales/items.phtml +69 -0
  134. app/design/adminhtml/default/default/template/amosoft/system/config/fieldset/hint.phtml +132 -0
  135. app/design/adminhtml/default/default/template/amosoft/system/config/submitbutton.phtml +99 -0
  136. app/design/adminhtml/default/default/template/amosoft/upload_vendor_product.phtml +66 -0
  137. app/design/adminhtml/default/default/template/amosoft/vendor_ranking.phtml +455 -0
  138. app/design/adminhtml/default/default/template/amosoft/vendor_upload_product_history.phtml +63 -0
  139. app/design/adminhtml/default/default/template/amosoft/vendorproducttab.phtml +62 -0
  140. app/design/adminhtml/default/default/template/amosoft/vendorproducttabhistory.phtml +37 -0
  141. app/design/adminhtml/default/default/template/amosoft/window.phtml +107 -0
  142. app/etc/modules/Amosoft_Dropship.xml +10 -0
  143. js/amosoft/extjs/bootstrap.js +58 -0
  144. js/amosoft/extjs/css/example.css +83 -0
  145. js/amosoft/extjs/css/ext-all.css +1 -0
  146. js/amosoft/extjs/css/images/boundlist/trigger-arrow.png +0 -0
  147. js/amosoft/extjs/css/images/box/corners-blue.gif +0 -0
  148. js/amosoft/extjs/css/images/box/corners.gif +0 -0
  149. js/amosoft/extjs/css/images/box/l-blue.gif +0 -0
  150. js/amosoft/extjs/css/images/box/l.gif +0 -0
  151. js/amosoft/extjs/css/images/box/r-blue.gif +0 -0
  152. js/amosoft/extjs/css/images/box/r.gif +0 -0
  153. js/amosoft/extjs/css/images/box/tb-blue.gif +0 -0
  154. js/amosoft/extjs/css/images/box/tb.gif +0 -0
  155. js/amosoft/extjs/css/images/button/arrow.gif +0 -0
  156. js/amosoft/extjs/css/images/button/btn.gif +0 -0
  157. js/amosoft/extjs/css/images/button/group-cs.gif +0 -0
  158. js/amosoft/extjs/css/images/button/group-lr.gif +0 -0
  159. js/amosoft/extjs/css/images/button/group-tb.gif +0 -0
  160. js/amosoft/extjs/css/images/button/s-arrow-b-noline.gif +0 -0
  161. js/amosoft/extjs/css/images/button/s-arrow-b.gif +0 -0
  162. js/amosoft/extjs/css/images/button/s-arrow-bo.gif +0 -0
  163. js/amosoft/extjs/css/images/button/s-arrow-light.gif +0 -0
  164. js/amosoft/extjs/css/images/button/s-arrow-noline.gif +0 -0
  165. js/amosoft/extjs/css/images/button/s-arrow-o.gif +0 -0
  166. js/amosoft/extjs/css/images/button/s-arrow.gif +0 -0
  167. js/amosoft/extjs/css/images/datepicker/datepicker-footer-bg.gif +0 -0
  168. js/amosoft/extjs/css/images/datepicker/datepicker-footer-bg.png +0 -0
  169. js/amosoft/extjs/css/images/datepicker/datepicker-header-bg.gif +0 -0
  170. js/amosoft/extjs/css/images/datepicker/datepicker-header-bg.png +0 -0
  171. js/amosoft/extjs/css/images/dd/drop-add.gif +0 -0
  172. js/amosoft/extjs/css/images/dd/drop-no.gif +0 -0
  173. js/amosoft/extjs/css/images/dd/drop-yes.gif +0 -0
  174. js/amosoft/extjs/css/images/editor/tb-sprite.gif +0 -0
  175. js/amosoft/extjs/css/images/form/checkbox.gif +0 -0
  176. js/amosoft/extjs/css/images/form/clear-trigger.gif +0 -0
  177. js/amosoft/extjs/css/images/form/date-trigger.gif +0 -0
  178. js/amosoft/extjs/css/images/form/error-tip-corners.gif +0 -0
  179. js/amosoft/extjs/css/images/form/exclamation.gif +0 -0
  180. js/amosoft/extjs/css/images/form/radio.gif +0 -0
  181. js/amosoft/extjs/css/images/form/search-trigger.gif +0 -0
  182. js/amosoft/extjs/css/images/form/spinner-small.gif +0 -0
  183. js/amosoft/extjs/css/images/form/spinner.gif +0 -0
  184. js/amosoft/extjs/css/images/form/text-bg.gif +0 -0
  185. js/amosoft/extjs/css/images/form/trigger-square.gif +0 -0
  186. js/amosoft/extjs/css/images/form/trigger-tpl.gif +0 -0
  187. js/amosoft/extjs/css/images/form/trigger.gif +0 -0
  188. js/amosoft/extjs/css/images/grid/arrow-left-white.gif +0 -0
  189. js/amosoft/extjs/css/images/grid/arrow-right-white.gif +0 -0
  190. js/amosoft/extjs/css/images/grid/cell-special-bg.gif +0 -0
  191. js/amosoft/extjs/css/images/grid/cell-special-bg.png +0 -0
  192. js/amosoft/extjs/css/images/grid/cell-special-selected-bg.gif +0 -0
  193. js/amosoft/extjs/css/images/grid/cell-special-selected-bg.png +0 -0
  194. js/amosoft/extjs/css/images/grid/checked.gif +0 -0
  195. js/amosoft/extjs/css/images/grid/col-move-bottom.gif +0 -0
  196. js/amosoft/extjs/css/images/grid/col-move-top.gif +0 -0
  197. js/amosoft/extjs/css/images/grid/column-header-bg.gif +0 -0
  198. js/amosoft/extjs/css/images/grid/column-header-bg.png +0 -0
  199. js/amosoft/extjs/css/images/grid/column-header-over-bg.gif +0 -0
  200. js/amosoft/extjs/css/images/grid/column-header-over-bg.png +0 -0
  201. js/amosoft/extjs/css/images/grid/columns.gif +0 -0
  202. js/amosoft/extjs/css/images/grid/dd-insert-arrow-left.gif +0 -0
  203. js/amosoft/extjs/css/images/grid/dd-insert-arrow-left.png +0 -0
  204. js/amosoft/extjs/css/images/grid/dd-insert-arrow-right.gif +0 -0
  205. js/amosoft/extjs/css/images/grid/dd-insert-arrow-right.png +0 -0
  206. js/amosoft/extjs/css/images/grid/dirty.gif +0 -0
  207. js/amosoft/extjs/css/images/grid/done.gif +0 -0
  208. js/amosoft/extjs/css/images/grid/drop-no.gif +0 -0
  209. js/amosoft/extjs/css/images/grid/drop-yes.gif +0 -0
  210. js/amosoft/extjs/css/images/grid/footer-bg.gif +0 -0
  211. js/amosoft/extjs/css/images/grid/grid-blue-hd.gif +0 -0
  212. js/amosoft/extjs/css/images/grid/grid-blue-split.gif +0 -0
  213. js/amosoft/extjs/css/images/grid/grid-hrow.gif +0 -0
  214. js/amosoft/extjs/css/images/grid/grid-loading.gif +0 -0
  215. js/amosoft/extjs/css/images/grid/grid-split.gif +0 -0
  216. js/amosoft/extjs/css/images/grid/grid-vista-hd.gif +0 -0
  217. js/amosoft/extjs/css/images/grid/grid3-hd-btn.gif +0 -0
  218. js/amosoft/extjs/css/images/grid/grid3-hrow-over.gif +0 -0
  219. js/amosoft/extjs/css/images/grid/grid3-hrow.gif +0 -0
  220. js/amosoft/extjs/css/images/grid/grid3-rowheader.gif +0 -0
  221. js/amosoft/extjs/css/images/grid/group-by.gif +0 -0
  222. js/amosoft/extjs/css/images/grid/group-collapse.gif +0 -0
  223. js/amosoft/extjs/css/images/grid/group-expand-sprite.gif +0 -0
  224. js/amosoft/extjs/css/images/grid/group-expand.gif +0 -0
  225. js/amosoft/extjs/css/images/grid/hd-pop.gif +0 -0
  226. js/amosoft/extjs/css/images/grid/hmenu-asc.gif +0 -0
  227. js/amosoft/extjs/css/images/grid/hmenu-desc.gif +0 -0
  228. js/amosoft/extjs/css/images/grid/hmenu-lock.gif +0 -0
  229. js/amosoft/extjs/css/images/grid/hmenu-lock.png +0 -0
  230. js/amosoft/extjs/css/images/grid/hmenu-unlock.gif +0 -0
  231. js/amosoft/extjs/css/images/grid/hmenu-unlock.png +0 -0
  232. js/amosoft/extjs/css/images/grid/invalid_line.gif +0 -0
  233. js/amosoft/extjs/css/images/grid/loading.gif +0 -0
  234. js/amosoft/extjs/css/images/grid/mso-hd.gif +0 -0
  235. js/amosoft/extjs/css/images/grid/nowait.gif +0 -0
  236. js/amosoft/extjs/css/images/grid/page-first-disabled.gif +0 -0
  237. js/amosoft/extjs/css/images/grid/page-first.gif +0 -0
  238. js/amosoft/extjs/css/images/grid/page-last-disabled.gif +0 -0
  239. js/amosoft/extjs/css/images/grid/page-last.gif +0 -0
  240. js/amosoft/extjs/css/images/grid/page-next-disabled.gif +0 -0
  241. js/amosoft/extjs/css/images/grid/page-next.gif +0 -0
  242. js/amosoft/extjs/css/images/grid/page-prev-disabled.gif +0 -0
  243. js/amosoft/extjs/css/images/grid/page-prev.gif +0 -0
  244. js/amosoft/extjs/css/images/grid/pick-button.gif +0 -0
  245. js/amosoft/extjs/css/images/grid/property-cell-bg.gif +0 -0
  246. js/amosoft/extjs/css/images/grid/property-cell-selected-bg.gif +0 -0
  247. js/amosoft/extjs/css/images/grid/refresh-disabled.gif +0 -0
  248. js/amosoft/extjs/css/images/grid/refresh.gif +0 -0
  249. js/amosoft/extjs/css/images/grid/row-check-sprite.gif +0 -0
  250. js/amosoft/extjs/css/images/grid/row-expand-sprite.gif +0 -0
  251. js/amosoft/extjs/css/images/grid/row-over.gif +0 -0
  252. js/amosoft/extjs/css/images/grid/row-sel.gif +0 -0
  253. js/amosoft/extjs/css/images/grid/sort-hd.gif +0 -0
  254. js/amosoft/extjs/css/images/grid/sort_asc.gif +0 -0
  255. js/amosoft/extjs/css/images/grid/sort_desc.gif +0 -0
  256. js/amosoft/extjs/css/images/grid/unchecked.gif +0 -0
  257. js/amosoft/extjs/css/images/grid/wait.gif +0 -0
  258. js/amosoft/extjs/css/images/layout/mini-bottom.gif +0 -0
  259. js/amosoft/extjs/css/images/layout/mini-left.gif +0 -0
  260. js/amosoft/extjs/css/images/layout/mini-right.gif +0 -0
  261. js/amosoft/extjs/css/images/layout/mini-top.gif +0 -0
  262. js/amosoft/extjs/css/images/menu/checked.gif +0 -0
  263. js/amosoft/extjs/css/images/menu/group-checked.gif +0 -0
  264. js/amosoft/extjs/css/images/menu/item-over.gif +0 -0
  265. js/amosoft/extjs/css/images/menu/menu-item-active-bg.gif +0 -0
  266. js/amosoft/extjs/css/images/menu/menu-item-active-corners.gif +0 -0
  267. js/amosoft/extjs/css/images/menu/menu-item-active-sides.gif +0 -0
  268. js/amosoft/extjs/css/images/menu/menu-parent.gif +0 -0
  269. js/amosoft/extjs/css/images/menu/menu.gif +0 -0
  270. js/amosoft/extjs/css/images/menu/unchecked.gif +0 -0
  271. js/amosoft/extjs/css/images/progress/progress-default-bg.gif +0 -0
  272. js/amosoft/extjs/css/images/shared/blue-loading.gif +0 -0
  273. js/amosoft/extjs/css/images/shared/calendar.gif +0 -0
  274. js/amosoft/extjs/css/images/shared/glass-bg.gif +0 -0
  275. js/amosoft/extjs/css/images/shared/hd-sprite.gif +0 -0
  276. js/amosoft/extjs/css/images/shared/icon-error.gif +0 -0
  277. js/amosoft/extjs/css/images/shared/icon-info.gif +0 -0
  278. js/amosoft/extjs/css/images/shared/icon-question.gif +0 -0
  279. js/amosoft/extjs/css/images/shared/icon-warning.gif +0 -0
  280. js/amosoft/extjs/css/images/shared/large-loading.gif +0 -0
  281. js/amosoft/extjs/css/images/shared/left-btn.gif +0 -0
  282. js/amosoft/extjs/css/images/shared/loading-balls.gif +0 -0
  283. js/amosoft/extjs/css/images/shared/right-btn.gif +0 -0
  284. js/amosoft/extjs/css/images/shared/shadow-c.png +0 -0
  285. js/amosoft/extjs/css/images/shared/shadow-lr.png +0 -0
  286. js/amosoft/extjs/css/images/shared/shadow.png +0 -0
  287. js/amosoft/extjs/css/images/shared/warning.gif +0 -0
  288. js/amosoft/extjs/css/images/sizer/e-handle-dark.gif +0 -0
  289. js/amosoft/extjs/css/images/sizer/e-handle.gif +0 -0
  290. js/amosoft/extjs/css/images/sizer/ne-handle-dark.gif +0 -0
  291. js/amosoft/extjs/css/images/sizer/ne-handle.gif +0 -0
  292. js/amosoft/extjs/css/images/sizer/nw-handle-dark.gif +0 -0
  293. js/amosoft/extjs/css/images/sizer/nw-handle.gif +0 -0
  294. js/amosoft/extjs/css/images/sizer/s-handle-dark.gif +0 -0
  295. js/amosoft/extjs/css/images/sizer/s-handle.gif +0 -0
  296. js/amosoft/extjs/css/images/sizer/se-handle-dark.gif +0 -0
  297. js/amosoft/extjs/css/images/sizer/se-handle.gif +0 -0
  298. js/amosoft/extjs/css/images/sizer/square.gif +0 -0
  299. js/amosoft/extjs/css/images/sizer/sw-handle-dark.gif +0 -0
  300. js/amosoft/extjs/css/images/sizer/sw-handle.gif +0 -0
  301. js/amosoft/extjs/css/images/slider/slider-bg.gif +0 -0
  302. js/amosoft/extjs/css/images/slider/slider-bg.png +0 -0
  303. js/amosoft/extjs/css/images/slider/slider-thumb.gif +0 -0
  304. js/amosoft/extjs/css/images/slider/slider-thumb.png +0 -0
  305. js/amosoft/extjs/css/images/slider/slider-v-bg.gif +0 -0
  306. js/amosoft/extjs/css/images/slider/slider-v-bg.png +0 -0
  307. js/amosoft/extjs/css/images/slider/slider-v-thumb.gif +0 -0
  308. js/amosoft/extjs/css/images/slider/slider-v-thumb.png +0 -0
  309. js/amosoft/extjs/css/images/tab-bar/scroll-left.gif +0 -0
  310. js/amosoft/extjs/css/images/tab-bar/scroll-right.gif +0 -0
  311. js/amosoft/extjs/css/images/tab-bar/tab-bar-default-bg.gif +0 -0
  312. js/amosoft/extjs/css/images/tip/tip-corners.gif +0 -0
  313. js/amosoft/extjs/css/images/tip/tip-sides.gif +0 -0
  314. js/amosoft/extjs/css/images/toolbar/more.gif +0 -0
  315. js/amosoft/extjs/css/images/toolbar/scroll-left.gif +0 -0
  316. js/amosoft/extjs/css/images/toolbar/scroll-right.gif +0 -0
  317. js/amosoft/extjs/css/images/toolbar/toolbar-default-bg.gif +0 -0
  318. js/amosoft/extjs/css/images/tools/tool-sprite-tpl.gif +0 -0
  319. js/amosoft/extjs/css/images/tools/tool-sprites.gif +0 -0
  320. js/amosoft/extjs/css/images/tools/tools-sprites-trans.gif +0 -0
  321. js/amosoft/extjs/css/images/tree/arrows.gif +0 -0
  322. js/amosoft/extjs/css/images/tree/drop-above.gif +0 -0
  323. js/amosoft/extjs/css/images/tree/drop-add.gif +0 -0
  324. js/amosoft/extjs/css/images/tree/drop-append.gif +0 -0
  325. js/amosoft/extjs/css/images/tree/drop-below.gif +0 -0
  326. js/amosoft/extjs/css/images/tree/drop-between.gif +0 -0
  327. js/amosoft/extjs/css/images/tree/drop-no.gif +0 -0
  328. js/amosoft/extjs/css/images/tree/drop-over.gif +0 -0
  329. js/amosoft/extjs/css/images/tree/drop-under.gif +0 -0
  330. js/amosoft/extjs/css/images/tree/drop-yes.gif +0 -0
  331. js/amosoft/extjs/css/images/tree/elbow-end-minus-nl.gif +0 -0
  332. js/amosoft/extjs/css/images/tree/elbow-end-minus.gif +0 -0
  333. js/amosoft/extjs/css/images/tree/elbow-end-plus-nl.gif +0 -0
  334. js/amosoft/extjs/css/images/tree/elbow-end-plus.gif +0 -0
  335. js/amosoft/extjs/css/images/tree/elbow-end.gif +0 -0
  336. js/amosoft/extjs/css/images/tree/elbow-line.gif +0 -0
  337. js/amosoft/extjs/css/images/tree/elbow-minus-nl.gif +0 -0
  338. js/amosoft/extjs/css/images/tree/elbow-minus.gif +0 -0
  339. js/amosoft/extjs/css/images/tree/elbow-plus-nl.gif +0 -0
  340. js/amosoft/extjs/css/images/tree/elbow-plus.gif +0 -0
  341. js/amosoft/extjs/css/images/tree/elbow.gif +0 -0
  342. js/amosoft/extjs/css/images/tree/folder-open.gif +0 -0
  343. js/amosoft/extjs/css/images/tree/folder.gif +0 -0
  344. js/amosoft/extjs/css/images/tree/leaf.gif +0 -0
  345. js/amosoft/extjs/css/images/tree/loading.gif +0 -0
  346. js/amosoft/extjs/css/images/tree/s.gif +0 -0
  347. js/amosoft/extjs/css/images/util/splitter/mini-bottom.gif +0 -0
  348. js/amosoft/extjs/css/images/util/splitter/mini-left.gif +0 -0
  349. js/amosoft/extjs/css/images/util/splitter/mini-right.gif +0 -0
  350. js/amosoft/extjs/css/images/util/splitter/mini-top.gif +0 -0
  351. js/amosoft/extjs/dnd_grid_to_grid.js +120 -0
  352. js/amosoft/extjs/examples.js +110 -0
  353. js/amosoft/extjs/ext-all.js +21 -0
app/code/local/Amosoft/Dropship/Block/Adminhtml/Amosoft.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Amosoft
5
+ *
6
+ * @category Local
7
+ * @package Amosoft_Dropship
8
+ */
9
+ class Amosoft_Dropship_Block_Adminhtml_Amosoft extends Mage_Adminhtml_Block_Widget_Grid_Container
10
+ {
11
+ public function __construct()
12
+ {
13
+ $this->_controller = 'adminhtml_amosoft';
14
+ $this->_blockGroup = 'dropship';
15
+ $this->_headerText = Mage::helper('dropship')->__('Vendor/Supplier Manager');
16
+ $this->_addButtonLabel = Mage::helper('dropship')->__('Add Vendor/Supplier');
17
+ parent::__construct();
18
+ }
19
+ }
app/code/local/Amosoft/Dropship/Block/Adminhtml/Inventory.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Amosoft
5
+ *
6
+ * @category Local
7
+ * @package Amosoft_Dropship
8
+ */
9
+ class Amosoft_Dropship_Block_Adminhtml_Inventory extends Mage_Adminhtml_Block_Widget_Grid_Container
10
+ {
11
+ public function __construct()
12
+ {
13
+ $this->_controller = 'adminhtml_inventory';
14
+ $this->_blockGroup = 'dropship';
15
+ $this->_headerText = Mage::helper('dropship')->__('Vendor/Supplier Details');
16
+ parent::__construct();
17
+ $this->removeButton('add');
18
+ }
19
+ }
app/code/local/Amosoft/Dropship/Block/Adminhtml/Inventory/Edit/Tab/Addvendorfield.php ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Amosoft
5
+ *
6
+ * @category Local
7
+ * @package Amosoft_Dropship
8
+ */
9
+
10
+ class Amosoft_Dropship_Block_Adminhtml_Inventory_Edit_Tab_Addvendorfield extends Mage_Adminhtml_Block_Widget
11
+ {
12
+ protected $_product;
13
+
14
+ protected $_productInstance;
15
+
16
+ protected $_values;
17
+
18
+ protected $_itemCount = 1;
19
+
20
+ /**
21
+ * Class constructor
22
+ */
23
+ public function __construct()
24
+ {
25
+ parent::__construct();
26
+ $this->setTemplate('amosoft/addvendorfields.phtml');
27
+ }
28
+
29
+ public function getItemCount()
30
+ {
31
+ return $this->_itemCount;
32
+ }
33
+
34
+ public function setItemCount($itemCount)
35
+ {
36
+ $this->_itemCount = max($this->_itemCount, $itemCount);
37
+ return $this;
38
+ }
39
+
40
+ /**
41
+ * Retrieve options field name prefix
42
+ *
43
+ * @return string
44
+ */
45
+ public function getFieldName()
46
+ {
47
+ return 'product[vendor_new]';
48
+ }
49
+
50
+ /**
51
+ * Retrieve options field id prefix
52
+ *
53
+ * @return string
54
+ */
55
+ public function getFieldId()
56
+ {
57
+ return 'product_vendor';
58
+ }
59
+
60
+ public function getVendorSelectHtml()
61
+ {
62
+ $productsku = Mage::getModel('catalog/product')->load(Mage::app()->getRequest()->getParam('id'))->getSku();
63
+
64
+ $select = $this->getLayout()->createBlock('adminhtml/html_select')
65
+ ->setData(array(
66
+ 'id' => $this->getFieldId().'_{{id}}_amosoft_vendor_code',
67
+ 'class' => 'select select-product-option-type required-option-select'
68
+ ))
69
+ ->setName($this->getFieldName().'[{{id}}][amosoft_vendor_code]')
70
+ ->setOptions(Mage::getSingleton('dropship/system_config_source_vendorlist')->vendorList('',$productsku));
71
+
72
+ return $select->getHtml();
73
+ }
74
+ protected function _prepareLayout()
75
+ {
76
+ $this->setChild('delete_button_vendor',
77
+ $this->getLayout()->createBlock('adminhtml/widget_button')
78
+ ->setData(array(
79
+ 'label' => Mage::helper('dropship')->__('Delete Option'),
80
+ 'class' => 'delete delete-product-option-vendor '
81
+ ))
82
+ );
83
+ return parent::_prepareLayout();
84
+ }
85
+
86
+ public function getAddButtonId()
87
+ {
88
+ $buttonId = $this->getLayout()
89
+ ->getBlock('vendors_product_tab')
90
+ ->getChild('vendor_add_button')->getId();
91
+ return $buttonId;
92
+ }
93
+
94
+ public function getDeleteButtonHtml()
95
+ {
96
+ return $this->getChildHtml('delete_button_vendor');
97
+ }
98
+
99
+ }
app/code/local/Amosoft/Dropship/Block/Adminhtml/Inventory/Edit/Tab/Amosoftvendor.php ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Amosoft
5
+ *
6
+ * @category Local
7
+ * @package Amosoft_Dropship
8
+ */
9
+
10
+ class Amosoft_Dropship_Block_Adminhtml_Inventory_Edit_Tab_Amosoftvendor extends Mage_Adminhtml_Block_Widget
11
+ {
12
+ public function __construct()
13
+ {
14
+ parent::__construct();
15
+ }
16
+
17
+
18
+ protected function _prepareLayout()
19
+ {
20
+ $this->setChild('vendor_add_button',
21
+ $this->getLayout()->createBlock('adminhtml/widget_button')
22
+ ->setData(array(
23
+ 'label' => Mage::helper('dropship')->__('Add New Supplier'),
24
+ 'class' => 'add',
25
+ 'id' => 'add_new_defined_option_vendor'
26
+ ))
27
+ );
28
+
29
+ $this->setChild('update_delete_button_vendor',
30
+ $this->getLayout()->createBlock('adminhtml/widget_button')
31
+ ->setData(array(
32
+ 'label' => Mage::helper('dropship')->__('Delete Option'),
33
+ 'class' => 'delete delete-product-option-vendor '
34
+ ))
35
+ );
36
+
37
+ $this->setChild('vendor_options_box',
38
+ $this->getLayout()->createBlock('dropship/adminhtml_inventory_edit_tab_addvendorfield')
39
+ );
40
+
41
+ return parent::_prepareLayout();
42
+ }
43
+
44
+ public function getAddButtonHtml()
45
+ {
46
+ return $this->getChildHtml('vendor_add_button');
47
+ }
48
+
49
+ public function getOptionsBoxHtml()
50
+ {
51
+ return $this->getChildHtml('vendor_options_box');
52
+ }
53
+
54
+ public function getAssignedData(){
55
+
56
+ $rankingTableName = Mage::getSingleton('core/resource')->getTableName('dropship/ranking');
57
+ $collection = Mage::getModel('dropship/inventory')->getCollection()
58
+ ->addFieldToFilter('product_sku',Mage::getModel('catalog/product')->load($this->getProductId())->getSku());
59
+ $collection->getSelect()->joinLeft(array('ranking' => $rankingTableName), 'main_table.amosoft_vendor_code=ranking.amosoft_vendor_code', array('vendor_name' => 'amosoft_vendor_name'));
60
+ return $collection;
61
+ }
62
+
63
+ public function getFieldName()
64
+ {
65
+ return 'product[vendor_update]';
66
+ }
67
+
68
+ /**
69
+ * Retrieve options field id prefix
70
+ *
71
+ * @return string
72
+ */
73
+ public function getFieldId()
74
+ {
75
+ return 'product_vendor';
76
+ }
77
+
78
+ public function getUpdateDeleteButtonHtml(){
79
+
80
+ return $this->getChildHtml('update_delete_button_vendor');
81
+ }
82
+
83
+ }
app/code/local/Amosoft/Dropship/Block/Adminhtml/Inventory/Edit/Tab/Vendortabhistory.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Amosoft
5
+ *
6
+ * @category Local
7
+ * @package Amosoft_Dropship
8
+ */
9
+
10
+ class Amosoft_Dropship_Block_Adminhtml_Inventory_Edit_Tab_Vendortabhistory extends Mage_Adminhtml_Block_Widget
11
+ {
12
+ public function __construct()
13
+ {
14
+ parent::__construct();
15
+ }
16
+
17
+
18
+ protected function _prepareLayout()
19
+ {
20
+ return parent::_prepareLayout();
21
+ }
22
+
23
+ public function getInventoryLog(){
24
+
25
+ $collection = Mage::getModel('dropship/inventorylog')->getCollection()->addFieldToFilter('product_sku',Mage::getModel('catalog/product')->load($this->getProductId())->getSku());
26
+ $collection->getSelect()->order('updated_at desc');
27
+
28
+ return $collection;
29
+ }
30
+ }
app/code/local/Amosoft/Dropship/Block/Adminhtml/Inventory/Edit/Vendortab.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Amosoft
5
+ *
6
+ * @category Local
7
+ * @package Amosoft_Dropship
8
+ */
9
+
10
+ class Amosoft_Dropship_Block_Adminhtml_Inventory_Edit_Vendortab extends Mage_Adminhtml_Block_Widget
11
+ implements Mage_Adminhtml_Block_Widget_Tab_Interface
12
+ {
13
+ public function canShowTab()
14
+ {
15
+ return true;
16
+ }
17
+ public function getTabLabel()
18
+ {
19
+ return $this->__('dropship Vendor');
20
+ }
21
+ public function getTabTitle()
22
+ {
23
+ return $this->__('dropship Vendor');
24
+ }
25
+ public function isHidden()
26
+ {
27
+ return false;
28
+ }
29
+ public function getTabUrl()
30
+ {
31
+ return $this->getUrl('amosoft/adminhtml_inventory/vendors', array('_current' => true));
32
+ }
33
+ public function getTabClass()
34
+ {
35
+ return 'ajax';
36
+ }
37
+ }
app/code/local/Amosoft/Dropship/Block/Adminhtml/Inventory/Edit/Vendortabhistory.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Amosoft
5
+ *
6
+ * @category Local
7
+ * @package Amosoft_Dropship
8
+ */
9
+
10
+ class Amosoft_Dropship_Block_Adminhtml_Inventory_Edit_Vendortabhistory extends Mage_Adminhtml_Block_Widget
11
+ implements Mage_Adminhtml_Block_Widget_Tab_Interface
12
+ {
13
+ public function canShowTab()
14
+ {
15
+ return true;
16
+ }
17
+ public function getTabLabel()
18
+ {
19
+ return $this->__('dropship Vendor History');
20
+ }
21
+ public function getTabTitle()
22
+ {
23
+ return $this->__('Vendor History');
24
+ }
25
+ public function isHidden()
26
+ {
27
+ return false;
28
+ }
29
+ public function getTabUrl()
30
+ {
31
+ return $this->getUrl('amosoft/adminhtml_inventory/vendorshistory', array('_current' => true));
32
+ }
33
+ public function getTabClass()
34
+ {
35
+ return 'ajax';
36
+ }
37
+ }
app/code/local/Amosoft/Dropship/Block/Adminhtml/Inventory/Grid.php ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Amosoft
5
+ *
6
+ * @category Local
7
+ * @package Amosoft_Dropship
8
+ */
9
+
10
+ class Amosoft_Dropship_Block_Adminhtml_Inventory_Grid extends Mage_Adminhtml_Block_Widget_Grid
11
+ {
12
+ public function __construct()
13
+ {
14
+ parent::__construct();
15
+ $this->setId('amosoftgrid');
16
+ $this->setDefaultSort('updated_at');
17
+ $this->setDefaultDir('DESC');
18
+ $this->setUseAjax(true);
19
+ $this->setSaveParametersInSession(true);
20
+ }
21
+
22
+ protected function _prepareCollection()
23
+ {
24
+ $entityTypeId = Mage::getModel('eav/config')->getEntityType('catalog_product')->getEntityTypeId();
25
+ $prodNameAttrId = Mage::getModel('eav/entity_attribute')->loadByCode($entityTypeId, 'name')->getAttributeId();
26
+ $collection = Mage::getModel('dropship/inventory')->getCollection();
27
+ $collection->getSelect()->join(array('amosoftRanking'=>Mage::getSingleton('core/resource')->getTableName('dropship/ranking')),'amosoftRanking.amosoft_vendor_code = main_table.amosoft_vendor_code', array('amosoft_vendor_name'));
28
+ $collection->getSelect()->joinLeft(array('prod' => Mage::getSingleton('core/resource')->getTableName('catalog/product')),'prod.sku = main_table.product_sku',array('magento_pro_id'=>'entity_id'));
29
+ $collection->getSelect()->joinLeft(array('cpev' => Mage::getSingleton('core/resource')->getTableName('catalog/product').'_varchar'),'cpev.entity_id=prod.entity_id AND cpev.attribute_id='.$prodNameAttrId.'',array('product_name' => 'value'));
30
+ $collection->getSelect()->where('prod.entity_id IS NOT NULL');
31
+ $this->setCollection($collection);
32
+ return parent::_prepareCollection();
33
+ }
34
+
35
+ protected function _getStore()
36
+ {
37
+ $storeId = (int) $this->getRequest()->getParam('store', 0);
38
+ return Mage::app()->getStore($storeId);
39
+ }
40
+
41
+ protected function _prepareColumns()
42
+ {
43
+ $this->addColumn('amosoft_vendor_name', array(
44
+ 'header' => Mage::helper('dropship')->__('Vendor'),
45
+ 'align' =>'right',
46
+ 'width' => '50px',
47
+ 'filter_index' => 'amosoftRanking.amosoft_vendor_name',
48
+ 'index' => 'amosoft_vendor_name',
49
+ ));
50
+
51
+ $this->addColumn('stock', array(
52
+ 'header' => Mage::helper('dropship')->__('Vendor Inventory'),
53
+ 'index' => 'stock',
54
+ 'type' => 'number'
55
+ ));
56
+ $store = $this->_getStore();
57
+ $this->addColumn('cost', array(
58
+ 'header' => Mage::helper('dropship')->__('Cost'),
59
+ 'index' => 'cost',
60
+ 'type' => 'price',
61
+ 'currency_code' => $store->getBaseCurrency()->getCode(),
62
+ ));
63
+
64
+ $store = $this->_getStore();
65
+ $this->addColumn('shipping_cost', array(
66
+ 'header' => Mage::helper('dropship')->__('Shipping Cost'),
67
+ 'index' => 'shipping_cost',
68
+ 'type' => 'price',
69
+ 'currency_code' => $store->getBaseCurrency()->getCode(),
70
+ ));
71
+
72
+ $this->addColumn('product_name', array(
73
+ 'header' => Mage::helper('dropship')->__('Product Name'),
74
+ 'align' =>'left',
75
+ 'width' => '80px',
76
+ 'index' => 'product_name',
77
+ 'filter_index'=>'cpev.value',
78
+ ));
79
+ $this->addColumn('product_sku', array(
80
+ 'header' => Mage::helper('dropship')->__('Product Sku'),
81
+ 'align' =>'left',
82
+ 'width' => '80px',
83
+ 'index' => 'product_sku',
84
+ 'renderer' => 'Amosoft_Dropship_Block_Adminhtml_Widget_Grid_Column_Skuaction'
85
+ ));
86
+
87
+ $this->addColumn('amosoft_vendor_sku', array(
88
+ 'header' => Mage::helper('dropship')->__('Vendor Sku'),
89
+ 'align' =>'left',
90
+ 'width' => '80px',
91
+ 'index' => 'amosoft_vendor_sku',
92
+ 'renderer' => 'Amosoft_Dropship_Block_Adminhtml_Widget_Grid_Column_Skuaction'
93
+ ));
94
+ $this->addColumn('updated_at', array(
95
+ 'header' => Mage::helper('dropship')->__('Last Sync'),
96
+ 'index' => 'updated_at',
97
+ 'width' => '80px',
98
+ 'default' => '--',
99
+ 'type' => 'datetime',
100
+ 'filter_index'=> 'main_table.updated_at'
101
+ ));
102
+
103
+ // below code added for Jira ticket 734
104
+ $this->addColumn('action',
105
+ array(
106
+ 'header' => Mage::helper('dropship')->__('Action'),
107
+ 'width' => '100',
108
+ 'type' => 'action',
109
+ 'getter' => 'getMagentoProId',
110
+ 'actions' => array(
111
+ array(
112
+ 'caption' => Mage::helper('dropship')->__('Edit'),
113
+ 'url' => array('base'=> 'adminhtml/catalog_product/edit/back/edit/tab/product_info_tabs_vendor_tab'),
114
+ 'field' => 'id'
115
+ )
116
+ ),
117
+ 'filter' => false,
118
+ 'sortable' => false,
119
+ 'index' => 'stores',
120
+ 'is_system' => true,
121
+ ));
122
+ $this->addExportType('*/*/exportCsv', Mage::helper('dropship')->__('CSV'));
123
+ $this->addExportType('*/*/exportXml', Mage::helper('dropship')->__('XML'));
124
+
125
+ return parent::_prepareColumns();
126
+ }
127
+
128
+ public function getRowUrl($row)
129
+ {
130
+ //return $this->getUrl('*/*/edit', array('vendor_id' => $row->getVendorId()));
131
+ }
132
+ public function getGridUrl()
133
+ {
134
+ return $this->getUrl('*/*/grid', array('_current'=>true));
135
+ }
136
+
137
+ }
app/code/local/Amosoft/Dropship/Block/Adminhtml/Notification.php ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Amosoft
5
+ *
6
+ * @category Local
7
+ * @package Amosoft_Dropship
8
+ */
9
+ class Amosoft_Dropship_Block_Adminhtml_Notification extends Mage_Adminhtml_Block_Notification_Window
10
+ {
11
+ protected function _construct(){
12
+ parent::_construct();
13
+ $this->setHeaderText($this->escapeHtml($this->__('Amosoft Message')));
14
+ $this->setCloseText($this->escapeHtml($this->__('close')));
15
+ $this->setReadDetailsText($this->escapeHtml($this->__('Read details')));
16
+ $this->setNoticeText($this->escapeHtml($this->__('NOTICE')));
17
+ $this->setMinorText($this->escapeHtml($this->__('MINOR')));
18
+ $this->setMajorText($this->escapeHtml($this->__('MAJOR')));
19
+ $this->setCriticalText($this->escapeHtml($this->__('CRITICAL')));
20
+
21
+ }
22
+
23
+ public function getNoticeMessageText(){
24
+
25
+ $result = array();
26
+ //soap Details
27
+ $result['username'] = 'amosoft';
28
+ $apiResult = Mage::getModel('dropship/amosoft')->createApiRoleAndUser(array('api_user_name'=>'amosoft','email'=>'noreply@amosoft.com'));
29
+ $result['api_password'] = $apiResult['password'];
30
+ $result['user_id'] = $apiResult['user_id'];
31
+
32
+ //rest deatils
33
+ //code comment as Rest may be a part of future release
34
+ /* $arrRest = Mage::getModel('dropship/api2_createroleandrule')->initiliazeRest();
35
+ $result['consumer_key'] = $arrRest['consumer_key'];
36
+ $result['consumer_secret'] = $arrRest['consumer_secret'];
37
+ $result['token'] = $arrRest['token'];
38
+ $result['secret'] =$arrRest['secret']; */
39
+ $coreConfigData = array(
40
+
41
+ array(
42
+ 'scope' => 'default',
43
+ 'scope_id' => '0',
44
+ 'path' => 'amosoft_integration/integration/soapuser',
45
+ 'value' => $result['username'],
46
+
47
+ )
48
+ /*,
49
+
50
+ array(
51
+ 'scope' => 'default',
52
+ 'scope_id' => '0',
53
+ 'path' => 'amosoft_integration/integration/cunsumer_key',
54
+ 'value' => $result['consumer_key'],
55
+
56
+ )
57
+ ,
58
+ array(
59
+ 'scope' => 'default',
60
+ 'scope_id' => '0',
61
+ 'path' => 'amosoft_integration/integration/consumer_secret',
62
+ 'value' => $result['consumer_secret'],
63
+
64
+ ), array(
65
+ 'scope' => 'default',
66
+ 'scope_id' => '0',
67
+ 'path' => 'amosoft_integration/integration/access_token',
68
+ 'value' => $result['token'],
69
+
70
+ ),
71
+ array(
72
+ 'scope' => 'default',
73
+ 'scope_id' => '0',
74
+ 'path' => 'amosoft_integration/integration/access_secret',
75
+ 'value' => $result['secret'],
76
+
77
+ ) */
78
+ );
79
+
80
+ foreach ($coreConfigData as $data) {
81
+ $this->setConfigValue($data);
82
+ }
83
+ return $result;
84
+
85
+ }
86
+
87
+ public function setConfigValue($data)
88
+ {
89
+ Mage::getModel('core/config_data')->load($data['path'],'path')->setData($data)->save();
90
+ }
91
+
92
+ public function canShow()
93
+ {
94
+ if (Mage::getStoreConfig('amosoft_integration/integration/notificationstatus') == 0) {
95
+ $this->setConfigValue(array(
96
+ 'scope' => 'default',
97
+ 'scope_id' => '0',
98
+ 'path' => 'amosoft_integration/integration/notificationstatus',
99
+ 'value' => '1',
100
+
101
+ ));
102
+ return true;
103
+ }
104
+ return false;
105
+
106
+ }
107
+ }
app/code/local/Amosoft/Dropship/Block/Adminhtml/Ranking.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Amosoft
5
+ *
6
+ * @category Local
7
+ * @package Amosoft_Dropship
8
+ */
9
+ class Amosoft_Dropship_Block_Adminhtml_Ranking extends Mage_Adminhtml_Block_Widget_Grid_Container
10
+ {
11
+ public function __construct()
12
+ {
13
+ $this->_controller = 'adminhtml_ranking';
14
+ $this->_blockGroup = 'dropship';
15
+ $this->_headerText = Mage::helper('dropship')->__('Vendor/Supplier Management');
16
+ $this->_addButtonLabel = Mage::helper('dropship')->__('Add Vendor Ranking');
17
+
18
+
19
+ $this->addButton('show_history',array(
20
+ 'label' => 'Show History',
21
+ 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/showhistory') .'\')',
22
+ 'class' => 'save amosoft-button',
23
+ ));
24
+ $this->addButton('save_ranking_table',array(
25
+ 'label' => 'save ranking table',
26
+ 'onclick' => 'saveRankingTable()',
27
+ 'class' => 'save amosoft-button',
28
+ ));
29
+
30
+ $this->addButton('save_ranking',array(
31
+ 'label' => 'Save Ranking',
32
+ 'class' => 'save amosoft-button',
33
+ 'onclick' => 'saveRankingTable()',
34
+
35
+ ));
36
+ parent::__construct();
37
+ $this->setTemplate('amosoft/vendor_ranking.phtml');
38
+ $this->removeButton('add');
39
+ $this->removeButton('save_ranking_table');
40
+
41
+ }
42
+ public function getVendorCollection($type = 'no'){
43
+
44
+ $arrVendor = array();
45
+ $tempReslt = Mage::getModel('dropship/ranking')->getVendorCollection($type);
46
+ $result['gridData'] = Mage::helper('core')->jsonEncode($tempReslt);
47
+ if(!empty($tempReslt)){
48
+ foreach($tempReslt as $value){
49
+ $arrVendor[] = array('name'=>$value['name'],'code'=>$value['code']);
50
+ }
51
+ }
52
+ $result['arrayData'] = Mage::helper('core')->jsonEncode($arrVendor);
53
+ return $result;
54
+ }
55
+ public function getAttributeCode()
56
+ {
57
+ $helper = Mage::helper('dropship');
58
+ $attributeCode = array(array('link'=>'','name'=>$helper::AMOSOFT_PRODUCT_LINK_NONE),array('link'=>$helper::AMOSOFT_PRODUCT_LINK_CODE_UPC,'name'=>$helper::AMOSOFT_PRODUCT_LINK_UPC),array('link'=>$helper::AMOSOFT_PRODUCT_LINK_CODE_MNP,'name'=>$helper::AMOSOFT_PRODUCT_LINK_MNP),array('link'=>$helper::AMOSOFT_PRODUCT_LINK_CODE_SKU,'name'=>$helper::AMOSOFT_PRODUCT_LINK_SKU));
59
+ return Mage::helper('core')->jsonEncode($attributeCode);
60
+ }
61
+
62
+ }
app/code/local/Amosoft/Dropship/Block/Adminhtml/Ranking/Grid.php ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Amosoft
5
+ *
6
+ * @category Local
7
+ * @package Amosoft_Dropship
8
+ */
9
+
10
+ class Amosoft_Dropship_Block_Adminhtml_Ranking_Grid extends Mage_Adminhtml_Block_Widget_Grid
11
+ {
12
+ public function __construct()
13
+ {
14
+ parent::__construct();
15
+ $this->setId('amosoftgrid');
16
+ $this->setDefaultSort('ranking');
17
+ $this->setDefaultDir('ASC');
18
+ $this->setUseAjax(true);
19
+ $this->setSaveParametersInSession(true);
20
+ }
21
+
22
+ protected function _prepareCollection()
23
+ {
24
+ $collection = Mage::getModel('dropship/ranking')->getCollection();
25
+ $this->setCollection($collection);
26
+ return parent::_prepareCollection();
27
+ }
28
+
29
+ protected function _prepareColumns()
30
+ {
31
+
32
+ $this->addColumn('amosoft_vendor_code', array(
33
+ 'header' => Mage::helper('dropship')->__('Vendor Code'),
34
+ 'align' =>'right',
35
+ 'width' => '50px',
36
+ 'index' => 'amosoft_vendor_code',
37
+ ));
38
+ $this->addColumn('ranking', array(
39
+ 'header' => Mage::helper('dropship')->__('Position'),
40
+ 'align' =>'right',
41
+ 'width' => '50px',
42
+ 'type' => 'input',
43
+ 'index' => 'ranking',
44
+ 'inline_css' => 'vendor_ranking required-entry validate-digits validate-greater-than-zero',
45
+ ));
46
+ $this->addColumn('action',
47
+ array(
48
+ 'header' => Mage::helper('dropship')->__('Action'),
49
+ 'width' => '100',
50
+ 'type' => 'textaction',
51
+ 'getter' => 'getId',
52
+ 'actions' => array(
53
+ array(
54
+ 'caption' => Mage::helper('dropship')->__('edit'),
55
+ 'url' => array('base'=> '*/*/edit'),
56
+ 'field' => 'id'
57
+ ),
58
+ array(
59
+ 'caption' => Mage::helper('dropship')->__('delete'),
60
+ 'url' => array('base'=> '*/*/delete'),
61
+ 'field' => 'id',
62
+ 'confirm' =>'Are you sure to delete the Vendor?'
63
+
64
+ )
65
+ ),
66
+ 'filter' => false,
67
+ 'sortable' => false,
68
+ 'index' => 'stores',
69
+ 'is_system' => true,
70
+ 'renderer' => 'Amosoft_Dropship_Block_Adminhtml_Widget_Grid_Column_Textaction'
71
+ ));
72
+ return parent::_prepareColumns();
73
+ }
74
+
75
+
76
+
77
+
78
+ public function getRowUrl($row)
79
+ {
80
+ return $this->getUrl('*/*/edit', array('id' => $row->getId()));
81
+ }
82
+ public function getGridUrl()
83
+ {
84
+ return $this->getUrl('*/*/grid', array('_current'=>true));
85
+ }
86
+
87
+ }
app/code/local/Amosoft/Dropship/Block/Adminhtml/Sales/Order/View/Items.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Adminhtml order items grid overwrite for Adding Amosoft order item details
4
+ *
5
+ * @category Amosoft
6
+ * @package Amosoft_Dropship
7
+ */
8
+ class Amosoft_Dropship_Block_Adminhtml_Sales_Order_View_Items extends Mage_Adminhtml_Block_Sales_Order_View_Items
9
+ {
10
+ /**
11
+ * Retrieve order items collection
12
+ *
13
+ * @return unknown
14
+ */
15
+ public function getItemsCollection()
16
+ {
17
+ $id = $this->getOrder()->getId();
18
+ $collection = Mage::getResourceModel('sales/order_item_collection');
19
+ $collection->getSelect()->joinLeft( array('abc'=> Mage::getSingleton('core/resource')->getTableName('dropship/orderitems')), "main_table.item_id = abc.item_id",array("abc.amosoft_item_status", "abc.amosoft_vendor_sku","abc.amosoft_vendor_code"))->where("main_table.order_id =".$id);
20
+ $collection->getSelect()->joinLeft( array('nr'=> Mage::getSingleton('core/resource')->getTableName('dropship/ranking')), "abc.amosoft_vendor_code = nr.amosoft_vendor_code",array("nr.amosoft_vendor_name"));
21
+ return $collection;
22
+ }
23
+ }
app/code/local/Amosoft/Dropship/Block/Adminhtml/Showhistory.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Amosoft
5
+ *
6
+ * @category Local
7
+ * @package Amosoft_Dropship
8
+ */
9
+ class Amosoft_Dropship_Block_Adminhtml_Showhistory extends Mage_Adminhtml_Block_Widget_Grid_Container
10
+ {
11
+ public function __construct()
12
+ {
13
+ $this->_controller = 'adminhtml_ranking';
14
+ $this->_blockGroup = 'dropship';
15
+ $this->_headerText = Mage::helper('dropship')->__('Vendor Ranking Log');
16
+ $this->__addBackButton = Mage::helper('dropship')->__('Back');
17
+ $this->addButton('back',array(
18
+ 'label' => 'Back',
19
+ 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/') .'\')',
20
+ 'class' => 'back',
21
+ )
22
+ );
23
+ parent::__construct();
24
+ $this->removeButton('add');
25
+
26
+ }
27
+
28
+ public function getLogCollection(){
29
+ $collection = Mage::getModel('dropship/rankinglog')->getCollection();
30
+ $collection->getSelect()->order('created_at desc');
31
+ $logtable = array();
32
+ foreach($collection as $value){
33
+ $logtable[$value->getLabel()] = unserialize($value->getRankingData());
34
+ $logtable[$value->getLabel()]['created'] = $value->getCreatedAt();
35
+ }
36
+
37
+ return $logtable;
38
+ }
39
+ }
app/code/local/Amosoft/Dropship/Block/Adminhtml/Sourcing.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Amosoft
5
+ *
6
+ * @category Local
7
+ * @package Amosoft_Dropship
8
+ */
9
+ class Amosoft_Dropship_Block_Adminhtml_Sourcing extends Mage_Adminhtml_Block_Widget_Grid_Container
10
+ {
11
+ public function __construct()
12
+ {
13
+ $this->_controller = 'adminhtml_sourcing';
14
+ $this->_blockGroup = 'dropship';
15
+ $this->_headerText = Mage::helper('dropship')->__('Order Management');
16
+ $this->_addButtonLabel = Mage::helper('dropship')->__('Add Vendor');
17
+ parent::__construct();
18
+ $this->removeButton('add');
19
+ }
20
+
21
+ public function getAmosoftOrderItemsDetails($item){
22
+
23
+ $ItemCollection = Mage::getModel('dropship/orderitems')->getCollection()->addFieldTofilter('item_order_id',$item->getOrderId())->addFieldTofilter('sku',$item->getSku());
24
+ $ItemCollection->getSelect()->joinLeft( array('nrank'=> Mage::getSingleton('core/resource')->getTableName('dropship/ranking')), "main_table.amosoft_vendor_code = nrank.amosoft_vendor_code",array("nrank.amosoft_vendor_name"));
25
+ return $ItemCollection->getFirstItem();
26
+ }
27
+ }
app/code/local/Amosoft/Dropship/Block/Adminhtml/Sourcing/Edit.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Amosoft
5
+ *
6
+ * @category Local
7
+ * @package Amosoft_Dropship
8
+ */
9
+
10
+ class Amosoft_Dropship_Block_Adminhtml_Sourcing_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
11
+ {
12
+ public function __construct()
13
+ {
14
+
15
+
16
+ $this->_objectId = 'amosoft_item_id';
17
+ $this->_blockGroup = 'dropship';
18
+ $this->_controller = 'adminhtml_sourcing';
19
+ parent::__construct();
20
+
21
+ $this->_updateButton('save', 'label', Mage::helper('dropship')->__('Save Sourcing'));
22
+ $this->_updateButton('delete', 'label', Mage::helper('dropship')->__('Delete Supplier'));
23
+
24
+ $this->_addButton('saveandcontinue', array(
25
+ 'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
26
+ 'onclick' => 'saveAndContinueEdit()',
27
+ 'class' => 'save amosoft-button',
28
+ ), -100);
29
+ if(Mage::registry('sourcing_data')->getData('updated_by') != 'Amosoft'){
30
+
31
+ $this->_addButton('cancelitem', array(
32
+ 'label' => Mage::helper('adminhtml')->__('Cancel Item'),
33
+ 'onclick' => 'cancelItem()',
34
+ 'class' => 'delete',
35
+ ), -100);
36
+ }
37
+ $this->_removeButton('delete');
38
+ $this->_removeButton('reset');
39
+ $this->_formScripts[] = "
40
+
41
+ function saveAndContinueEdit(){
42
+ editForm.submit($('edit_form').action+'back/edit/');
43
+ }
44
+ function cancelItem(){
45
+ $('amosoft_vendor_code').className = '';
46
+ editForm.submit($('edit_form').action+'cancel/item/');
47
+ }
48
+ ";
49
+
50
+
51
+ }
52
+
53
+ public function getBackUrl()
54
+ {
55
+ return $this->getUrl('*/*/sourcinggrid');
56
+ }
57
+
58
+ public function getHeaderText()
59
+ {
60
+ if( Mage::registry('sourcing_data') && Mage::registry('sourcing_data')->getAmosoftItemId() ) {
61
+ return Mage::helper('dropship')->__("Edit Item Sourcing Supplier", $this->htmlEscape(Mage::registry('sourcing_data')->getTitle()));
62
+ } else {
63
+ return Mage::helper('dropship')->__('Select Sourcing Supplier');
64
+ }
65
+ }
66
+
67
+ }
app/code/local/Amosoft/Dropship/Block/Adminhtml/Sourcing/Edit/Form.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Amosoft
5
+ *
6
+ * @category Local
7
+ * @package Amosoft_Dropship
8
+ */
9
+
10
+ class Amosoft_Dropship_Block_Adminhtml_Sourcing_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
11
+ {
12
+ protected function _prepareForm()
13
+ {
14
+ $form = new Varien_Data_Form(array(
15
+ 'id' => 'edit_form',
16
+ 'action' => $this->getUrl('*/*/save', array('amosoft_item_id' => $this->getRequest()->getParam('amosoft_item_id'), 'qty'=>$this->getRequest()->getParam('qty'))),
17
+ 'method' => 'post',
18
+ 'enctype' => 'multipart/form-data'
19
+ )
20
+ );
21
+
22
+ $form->setUseContainer(true);
23
+ $this->setForm($form);
24
+ return parent::_prepareForm();
25
+ }
26
+ }
app/code/local/Amosoft/Dropship/Block/Adminhtml/Sourcing/Edit/Tab/Form.php ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Amosoft
5
+ *
6
+ * @category Local
7
+ * @package Amosoft_Dropship
8
+ */
9
+
10
+ class Amosoft_Dropship_Block_Adminhtml_Sourcing_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
11
+ {
12
+
13
+ protected $_statusArray = array(
14
+ Amosoft_Dropship_Helper_Data::AMOSOFT_ITEM_STATUS_TRANSMITTING,
15
+ Amosoft_Dropship_Helper_Data::AMOSOFT_ITEM_STATUS_SOURCING,
16
+ Amosoft_Dropship_Helper_Data::AMOSOFT_ITEM_STATUS_REPROCESS,
17
+ Amosoft_Dropship_Helper_Data::AMOSOFT_ITEM_STATUS_BACKORDER,
18
+ Amosoft_Dropship_Helper_Data::AMOSOFT_ITEM_STATUS_NO_DROPSHIP
19
+ );
20
+ protected function _prepareForm()
21
+ {
22
+ $form = new Varien_Data_Form();
23
+ $sku = Mage::registry('sourcing_data')->getData('sku');
24
+ $this->setForm($form);
25
+ $fieldset = $form->addFieldset('amosoft_form', array('legend'=>Mage::helper('dropship')->__('Item Sourcing Information')));
26
+
27
+ if(in_array(Mage::registry('sourcing_data')->getData('amosoft_item_status'),$this->_statusArray)){
28
+ $fieldset->addField('amosoft_vendor_code', 'select', array(
29
+ 'label' => Mage::helper('dropship')->__('Supplier'),
30
+ 'class' => 'required-entry validate-select',
31
+ 'required' => true,
32
+ 'name' => 'amosoft_vendor_code',
33
+ 'values' => Mage::getModel('dropship/system_config_source_vendorlist')->vendorListSourcing(true,$sku),
34
+ 'default' => '',
35
+ 'note' => 'Select your Dropship Supplier to source this item and bypass the dropship sourcing rule.'
36
+ ));
37
+ }
38
+ $fieldset->addField('amosoft_item_status', 'text', array(
39
+ 'label' => Mage::helper('dropship')->__('Amosoft Item Status'),
40
+ 'name' => 'amosoft_item_status',
41
+ 'note'=>'Read only filed',
42
+ 'readonly'=> true
43
+ ));
44
+
45
+
46
+ $fieldset->addField('sku', 'text', array(
47
+ 'label' => Mage::helper('dropship')->__('Sku'),
48
+ 'name' => 'sku',
49
+ 'note'=>'Read only filed',
50
+ 'readonly'=> true
51
+ ));
52
+ $fieldset->addField('item_order_id', 'hidden', array(
53
+ 'name' => 'item_order_id',
54
+ ));
55
+
56
+ $fieldset->addField('item_id', 'hidden', array(
57
+ 'name' => 'item_id',
58
+ ));
59
+
60
+ if ( Mage::getSingleton('adminhtml/session')->getSourcingData() )
61
+ {
62
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getSourcingData());
63
+ Mage::getSingleton('adminhtml/session')->setSourcingData(null);
64
+ } elseif ( Mage::registry('sourcing_data') ) {
65
+ $form->setValues(Mage::registry('sourcing_data')->getData());
66
+ }
67
+ return parent::_prepareForm();
68
+ }
69
+ }
app/code/local/Amosoft/Dropship/Block/Adminhtml/Sourcing/Edit/Tabs.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Amosoft
5
+ *
6
+ * @category Local
7
+ * @package Amosoft_Dropship
8
+ */
9
+
10
+ class Amosoft_Dropship_Block_Adminhtml_Sourcing_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
11
+ {
12
+
13
+
14
+ public function __construct()
15
+ {
16
+ parent::__construct();
17
+ $this->setId('amosoft_tabs');
18
+ $this->setDestElementId('edit_form');
19
+ $this->setTitle(Mage::helper('dropship')->__('Item Sourcing Information'));
20
+ }
21
+
22
+ protected function _beforeToHtml()
23
+ {
24
+ $this->addTab('form_section', array(
25
+ 'label' => Mage::helper('dropship')->__('Item Sourcing Information'),
26
+ 'title' => Mage::helper('dropship')->__('Item Sourcing Information'),
27
+ 'content' => $this->getLayout()->createBlock('dropship/adminhtml_sourcing_edit_tab_form')->toHtml(),
28
+ ));
29
+
30
+ return parent::_beforeToHtml();
31
+ }
32
+ }
app/code/local/Amosoft/Dropship/Block/Adminhtml/Sourcing/Grid.php ADDED
@@ -0,0 +1,211 @@