spree 0.10.2 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of spree might be problematic. Click here for more details.

Files changed (536) hide show
  1. data/CHANGELOG +81 -4
  2. data/CONTRIBUTORS +18 -10
  3. data/Rakefile +5 -4
  4. data/app/controllers/admin/adjustments_controller.rb +17 -3
  5. data/app/controllers/admin/base_controller.rb +2 -2
  6. data/app/controllers/admin/checkouts_controller.rb +43 -34
  7. data/app/controllers/admin/line_items_controller.rb +32 -18
  8. data/app/controllers/admin/option_types_controller.rb +1 -1
  9. data/app/controllers/admin/orders_controller.rb +28 -7
  10. data/app/controllers/admin/payments_controller.rb +7 -7
  11. data/app/controllers/admin/products_controller.rb +12 -23
  12. data/app/controllers/admin/reports_controller.rb +19 -7
  13. data/app/controllers/admin/return_authorizations_controller.rb +1 -1
  14. data/app/controllers/admin/shipments_controller.rb +9 -9
  15. data/app/controllers/admin/users_controller.rb +3 -1
  16. data/app/controllers/admin/variants_controller.rb +2 -2
  17. data/app/controllers/checkouts_controller.rb +29 -18
  18. data/app/controllers/content_controller.rb +1 -1
  19. data/{vendor/extensions/localization/app → app}/controllers/locale_controller.rb +1 -1
  20. data/app/controllers/orders_controller.rb +33 -30
  21. data/app/controllers/password_resets_controller.rb +4 -4
  22. data/app/controllers/products_controller.rb +0 -6
  23. data/app/controllers/spree/base_controller.rb +9 -2
  24. data/app/controllers/user_sessions_controller.rb +18 -18
  25. data/app/controllers/users_controller.rb +2 -2
  26. data/app/helpers/admin/base_helper.rb +5 -2
  27. data/app/helpers/admin/navigation_helper.rb +1 -1
  28. data/app/helpers/admin/orders_helper.rb +0 -13
  29. data/app/helpers/admin/products_helper.rb +0 -8
  30. data/app/helpers/checkouts_helper.rb +5 -5
  31. data/app/helpers/products_helper.rb +0 -12
  32. data/app/helpers/spree/base_helper.rb +10 -39
  33. data/app/helpers/taxons_helper.rb +1 -0
  34. data/app/models/address.rb +6 -1
  35. data/app/models/app_configuration.rb +15 -14
  36. data/app/models/calculator/flexi_rate.rb +2 -1
  37. data/app/models/calculator/vat.rb +1 -1
  38. data/app/models/checkout.rb +1 -1
  39. data/app/models/creditcard.rb +26 -20
  40. data/app/models/inventory_unit.rb +70 -21
  41. data/app/models/line_item.rb +25 -11
  42. data/app/models/order.rb +16 -10
  43. data/app/models/payment.rb +4 -1
  44. data/app/models/payment_method.rb +14 -5
  45. data/app/models/product.rb +12 -4
  46. data/app/models/role.rb +2 -2
  47. data/app/models/shipment.rb +21 -2
  48. data/app/models/tax_category.rb +8 -0
  49. data/app/models/taxon.rb +8 -0
  50. data/app/models/user.rb +2 -3
  51. data/app/models/variant.rb +18 -13
  52. data/config/boot.rb +1 -5
  53. data/config/cucumber.yml +7 -0
  54. data/config/database.yml +20 -37
  55. data/config/database.yml.example +5 -6
  56. data/config/environment.rb +6 -5
  57. data/config/environments/cucumber.rb +30 -0
  58. data/config/environments/production.rb +1 -4
  59. data/config/environments/staging.rb +3 -0
  60. data/config/environments/test.rb +1 -1
  61. data/config/initializers/cookie_verification_secret.rb +7 -0
  62. data/config/initializers/locales.rb +4 -2
  63. data/config/initializers/new_rails_defaults.rb +2 -0
  64. data/config/initializers/spree.rb +1 -0
  65. data/config/initializers/workarounds_for_ruby19.rb +0 -25
  66. data/config/locales/{en-US.yml → en_spree.yml} +18 -4
  67. data/config/routes.rb +2 -1
  68. data/db/migrate/20100317120946_add_alt_text_to_images.rb +9 -0
  69. data/db/migrate/20100427121301_add_display_to_payment_methods.rb +9 -0
  70. data/db/migrate/20100504142133_add_addresses_checkouts_indexes.rb +16 -0
  71. data/db/migrate/20100506180619_add_icon_to_taxons.rb +18 -0
  72. data/db/migrate/20100506185838_add_description_to_taxons.rb +11 -0
  73. data/db/migrate/20100528155333_index_for_shipments_number.rb +9 -0
  74. data/db/migrate/20100528185820_add_index_on_users_persistence_token.rb +9 -0
  75. data/db/migrate/20100605152042_add_default_to_tax_categories.rb +9 -0
  76. data/db/sample/payment_methods.yml +8 -1
  77. data/db/sample/shipments.yml +2 -2
  78. data/db/schema.rb +54 -21
  79. data/features/checkout.feature +98 -0
  80. data/features/create_admin_user.feature +18 -0
  81. data/features/search.feature +35 -0
  82. data/features/sign_in.feature +25 -0
  83. data/features/sign_out.feature +12 -0
  84. data/features/sign_up.feature +20 -0
  85. data/features/step_definitions/error_steps.rb +3 -0
  86. data/features/step_definitions/model_steps.rb +3 -0
  87. data/features/step_definitions/pickle_steps.rb +73 -0
  88. data/features/step_definitions/role_steps.rb +8 -0
  89. data/features/step_definitions/session_steps.rb +14 -0
  90. data/features/step_definitions/user_steps.rb +67 -0
  91. data/features/step_definitions/web_steps.rb +197 -0
  92. data/features/support/create_admin_user.rb +6 -0
  93. data/features/support/env.rb +89 -0
  94. data/features/support/paths.rb +32 -0
  95. data/features/support/pickle.rb +24 -0
  96. data/features/work_with_cart.feature +41 -0
  97. data/lib/generators/extension_model/extension_model_generator.rb +10 -10
  98. data/lib/generators/instance/templates/databases/mysql.yml +11 -0
  99. data/lib/scopes/variant.rb +10 -0
  100. data/lib/spree.rb +3 -3
  101. data/lib/spree/extensions.rb +1 -1
  102. data/lib/tasks/cucumber.rake +47 -0
  103. data/lib/tasks/database.rake +29 -29
  104. data/public/images/admin/bg/spree_50.png +0 -0
  105. data/public/images/tile-header.png +0 -0
  106. data/public/images/tile-slider.png +0 -0
  107. data/public/javascripts/admin/checkouts/edit.js +33 -0
  108. data/public/javascripts/dashboard.js +2 -2
  109. data/public/javascripts/taxonomy.js +2 -2
  110. data/public/stylesheets/admin/admin-tables.css +4 -0
  111. data/public/stylesheets/admin/admin.css +31 -16
  112. data/public/stylesheets/screen.css +16 -3
  113. data/script/about +3 -2
  114. data/script/console +2 -2
  115. data/script/cucumber +10 -0
  116. data/script/dbconsole +1 -1
  117. data/script/destroy +2 -2
  118. data/script/generate +2 -2
  119. data/script/performance/benchmarker +1 -1
  120. data/script/performance/profiler +1 -1
  121. data/script/plugin +2 -2
  122. data/script/runner +2 -2
  123. data/script/server +2 -2
  124. data/test/fixtures/payment_methods.yml +12 -0
  125. data/test/functional/admin/checkouts_controller_test.rb +0 -2
  126. data/test/functional/admin/line_items_controller_test.rb +78 -39
  127. data/test/functional/admin/products_controller_test.rb +4 -5
  128. data/test/integration/checkout_test.rb +1 -0
  129. data/test/test_helper.rb +114 -86
  130. data/test/unit/creditcard_test.rb +28 -7
  131. data/test/unit/flexi_rate_calculator_test.rb +75 -0
  132. data/test/unit/helpers/products_helper_test.rb +4 -4
  133. data/test/unit/inventory_unit_test.rb +39 -5
  134. data/test/unit/line_item_test.rb +60 -1
  135. data/test/unit/order_state_test.rb +85 -58
  136. data/test/unit/order_test.rb +144 -123
  137. data/test/unit/product_test.rb +21 -0
  138. data/test/unit/return_authorization_test.rb +22 -28
  139. data/test/unit/shipment_test.rb +19 -7
  140. data/test/unit/variant_test.rb +100 -24
  141. data/vendor/extensions/api/api_extension.rb +2 -2
  142. data/vendor/extensions/api/app/controllers/api/base_controller.rb +14 -6
  143. data/vendor/extensions/api/app/controllers/api/countries_controller.rb +4 -0
  144. data/vendor/extensions/api/app/controllers/api/orders_controller.rb +4 -4
  145. data/vendor/extensions/api/app/controllers/api/products_controller.rb +5 -1
  146. data/vendor/extensions/api/app/controllers/api/shipments_controller.rb +7 -7
  147. data/vendor/extensions/api/app/controllers/api/states_controller.rb +5 -0
  148. data/vendor/extensions/api/config/locales/{en-US.yml → en.yml} +2 -2
  149. data/vendor/extensions/api/config/routes.rb +5 -0
  150. data/vendor/extensions/api/test/integration/orders_api_test.rb +4 -4
  151. data/vendor/extensions/overview_dashboard/app/views/admin/overview/index.html.erb +1 -1
  152. data/vendor/extensions/payment_gateway/app/models/gateway.rb +1 -1
  153. data/vendor/extensions/payment_gateway/app/models/gateway/authorize_net_cim.rb +41 -29
  154. data/vendor/extensions/payment_gateway/app/models/gateway/bogus.rb +3 -3
  155. data/vendor/extensions/payment_gateway/app/models/gateway/eway.rb +11 -0
  156. data/vendor/extensions/payment_gateway/app/models/gateway/sage_pay.rb +9 -0
  157. data/vendor/extensions/payment_gateway/config/locales/{en-US.yml → en.yml} +1 -1
  158. data/vendor/extensions/payment_gateway/lib/spree/payment_gateway.rb +46 -56
  159. data/vendor/extensions/payment_gateway/payment_gateway_extension.rb +9 -10
  160. data/vendor/extensions/payment_gateway/test/unit/authorize_net_cim_test.rb +7 -6
  161. data/vendor/extensions/theme_default/app/stylesheets/_checkout.less +10 -3
  162. data/vendor/extensions/theme_default/app/views/admin/adjustments/index.html.erb +1 -1
  163. data/vendor/extensions/theme_default/app/views/admin/checkouts/_form.html.erb +31 -5
  164. data/vendor/extensions/theme_default/app/views/admin/checkouts/show.html.erb +27 -16
  165. data/vendor/extensions/theme_default/app/views/admin/images/_form.html.erb +4 -0
  166. data/vendor/extensions/theme_default/app/views/admin/images/index.html.erb +16 -13
  167. data/vendor/extensions/theme_default/app/views/admin/orders/_add_product.html.erb +1 -1
  168. data/vendor/extensions/theme_default/app/views/admin/orders/_form.html.erb +7 -0
  169. data/vendor/extensions/theme_default/app/views/admin/orders/index.html.erb +5 -5
  170. data/vendor/extensions/theme_default/app/views/admin/payment_methods/_form.html.erb +12 -6
  171. data/vendor/extensions/theme_default/app/views/admin/payment_methods/index.html.erb +22 -11
  172. data/vendor/extensions/theme_default/app/views/admin/product_groups/update.js.erb +2 -2
  173. data/vendor/extensions/theme_default/app/views/admin/products/_form.html.erb +6 -4
  174. data/vendor/extensions/theme_default/app/views/admin/shared/_address_form.html.erb +64 -55
  175. data/vendor/extensions/theme_default/app/views/admin/shared/_configuration_menu.html.erb +1 -1
  176. data/vendor/extensions/theme_default/app/views/admin/shared/_order_tabs.html.erb +11 -3
  177. data/vendor/extensions/theme_default/app/views/admin/shared/_product_tabs.html.erb +1 -1
  178. data/vendor/extensions/theme_default/app/views/admin/shipments/_form.html.erb +32 -29
  179. data/vendor/extensions/theme_default/app/views/admin/shipments/index.html.erb +2 -1
  180. data/vendor/extensions/theme_default/app/views/admin/tax_categories/_form.html.erb +6 -3
  181. data/vendor/extensions/theme_default/app/views/admin/tax_categories/index.html.erb +4 -2
  182. data/vendor/extensions/theme_default/app/views/admin/taxonomies/_taxon.html.erb +2 -2
  183. data/vendor/extensions/theme_default/app/views/admin/taxons/_form.html.erb +11 -1
  184. data/vendor/extensions/theme_default/app/views/admin/taxons/edit.html.erb +2 -2
  185. data/vendor/extensions/theme_default/app/views/admin/users/_form.html.erb +1 -1
  186. data/vendor/extensions/theme_default/app/views/admin/variants/_form.html.erb +4 -2
  187. data/vendor/extensions/theme_default/app/views/checkouts/_confirm.html.erb +1 -1
  188. data/vendor/extensions/theme_default/app/views/checkouts/_delivery.html.erb +1 -1
  189. data/vendor/extensions/theme_default/app/views/checkouts/_summary.html.erb +6 -6
  190. data/vendor/extensions/theme_default/app/views/checkouts/edit.html.erb +3 -3
  191. data/vendor/extensions/theme_default/app/views/layouts/admin.html.erb +7 -5
  192. data/vendor/extensions/theme_default/app/views/layouts/spree_application.html.erb +8 -4
  193. data/vendor/extensions/theme_default/app/views/orders/_line_item.html.erb +1 -1
  194. data/vendor/extensions/theme_default/app/views/products/index.html.erb +0 -1
  195. data/vendor/extensions/theme_default/app/views/shared/_footer.html.erb +4 -2
  196. data/vendor/extensions/theme_default/app/views/shared/_products.html.erb +3 -1
  197. data/vendor/extensions/theme_default/app/views/shared/_user_form.html.erb +1 -1
  198. data/vendor/extensions/theme_default/public/images/admin/bg/spree_50.png +0 -0
  199. data/vendor/extensions/theme_default/public/images/tile-header.png +0 -0
  200. data/vendor/extensions/theme_default/public/images/tile-slider.png +0 -0
  201. data/vendor/extensions/theme_default/public/javascripts/admin/checkouts/edit.js +50 -0
  202. data/vendor/extensions/theme_default/public/javascripts/taxonomy.js +2 -2
  203. data/vendor/extensions/theme_default/public/stylesheets/admin/admin-tables.css +8 -0
  204. data/vendor/extensions/theme_default/public/stylesheets/admin/admin.css +31 -16
  205. data/vendor/extensions/theme_default/public/stylesheets/screen.css +16 -3
  206. data/vendor/plugins/attribute_fu/{tasks → lib/tasks}/attribute_fu_tasks.rake +0 -0
  207. data/vendor/plugins/enumerable_constants/{tasks → lib/tasks}/enumerable_constants_tasks.rake +0 -0
  208. data/vendor/plugins/find_by_param/lib/find_by_param.rb +9 -5
  209. data/vendor/plugins/find_by_param/{tasks → lib/tasks}/find_by_param_tasks.rake +0 -0
  210. data/vendor/plugins/jrails/{tasks → lib/tasks}/jrails.rake +0 -0
  211. data/vendor/plugins/jrails_auto_complete/{tasks → lib/tasks}/jrails_auto_complete_tasks.rake +0 -0
  212. data/vendor/plugins/mail_queue/{tasks → lib/tasks}/mailer_queue_tasks.rake +0 -0
  213. data/vendor/plugins/open_id_authentication/{tasks → lib/tasks}/open_id_authentication_tasks.rake +0 -0
  214. data/vendor/plugins/resource_controller/lib/resource_controller/helpers/internal.rb +2 -2
  215. data/vendor/plugins/ssl_requirement/lib/ssl_requirement.rb +7 -7
  216. data/vendor/plugins/unobtrusive_date_picker/{tasks → lib/tasks}/datepicker_tasks.rake +0 -0
  217. metadata +82 -342
  218. data/app/helpers/admin/adjustments_helper.rb +0 -2
  219. data/app/helpers/admin/checkouts_helper.rb +0 -2
  220. data/app/helpers/admin/line_items_helper.rb +0 -2
  221. data/app/helpers/admin/properties_helper.rb +0 -9
  222. data/app/helpers/admin/prototypes_helper.rb +0 -18
  223. data/app/helpers/admin/return_authorizations_helper.rb +0 -2
  224. data/config/locales/cs-CZ.yml +0 -924
  225. data/config/locales/cs-CZ_rails.yml +0 -202
  226. data/config/locales/da.yml +0 -924
  227. data/config/locales/da_rails.yml +0 -197
  228. data/config/locales/de-CH.yml +0 -924
  229. data/config/locales/de-CH_rails.yml +0 -142
  230. data/config/locales/de.yml +0 -924
  231. data/config/locales/de_rails.yml +0 -140
  232. data/config/locales/en-AU.yml +0 -924
  233. data/config/locales/en-AU_rails.yml +0 -202
  234. data/config/locales/en-GB.yml +0 -924
  235. data/config/locales/en-GB_rails.yml +0 -196
  236. data/config/locales/en-US_rails.yml +0 -200
  237. data/config/locales/es.yml +0 -924
  238. data/config/locales/es_rails.yml +0 -173
  239. data/config/locales/fi.yml +0 -924
  240. data/config/locales/fi_rails.yml +0 -143
  241. data/config/locales/fr-FR.yml +0 -924
  242. data/config/locales/fr-FR_rails.yml +0 -123
  243. data/config/locales/il.yml +0 -924
  244. data/config/locales/il_rails.yml +0 -103
  245. data/config/locales/it.yml +0 -924
  246. data/config/locales/it_rails.yml +0 -146
  247. data/config/locales/jp.yml +0 -924
  248. data/config/locales/jp_rails.yml +0 -135
  249. data/config/locales/mx.yml +0 -924
  250. data/config/locales/mx_rails.yml +0 -181
  251. data/config/locales/nb-NO.yml +0 -924
  252. data/config/locales/nb-NO_rails.yml +0 -105
  253. data/config/locales/nl-BE.yml +0 -924
  254. data/config/locales/nl-BE_rails.yml +0 -155
  255. data/config/locales/nl-NL.yml +0 -924
  256. data/config/locales/nl-NL_rails.yml +0 -172
  257. data/config/locales/pl.yml +0 -924
  258. data/config/locales/pl_rails.yml +0 -118
  259. data/config/locales/pt-BR.yml +0 -924
  260. data/config/locales/pt-BR_rails.yml +0 -138
  261. data/config/locales/pt-PT.yml +0 -924
  262. data/config/locales/pt-PT_rails.yml +0 -133
  263. data/config/locales/ru-RU.yml +0 -924
  264. data/config/locales/ru-RU_rails.yml +0 -206
  265. data/config/locales/th.yml +0 -924
  266. data/config/locales/th_rails.yml +0 -195
  267. data/config/locales/vn.yml +0 -924
  268. data/config/locales/vn_rails.yml +0 -202
  269. data/lib/tasks/translation.rake +0 -102
  270. data/vendor/extensions/localization/README.rdoc +0 -5
  271. data/vendor/extensions/localization/Rakefile +0 -120
  272. data/vendor/extensions/localization/app/controllers/admin/localization_controller.rb +0 -2
  273. data/vendor/extensions/localization/app/helpers/locale_helper.rb +0 -2
  274. data/vendor/extensions/localization/app/helpers/localization_helper.rb +0 -2
  275. data/vendor/extensions/localization/app/views/shared/_language_bar.html.erb +0 -8
  276. data/vendor/extensions/localization/config/routes.rb +0 -4
  277. data/vendor/extensions/localization/lib/localization/user_preferences.rb +0 -9
  278. data/vendor/extensions/localization/lib/tasks/localization_extension_tasks.rake +0 -17
  279. data/vendor/extensions/localization/localization_extension.rb +0 -21
  280. data/vendor/extensions/localization/public/images/flags/ad.png +0 -0
  281. data/vendor/extensions/localization/public/images/flags/ae.png +0 -0
  282. data/vendor/extensions/localization/public/images/flags/af.png +0 -0
  283. data/vendor/extensions/localization/public/images/flags/ag.png +0 -0
  284. data/vendor/extensions/localization/public/images/flags/ai.png +0 -0
  285. data/vendor/extensions/localization/public/images/flags/al.png +0 -0
  286. data/vendor/extensions/localization/public/images/flags/am.png +0 -0
  287. data/vendor/extensions/localization/public/images/flags/an.png +0 -0
  288. data/vendor/extensions/localization/public/images/flags/ao.png +0 -0
  289. data/vendor/extensions/localization/public/images/flags/ar.png +0 -0
  290. data/vendor/extensions/localization/public/images/flags/as.png +0 -0
  291. data/vendor/extensions/localization/public/images/flags/at.png +0 -0
  292. data/vendor/extensions/localization/public/images/flags/au.png +0 -0
  293. data/vendor/extensions/localization/public/images/flags/aw.png +0 -0
  294. data/vendor/extensions/localization/public/images/flags/ax.png +0 -0
  295. data/vendor/extensions/localization/public/images/flags/az.png +0 -0
  296. data/vendor/extensions/localization/public/images/flags/ba.png +0 -0
  297. data/vendor/extensions/localization/public/images/flags/bb.png +0 -0
  298. data/vendor/extensions/localization/public/images/flags/bd.png +0 -0
  299. data/vendor/extensions/localization/public/images/flags/be.png +0 -0
  300. data/vendor/extensions/localization/public/images/flags/bf.png +0 -0
  301. data/vendor/extensions/localization/public/images/flags/bg.png +0 -0
  302. data/vendor/extensions/localization/public/images/flags/bh.png +0 -0
  303. data/vendor/extensions/localization/public/images/flags/bi.png +0 -0
  304. data/vendor/extensions/localization/public/images/flags/bj.png +0 -0
  305. data/vendor/extensions/localization/public/images/flags/bm.png +0 -0
  306. data/vendor/extensions/localization/public/images/flags/bn.png +0 -0
  307. data/vendor/extensions/localization/public/images/flags/bo.png +0 -0
  308. data/vendor/extensions/localization/public/images/flags/br.png +0 -0
  309. data/vendor/extensions/localization/public/images/flags/bs.png +0 -0
  310. data/vendor/extensions/localization/public/images/flags/bt.png +0 -0
  311. data/vendor/extensions/localization/public/images/flags/bv.png +0 -0
  312. data/vendor/extensions/localization/public/images/flags/bw.png +0 -0
  313. data/vendor/extensions/localization/public/images/flags/by.png +0 -0
  314. data/vendor/extensions/localization/public/images/flags/bz.png +0 -0
  315. data/vendor/extensions/localization/public/images/flags/ca.png +0 -0
  316. data/vendor/extensions/localization/public/images/flags/catalonia.png +0 -0
  317. data/vendor/extensions/localization/public/images/flags/cc.png +0 -0
  318. data/vendor/extensions/localization/public/images/flags/cd.png +0 -0
  319. data/vendor/extensions/localization/public/images/flags/cf.png +0 -0
  320. data/vendor/extensions/localization/public/images/flags/cg.png +0 -0
  321. data/vendor/extensions/localization/public/images/flags/ch.png +0 -0
  322. data/vendor/extensions/localization/public/images/flags/ci.png +0 -0
  323. data/vendor/extensions/localization/public/images/flags/ck.png +0 -0
  324. data/vendor/extensions/localization/public/images/flags/cl.png +0 -0
  325. data/vendor/extensions/localization/public/images/flags/cm.png +0 -0
  326. data/vendor/extensions/localization/public/images/flags/cn.png +0 -0
  327. data/vendor/extensions/localization/public/images/flags/co.png +0 -0
  328. data/vendor/extensions/localization/public/images/flags/cr.png +0 -0
  329. data/vendor/extensions/localization/public/images/flags/cs.png +0 -0
  330. data/vendor/extensions/localization/public/images/flags/cu.png +0 -0
  331. data/vendor/extensions/localization/public/images/flags/cv.png +0 -0
  332. data/vendor/extensions/localization/public/images/flags/cx.png +0 -0
  333. data/vendor/extensions/localization/public/images/flags/cy.png +0 -0
  334. data/vendor/extensions/localization/public/images/flags/cz.png +0 -0
  335. data/vendor/extensions/localization/public/images/flags/da.png +0 -0
  336. data/vendor/extensions/localization/public/images/flags/de.png +0 -0
  337. data/vendor/extensions/localization/public/images/flags/de_CH.png +0 -0
  338. data/vendor/extensions/localization/public/images/flags/dj.png +0 -0
  339. data/vendor/extensions/localization/public/images/flags/dm.png +0 -0
  340. data/vendor/extensions/localization/public/images/flags/do.png +0 -0
  341. data/vendor/extensions/localization/public/images/flags/dz.png +0 -0
  342. data/vendor/extensions/localization/public/images/flags/ec.png +0 -0
  343. data/vendor/extensions/localization/public/images/flags/ee.png +0 -0
  344. data/vendor/extensions/localization/public/images/flags/eg.png +0 -0
  345. data/vendor/extensions/localization/public/images/flags/eh.png +0 -0
  346. data/vendor/extensions/localization/public/images/flags/england.png +0 -0
  347. data/vendor/extensions/localization/public/images/flags/er.png +0 -0
  348. data/vendor/extensions/localization/public/images/flags/es.png +0 -0
  349. data/vendor/extensions/localization/public/images/flags/et.png +0 -0
  350. data/vendor/extensions/localization/public/images/flags/europeanunion.png +0 -0
  351. data/vendor/extensions/localization/public/images/flags/fam.png +0 -0
  352. data/vendor/extensions/localization/public/images/flags/fi.png +0 -0
  353. data/vendor/extensions/localization/public/images/flags/fj.png +0 -0
  354. data/vendor/extensions/localization/public/images/flags/fk.png +0 -0
  355. data/vendor/extensions/localization/public/images/flags/fm.png +0 -0
  356. data/vendor/extensions/localization/public/images/flags/fo.png +0 -0
  357. data/vendor/extensions/localization/public/images/flags/fr.png +0 -0
  358. data/vendor/extensions/localization/public/images/flags/ga.png +0 -0
  359. data/vendor/extensions/localization/public/images/flags/gb.png +0 -0
  360. data/vendor/extensions/localization/public/images/flags/gd.png +0 -0
  361. data/vendor/extensions/localization/public/images/flags/ge.png +0 -0
  362. data/vendor/extensions/localization/public/images/flags/gf.png +0 -0
  363. data/vendor/extensions/localization/public/images/flags/gh.png +0 -0
  364. data/vendor/extensions/localization/public/images/flags/gi.png +0 -0
  365. data/vendor/extensions/localization/public/images/flags/gl.png +0 -0
  366. data/vendor/extensions/localization/public/images/flags/gm.png +0 -0
  367. data/vendor/extensions/localization/public/images/flags/gn.png +0 -0
  368. data/vendor/extensions/localization/public/images/flags/gp.png +0 -0
  369. data/vendor/extensions/localization/public/images/flags/gq.png +0 -0
  370. data/vendor/extensions/localization/public/images/flags/gr.png +0 -0
  371. data/vendor/extensions/localization/public/images/flags/gs.png +0 -0
  372. data/vendor/extensions/localization/public/images/flags/gt.png +0 -0
  373. data/vendor/extensions/localization/public/images/flags/gu.png +0 -0
  374. data/vendor/extensions/localization/public/images/flags/gw.png +0 -0
  375. data/vendor/extensions/localization/public/images/flags/gy.png +0 -0
  376. data/vendor/extensions/localization/public/images/flags/hk.png +0 -0
  377. data/vendor/extensions/localization/public/images/flags/hm.png +0 -0
  378. data/vendor/extensions/localization/public/images/flags/hn.png +0 -0
  379. data/vendor/extensions/localization/public/images/flags/hr.png +0 -0
  380. data/vendor/extensions/localization/public/images/flags/ht.png +0 -0
  381. data/vendor/extensions/localization/public/images/flags/hu.png +0 -0
  382. data/vendor/extensions/localization/public/images/flags/id.png +0 -0
  383. data/vendor/extensions/localization/public/images/flags/ie.png +0 -0
  384. data/vendor/extensions/localization/public/images/flags/il.png +0 -0
  385. data/vendor/extensions/localization/public/images/flags/in.png +0 -0
  386. data/vendor/extensions/localization/public/images/flags/io.png +0 -0
  387. data/vendor/extensions/localization/public/images/flags/iq.png +0 -0
  388. data/vendor/extensions/localization/public/images/flags/ir.png +0 -0
  389. data/vendor/extensions/localization/public/images/flags/is.png +0 -0
  390. data/vendor/extensions/localization/public/images/flags/it.png +0 -0
  391. data/vendor/extensions/localization/public/images/flags/jm.png +0 -0
  392. data/vendor/extensions/localization/public/images/flags/jo.png +0 -0
  393. data/vendor/extensions/localization/public/images/flags/jp.png +0 -0
  394. data/vendor/extensions/localization/public/images/flags/ke.png +0 -0
  395. data/vendor/extensions/localization/public/images/flags/kg.png +0 -0
  396. data/vendor/extensions/localization/public/images/flags/kh.png +0 -0
  397. data/vendor/extensions/localization/public/images/flags/ki.png +0 -0
  398. data/vendor/extensions/localization/public/images/flags/km.png +0 -0
  399. data/vendor/extensions/localization/public/images/flags/kn.png +0 -0
  400. data/vendor/extensions/localization/public/images/flags/kp.png +0 -0
  401. data/vendor/extensions/localization/public/images/flags/kr.png +0 -0
  402. data/vendor/extensions/localization/public/images/flags/kw.png +0 -0
  403. data/vendor/extensions/localization/public/images/flags/ky.png +0 -0
  404. data/vendor/extensions/localization/public/images/flags/kz.png +0 -0
  405. data/vendor/extensions/localization/public/images/flags/la.png +0 -0
  406. data/vendor/extensions/localization/public/images/flags/lb.png +0 -0
  407. data/vendor/extensions/localization/public/images/flags/lc.png +0 -0
  408. data/vendor/extensions/localization/public/images/flags/li.png +0 -0
  409. data/vendor/extensions/localization/public/images/flags/lk.png +0 -0
  410. data/vendor/extensions/localization/public/images/flags/lr.png +0 -0
  411. data/vendor/extensions/localization/public/images/flags/ls.png +0 -0
  412. data/vendor/extensions/localization/public/images/flags/lt.png +0 -0
  413. data/vendor/extensions/localization/public/images/flags/lu.png +0 -0
  414. data/vendor/extensions/localization/public/images/flags/lv.png +0 -0
  415. data/vendor/extensions/localization/public/images/flags/ly.png +0 -0
  416. data/vendor/extensions/localization/public/images/flags/ma.png +0 -0
  417. data/vendor/extensions/localization/public/images/flags/mc.png +0 -0
  418. data/vendor/extensions/localization/public/images/flags/md.png +0 -0
  419. data/vendor/extensions/localization/public/images/flags/me.png +0 -0
  420. data/vendor/extensions/localization/public/images/flags/mg.png +0 -0
  421. data/vendor/extensions/localization/public/images/flags/mh.png +0 -0
  422. data/vendor/extensions/localization/public/images/flags/mk.png +0 -0
  423. data/vendor/extensions/localization/public/images/flags/ml.png +0 -0
  424. data/vendor/extensions/localization/public/images/flags/mm.png +0 -0
  425. data/vendor/extensions/localization/public/images/flags/mn.png +0 -0
  426. data/vendor/extensions/localization/public/images/flags/mo.png +0 -0
  427. data/vendor/extensions/localization/public/images/flags/mp.png +0 -0
  428. data/vendor/extensions/localization/public/images/flags/mq.png +0 -0
  429. data/vendor/extensions/localization/public/images/flags/mr.png +0 -0
  430. data/vendor/extensions/localization/public/images/flags/ms.png +0 -0
  431. data/vendor/extensions/localization/public/images/flags/mt.png +0 -0
  432. data/vendor/extensions/localization/public/images/flags/mu.png +0 -0
  433. data/vendor/extensions/localization/public/images/flags/mv.png +0 -0
  434. data/vendor/extensions/localization/public/images/flags/mw.png +0 -0
  435. data/vendor/extensions/localization/public/images/flags/mx.png +0 -0
  436. data/vendor/extensions/localization/public/images/flags/my.png +0 -0
  437. data/vendor/extensions/localization/public/images/flags/mz.png +0 -0
  438. data/vendor/extensions/localization/public/images/flags/na.png +0 -0
  439. data/vendor/extensions/localization/public/images/flags/nc.png +0 -0
  440. data/vendor/extensions/localization/public/images/flags/ne.png +0 -0
  441. data/vendor/extensions/localization/public/images/flags/nf.png +0 -0
  442. data/vendor/extensions/localization/public/images/flags/ng.png +0 -0
  443. data/vendor/extensions/localization/public/images/flags/ni.png +0 -0
  444. data/vendor/extensions/localization/public/images/flags/nl.png +0 -0
  445. data/vendor/extensions/localization/public/images/flags/no.png +0 -0
  446. data/vendor/extensions/localization/public/images/flags/np.png +0 -0
  447. data/vendor/extensions/localization/public/images/flags/nr.png +0 -0
  448. data/vendor/extensions/localization/public/images/flags/nu.png +0 -0
  449. data/vendor/extensions/localization/public/images/flags/nz.png +0 -0
  450. data/vendor/extensions/localization/public/images/flags/om.png +0 -0
  451. data/vendor/extensions/localization/public/images/flags/pa.png +0 -0
  452. data/vendor/extensions/localization/public/images/flags/pe.png +0 -0
  453. data/vendor/extensions/localization/public/images/flags/pf.png +0 -0
  454. data/vendor/extensions/localization/public/images/flags/pg.png +0 -0
  455. data/vendor/extensions/localization/public/images/flags/ph.png +0 -0
  456. data/vendor/extensions/localization/public/images/flags/pk.png +0 -0
  457. data/vendor/extensions/localization/public/images/flags/pl.png +0 -0
  458. data/vendor/extensions/localization/public/images/flags/pm.png +0 -0
  459. data/vendor/extensions/localization/public/images/flags/pn.png +0 -0
  460. data/vendor/extensions/localization/public/images/flags/pr.png +0 -0
  461. data/vendor/extensions/localization/public/images/flags/ps.png +0 -0
  462. data/vendor/extensions/localization/public/images/flags/pt.png +0 -0
  463. data/vendor/extensions/localization/public/images/flags/pw.png +0 -0
  464. data/vendor/extensions/localization/public/images/flags/py.png +0 -0
  465. data/vendor/extensions/localization/public/images/flags/qa.png +0 -0
  466. data/vendor/extensions/localization/public/images/flags/re.png +0 -0
  467. data/vendor/extensions/localization/public/images/flags/ro.png +0 -0
  468. data/vendor/extensions/localization/public/images/flags/rs.png +0 -0
  469. data/vendor/extensions/localization/public/images/flags/ru.png +0 -0
  470. data/vendor/extensions/localization/public/images/flags/rw.png +0 -0
  471. data/vendor/extensions/localization/public/images/flags/sa.png +0 -0
  472. data/vendor/extensions/localization/public/images/flags/sb.png +0 -0
  473. data/vendor/extensions/localization/public/images/flags/sc.png +0 -0
  474. data/vendor/extensions/localization/public/images/flags/scotland.png +0 -0
  475. data/vendor/extensions/localization/public/images/flags/sd.png +0 -0
  476. data/vendor/extensions/localization/public/images/flags/se.png +0 -0
  477. data/vendor/extensions/localization/public/images/flags/sg.png +0 -0
  478. data/vendor/extensions/localization/public/images/flags/sh.png +0 -0
  479. data/vendor/extensions/localization/public/images/flags/si.png +0 -0
  480. data/vendor/extensions/localization/public/images/flags/sj.png +0 -0
  481. data/vendor/extensions/localization/public/images/flags/sk.png +0 -0
  482. data/vendor/extensions/localization/public/images/flags/sl.png +0 -0
  483. data/vendor/extensions/localization/public/images/flags/sm.png +0 -0
  484. data/vendor/extensions/localization/public/images/flags/sn.png +0 -0
  485. data/vendor/extensions/localization/public/images/flags/so.png +0 -0
  486. data/vendor/extensions/localization/public/images/flags/sr.png +0 -0
  487. data/vendor/extensions/localization/public/images/flags/st.png +0 -0
  488. data/vendor/extensions/localization/public/images/flags/sv.png +0 -0
  489. data/vendor/extensions/localization/public/images/flags/sy.png +0 -0
  490. data/vendor/extensions/localization/public/images/flags/sz.png +0 -0
  491. data/vendor/extensions/localization/public/images/flags/tc.png +0 -0
  492. data/vendor/extensions/localization/public/images/flags/td.png +0 -0
  493. data/vendor/extensions/localization/public/images/flags/tf.png +0 -0
  494. data/vendor/extensions/localization/public/images/flags/tg.png +0 -0
  495. data/vendor/extensions/localization/public/images/flags/th.png +0 -0
  496. data/vendor/extensions/localization/public/images/flags/tj.png +0 -0
  497. data/vendor/extensions/localization/public/images/flags/tk.png +0 -0
  498. data/vendor/extensions/localization/public/images/flags/tl.png +0 -0
  499. data/vendor/extensions/localization/public/images/flags/tm.png +0 -0
  500. data/vendor/extensions/localization/public/images/flags/tn.png +0 -0
  501. data/vendor/extensions/localization/public/images/flags/to.png +0 -0
  502. data/vendor/extensions/localization/public/images/flags/tr.png +0 -0
  503. data/vendor/extensions/localization/public/images/flags/tt.png +0 -0
  504. data/vendor/extensions/localization/public/images/flags/tv.png +0 -0
  505. data/vendor/extensions/localization/public/images/flags/tw.png +0 -0
  506. data/vendor/extensions/localization/public/images/flags/tz.png +0 -0
  507. data/vendor/extensions/localization/public/images/flags/ua.png +0 -0
  508. data/vendor/extensions/localization/public/images/flags/ug.png +0 -0
  509. data/vendor/extensions/localization/public/images/flags/um.png +0 -0
  510. data/vendor/extensions/localization/public/images/flags/us.png +0 -0
  511. data/vendor/extensions/localization/public/images/flags/uy.png +0 -0
  512. data/vendor/extensions/localization/public/images/flags/uz.png +0 -0
  513. data/vendor/extensions/localization/public/images/flags/va.png +0 -0
  514. data/vendor/extensions/localization/public/images/flags/vc.png +0 -0
  515. data/vendor/extensions/localization/public/images/flags/ve.png +0 -0
  516. data/vendor/extensions/localization/public/images/flags/vg.png +0 -0
  517. data/vendor/extensions/localization/public/images/flags/vi.png +0 -0
  518. data/vendor/extensions/localization/public/images/flags/vn.png +0 -0
  519. data/vendor/extensions/localization/public/images/flags/vu.png +0 -0
  520. data/vendor/extensions/localization/public/images/flags/wales.png +0 -0
  521. data/vendor/extensions/localization/public/images/flags/wf.png +0 -0
  522. data/vendor/extensions/localization/public/images/flags/ws.png +0 -0
  523. data/vendor/extensions/localization/public/images/flags/ye.png +0 -0
  524. data/vendor/extensions/localization/public/images/flags/yt.png +0 -0
  525. data/vendor/extensions/localization/public/images/flags/za.png +0 -0
  526. data/vendor/extensions/localization/public/images/flags/zm.png +0 -0
  527. data/vendor/extensions/localization/public/images/flags/zw.png +0 -0
  528. data/vendor/extensions/localization/spec/controllers/admin/localization_controller_spec.rb +0 -10
  529. data/vendor/extensions/localization/spec/controllers/locale_controller_spec.rb +0 -35
  530. data/vendor/extensions/localization/spec/helpers/locale_helper_spec.rb +0 -5
  531. data/vendor/extensions/localization/spec/helpers/localization_helper_spec.rb +0 -5
  532. data/vendor/extensions/localization/spec/spec.opts +0 -6
  533. data/vendor/extensions/localization/spec/spec_helper.rb +0 -37
  534. data/vendor/extensions/payment_gateway/app/models/gateway/protx.rb +0 -9
  535. data/vendor/extensions/theme_default/app/views/admin/taxonomies/_manage_products.rhtml +0 -31
  536. data/vendor/extensions/theme_default/app/views/admin/taxonomies/_success.rhtml +0 -1
@@ -6,8 +6,6 @@ class PaymentGatewayExtension < Spree::Extension
6
6
  def activate
7
7
  require 'active_merchant'
8
8
 
9
- # Set the global "gateway mode" for active merchant (depending on what environment we're in)
10
- ActiveMerchant::Billing::Base.gateway_mode = :test unless ENV['RAILS_ENV'] == "production"
11
9
  # Mixin the payment_gateway method into the base controller so it can be accessed by the checkout process, etc.
12
10
  Creditcard.class_eval do
13
11
  # add gateway methods to the creditcard so we can authorize, capture, etc.
@@ -16,16 +14,17 @@ class PaymentGatewayExtension < Spree::Extension
16
14
 
17
15
  silence_warnings { require 'active_merchant/billing/authorize_net_cim' }
18
16
 
19
- #register all payment methods
20
- [
21
- Gateway::Bogus,
17
+ #register all payment methods
18
+ [
19
+ Gateway::Bogus,
22
20
  Gateway::AuthorizeNet,
23
21
  Gateway::AuthorizeNetCim,
22
+ Gateway::Eway,
24
23
  Gateway::Linkpoint,
25
- Gateway::PayPal,
26
- Gateway::Protx,
27
- Gateway::Beanstream,
28
- PaymentMethod::Check
24
+ Gateway::PayPal,
25
+ Gateway::SagePay,
26
+ Gateway::Beanstream,
27
+ PaymentMethod::Check
29
28
  ].each{|gw|
30
29
  begin
31
30
  gw.register
@@ -35,4 +34,4 @@ class PaymentGatewayExtension < Spree::Extension
35
34
  }
36
35
 
37
36
  end
38
- end
37
+ end
@@ -23,7 +23,8 @@ class AuthorizeNetCimTest < Test::Unit::TestCase
23
23
 
24
24
  @creditcard = Factory(:creditcard, :verification_value => '123', :number => '4242424242424242', :month => 9, :year => Time.now.year + 1, :first_name => 'John', :last_name => 'Doe')
25
25
  @checkout = Factory(:checkout, :bill_address => @address, :ship_address => @address)
26
- @checkout.payments << Factory(:payment, :source => @creditcard)
26
+ @payment = Factory(:payment, :source => @creditcard, :payable => @checkout)
27
+ @checkout.payments << @payment
27
28
  @gateway = Gateway::AuthorizeNetCim.create!(:name => 'Authorize.net CIM Gateway')
28
29
  @creditcard.reload
29
30
 
@@ -44,13 +45,13 @@ class AuthorizeNetCimTest < Test::Unit::TestCase
44
45
  should "build correct options hash" do
45
46
  expected_options = {:profile => {
46
47
  :payment_profiles => {
47
- # :bill_to => @address_options,
48
+ :bill_to => @address_options,
48
49
  :payment => {:credit_card => @creditcard}
49
50
  },
50
51
  # :ship_to_list => @address_options
51
52
  }}
52
53
 
53
- options = @gateway.send(:options_for_create_customer_profile, @creditcard, @creditcard.gateway_options(@checkout))
54
+ options = @gateway.send(:options_for_create_customer_profile, @payment)
54
55
  merchant_customer_id = options[:profile].delete(:merchant_customer_id)
55
56
 
56
57
  assert_equal expected_options, options
@@ -59,16 +60,16 @@ class AuthorizeNetCimTest < Test::Unit::TestCase
59
60
 
60
61
  context "create_customer_profile" do
61
62
  should "create a customer profile sucessfully" do
62
- result = @gateway.send(:create_customer_profile, @creditcard, @creditcard.gateway_options(@checkout))
63
+ result = @gateway.send(:create_customer_profile, @payment)
63
64
  assert result.is_a?(Hash)
64
65
  assert_equal "123", result[:customer_profile_id]
65
66
  end
66
67
  should "raise a gateway error if there is a problem creating profile" do
67
68
  ActiveMerchant::Billing::AuthorizeNetCimGateway.force_failure = true
68
- assert_raise(Spree::GatewayError) { @gateway.send(:create_customer_profile, @creditcard, @creditcard.gateway_options(@checkout)) }
69
+ assert_raise(Spree::GatewayError) { @gateway.send(:create_customer_profile, @payment) }
69
70
  end
70
71
  end
71
-
72
+
72
73
  context "authorize" do
73
74
  setup do
74
75
  @response = @gateway.authorize(500, @creditcard, @creditcard.gateway_options(@checkout))
@@ -27,11 +27,11 @@ div#checkout {
27
27
  padding-right: 10px;
28
28
  text-align: right;
29
29
  }
30
- #checkout_form_address #billing input, #checkout_form_address #shipping input,
30
+ #checkout_form_address #billing input, #checkout_form_address #shipping input,
31
31
  #checkout_form_address #billing select, #checkout_form_address #shipping select {
32
32
  width:304px;
33
33
  }
34
- #checkout_form_address #billing p.checkbox,
34
+ #checkout_form_address #billing p.checkbox,
35
35
  #checkout_form_address #shipping p.checkbox,
36
36
  #checkout_form_address .form-buttons {
37
37
  padding-left:200px;
@@ -56,7 +56,7 @@ div#checkout {
56
56
  list-style: none;
57
57
  display:block;
58
58
  padding: 0; margin: 0;
59
- width: 720px;
59
+ width: 720px;
60
60
  li {
61
61
  display:block;
62
62
  .column(5);
@@ -66,4 +66,11 @@ div#checkout {
66
66
  }
67
67
  }
68
68
 
69
+ #checkout-summary {
70
+ background-color: #C3C9DF;
71
+ float: right;
72
+ margin-top: 10px;
73
+ padding: 20px;
74
+ width: 180px;
75
+ }
69
76
  }
@@ -33,4 +33,4 @@
33
33
  <% end %>
34
34
  </table>
35
35
 
36
- <%= button_link_to t('continue'), admin_orders_url %>
36
+ <%= button_link_to t('continue'), @order.in_progress? ? new_admin_order_payment_url(@order) : admin_orders_url %>
@@ -1,14 +1,40 @@
1
- <p>
2
- <label>Email: </label><%= f.text_field :email %>
3
- </p>
1
+
2
+ <h3><%= t("customer_details") %></h3>
3
+ <table class="index">
4
+ <thead>
5
+ <th colspan="8"><%= t('account') %></th>
6
+ </thead>
7
+ <tbody>
8
+ <tr>
9
+ <td class="lbl-col"><%= f.label :email, t(:email)+':' %></td>
10
+ <td class="val-col" colspan="3"><%= f.text_field :email, :class => "fullwidth" %></td>
11
+ <td class="lbl-col"><label><%= t('guest_checkout') %>:</label></td>
12
+ <td class="val-col" colspan="3">
13
+ <% if @order.state == "in_progress" %>
14
+ <label class="sub">
15
+ <%= radio_button_tag :guest_checkout, true, @checkout.order.user.nil? %>
16
+ <%= t("yes") %>
17
+ </label> &nbsp;
18
+ <label class="sub">
19
+ <%= radio_button_tag :guest_checkout, false, !@checkout.order.user.nil?, :disabled => @checkout.order.state == "in_progress" %>
20
+ <%= t("no") %>
21
+ </label>
22
+ <%= hidden_field_tag :user_id, @checkout.order.user_id %>
23
+ <% else %>
24
+ <%= @checkout.order.user.nil? ? "Yes" : "No" %>
25
+ <% end %>
26
+ </td>
27
+ </tr>
28
+ </tbody>
29
+ </table>
4
30
 
5
31
  <h3><%= Address.human_name(:count => 2) %></h3>
6
32
  <% f.fields_for 'bill_address' do |ba_form| %>
7
- <%= render :partial => "admin/shared/address_form", :locals => {:f => ba_form, :name => t('billing_address')} %>
33
+ <%= render :partial => "admin/shared/address_form", :locals => {:f => ba_form, :name => t('billing_address'), :use_billing => false} %>
8
34
  <% end %>
9
35
 
10
36
  <% f.fields_for 'ship_address' do |sa_form| %>
11
- <%= render :partial => "admin/shared/address_form", :locals => {:f => sa_form, :name => t('shipping_address')} %>
37
+ <%= render :partial => "admin/shared/address_form", :locals => {:f => sa_form, :name => t('shipping_address'), :use_billing => true} %>
12
38
  <% end %>
13
39
 
14
40
  <p class="form-buttons">
@@ -4,27 +4,38 @@
4
4
 
5
5
  <%= render :partial => 'admin/shared/order_tabs', :locals => {:current => "Customer Details"} %>
6
6
 
7
- <h2><%= t("customer_details")%></h2>
8
-
9
- <p>
10
- <label>Email: </label><%= @checkout.email %>
11
- </p>
7
+ <h3><%= t("customer_details") %></h3>
8
+ <table class="index">
9
+ <thead>
10
+ <th colspan="8"><%= t('account') %></th>
11
+ </thead>
12
+ <tbody>
13
+ <tr>
14
+ <td class="lbl-col"><label><%= t(:email) %>:</label></td>
15
+ <td class="val-col" colspan="3"><%= @checkout.email %></td>
16
+ <td class="lbl-col"><label><%= t('guest_checkout') %>:</label></td>
17
+ <td class="val-col" colspan="3">
18
+ <%= @checkout.order.user.nil? ? "Yes" : "No" %>
19
+ </td>
20
+ </tr>
21
+ </tbody>
22
+ </table>
12
23
 
13
24
  <h3><%= Address.human_name(:count => 2) %></h3>
14
25
  <table class="index">
15
26
  <tr>
16
27
  <th colspan="8"><%= t("billing_address") %></th>
17
- </tr>
28
+ </tr>
18
29
  <% if @checkout.bill_address %>
19
30
  <tr>
20
- <td>
31
+ <td class="lbl-col">
21
32
  <label><%= Address.human_attribute_name(:first_name) %>:</label>
22
33
  </td>
23
- <td colspan="3"><%= @checkout.bill_address.firstname %></td>
24
- <td>
34
+ <td class="val-col" colspan="3"><%= @checkout.bill_address.firstname %></td>
35
+ <td class="lbl-col">
25
36
  <label><%= Address.human_attribute_name(:last_name) %>:</label>
26
37
  </td>
27
- <td colspan="3"><%= @checkout.bill_address.lastname %></td>
38
+ <td class="val-col" colspan="3"><%= @checkout.bill_address.lastname %></td>
28
39
  </tr>
29
40
  <tr>
30
41
  <td>
@@ -61,24 +72,24 @@
61
72
  <label><%= Address.human_attribute_name(:phone) %>:</label>
62
73
  </td>
63
74
  <td colspan="7"><%= @checkout.bill_address.phone %></td>
64
- </tr>
75
+ </tr>
65
76
  <% end %>
66
77
  </table>
67
78
 
68
79
  <table class="index">
69
80
  <tr>
70
81
  <th colspan="8"><%= t("shipping_address") %></th>
71
- </tr>
82
+ </tr>
72
83
  <% if @checkout.ship_address %>
73
84
  <tr>
74
- <td>
85
+ <td class="lbl-col">
75
86
  <label><%= Address.human_attribute_name(:first_name) %>:</label>
76
87
  </td>
77
- <td colspan="3"><%= @checkout.ship_address.firstname %></td>
78
- <td>
88
+ <td class="val-col" colspan="3"><%= @checkout.ship_address.firstname %></td>
89
+ <td class="lbl-col">
79
90
  <label><%= Address.human_attribute_name(:last_name) %>:</label>
80
91
  </td>
81
- <td colspan="3"><%= @checkout.ship_address.lastname %></td>
92
+ <td class="val-col" colspan="3"><%= @checkout.ship_address.lastname %></td>
82
93
  </tr>
83
94
  <tr>
84
95
  <td>
@@ -10,3 +10,7 @@
10
10
  <% else %>
11
11
  <%= hidden_field_tag :product_id, @product.id %>
12
12
  <% end %>
13
+ <tr>
14
+ <td><%= t("alt_text") %>:</td>
15
+ <td><%= f.text_area :alt %></td>
16
+ </tr>
@@ -3,20 +3,22 @@
3
3
  <%= render :partial => 'admin/shared/product_tabs', :locals => {:current => "Images"} %>
4
4
 
5
5
  <table class="index">
6
- <tr>
7
- <th><%= t("thumbnail") %></th>
6
+ <tr>
7
+ <th><%= t("thumbnail") %></th>
8
8
  <% if @product.has_variants? %>
9
- <th><%= Variant.human_name %></th>
10
- <% end %>
11
- <th><%= t("action") %></th>
12
- </tr>
13
-
9
+ <th><%= Variant.human_name %></th>
10
+ <% end %>
11
+ <th><%= t("alt_text") %></th>
12
+ <th><%= t("action") %></th>
13
+ </tr>
14
+
14
15
  <% @product.images.each do |image| %>
15
16
  <tr id="<%= dom_id(image) %>">
16
17
  <td><%= link_to(image_tag(image.attachment.url(:mini)), image.attachment.url(:product)) %></td>
17
18
  <% if @product.has_variants? %>
18
19
  <td><%= t('all') %></td>
19
20
  <% end %>
21
+ <td><%= image.alt %></td>
20
22
  <td class="actions">
21
23
  <%= link_to_with_icon('edit', t("edit"), edit_admin_product_image_url(@product, image)) %>
22
24
  &nbsp;
@@ -24,14 +26,15 @@
24
26
  </td>
25
27
  </tr>
26
28
  <% end %>
27
-
28
- <% @product.variants.each do |variant| %>
29
+
30
+ <% @product.variants.each do |variant| %>
29
31
  <% variant.images.each do |image| %>
30
32
  <tr id="<%= dom_id(image) %>">
31
33
  <td><%= link_to(image_tag(image.attachment.url(:mini)), image.attachment.url(:product)) %></td>
32
34
  <% if @product.has_variants? %>
33
35
  <td><%= variant.options_text %></td>
34
36
  <% end %>
37
+ <td><%= image.alt %></td>
35
38
  <td class="actions">
36
39
  <%= link_to_with_icon('edit', t("edit"), edit_admin_product_image_url(@product, image)) %>
37
40
  &nbsp;
@@ -50,14 +53,14 @@
50
53
 
51
54
  <% content_for :head do %>
52
55
  <script type="text/javascript">
53
- jQuery(document).ready(function(){
54
-
55
- jQuery('#new_image_link').click(function (event) {
56
+ jQuery(document).ready(function(){
57
+
58
+ jQuery('#new_image_link').click(function (event) {
56
59
  event.preventDefault();
57
60
  jQuery(this).hide();
58
61
  jQuery.ajax({type: 'GET', url: this.href, data: ({authenticity_token: AUTH_TOKEN}), success: function(r){ jQuery('#images').html(r);} });
59
62
  });
60
-
63
+
61
64
  });
62
65
  </script>
63
66
  <% end %>
@@ -2,7 +2,7 @@
2
2
  <fieldset>
3
3
  <legend><%= t('add_product') %></legend>
4
4
  <div style="float:left;width:65%;margin-right:5%;">
5
- <%= label_tag :add_product_name, t("name") %>
5
+ <%= label_tag :add_product_name, t("name_or_sku") %>
6
6
  <%= text_field_tag :add_product_name, {}, :class => 'fullwidth title' %>
7
7
  <%= hidden_field_tag :add_variant_id %>
8
8
  </div>
@@ -1,3 +1,5 @@
1
+ <%=error_messages_for :line_item %>
2
+
1
3
  <% form_for(@order, :url => admin_order_url(@order), :html => { :method => :put}) do |f| %>
2
4
  <%= f.hidden_field :number %>
3
5
  <table class="index">
@@ -66,5 +68,10 @@
66
68
 
67
69
  <% end %>
68
70
 
71
+ <script type="text/javascript">
72
+ $('#order_tab_summary h5#order_total').html('<%= "#{t('total')}: #{number_to_currency(@order.total)}" %>');
73
+ $('#order_tab_summary h5#order_status').html('<%= "#{t('status')}: #{t(@order.state)}" %>');
74
+ </script>
75
+
69
76
  <%= javascript_include_tag 'admin/orders/edit_form.js' %>
70
77
 
@@ -41,7 +41,7 @@
41
41
  <% end %>
42
42
  </tbody>
43
43
  </table>
44
- <%= will_paginate(:previous_label => "&#171; #{t('previous')}", :next_label => "#{t('next')} &#187;") %>
44
+ <%= will_paginate(@orders, :previous_label => "&#171; #{t('previous')}", :next_label => "#{t('next')} &#187;") %>
45
45
 
46
46
 
47
47
  <% content_for :sidebar do %>
@@ -74,12 +74,12 @@
74
74
  <%= f.text_field :checkout_email_contains, :size=>25 %>
75
75
  </p>
76
76
  <p>
77
- <label><%= t 'first_name' %></label><br />
78
- <%= f.text_field :checkout_bill_address_firstname_contains, :size=>25 %>
77
+ <label><%= t 'first_name_begins_with' %></label><br />
78
+ <%= f.text_field :checkout_bill_address_firstname_begins_with, :size=>25 %>
79
79
  </p>
80
80
  <p>
81
- <label><%= t 'last_name' %></label><br />
82
- <%= f.text_field :checkout_bill_address_lastname_contains, :size=>25 %>
81
+ <label><%= t 'last_name_begins_with' %></label><br />
82
+ <%= f.text_field :checkout_bill_address_lastname_begins_with, :size=>25 %>
83
83
  </p>
84
84
  <p>
85
85
  <%= f.check_box :completed_at_not_null, {:style => "vertical-align:middle;"} %>
@@ -1,9 +1,9 @@
1
1
  <table>
2
- <tr>
2
+ <tr>
3
3
  <td><label><%=t("name")%></label></td>
4
4
  <td><%= text_field :payment_method, :name, {"style" => "width:200px"} %></td>
5
5
  </tr>
6
- <tr>
6
+ <tr>
7
7
  <td><label><%=t("description")%></label></td>
8
8
  <td><%= text_area :payment_method, :description, {:cols => 60, :rows => 4} %></td>
9
9
  </tr>
@@ -13,13 +13,19 @@
13
13
  <%= collection_select(:payment_method, :environment, Configuration.configurations.keys, :to_s, :titleize, {}, {:id => "gtwy-env"}) %>
14
14
  </td>
15
15
  </tr>
16
+ <tr>
17
+ <td><label><%=t("display")%></label></td>
18
+ <td>
19
+ <%= select(:payment_method, :display, PaymentMethod::DISPLAY.collect {|display| [t(display), display == :both ? nil : display.to_s]}) %>
20
+ </td>
21
+ </tr>
16
22
  <tr>
17
23
  <td><label><%= t("active") %></label></td>
18
24
  <td>
19
25
  <label class="sub">
20
26
  <%= radio_button(:payment_method, :active, true ) %>
21
27
  <%= t("yes") %>
22
- </label> &nbsp;
28
+ </label> &nbsp;
23
29
  <label class="sub">
24
30
  <%= radio_button(:payment_method, :active, false ) %>
25
31
  <%= t("no") %>
@@ -27,7 +33,7 @@
27
33
  </td>
28
34
  </tr>
29
35
  </table>
30
-
36
+
31
37
  <h2><%= t('settings') %></h2>
32
38
 
33
39
  <div id="preference-settings">
@@ -35,9 +41,9 @@
35
41
  <%= collection_select(:payment_method, :type, @providers, :to_s, :name, {}, {:id => "gtwy-type"}) %>
36
42
 
37
43
  <% unless @object.new_record? %>
38
-
44
+
39
45
  <%= preference_fields(@object, f) %>
40
-
46
+
41
47
  <% if @object.respond_to?(:preferences) %>
42
48
  <div id="gateway-settings-warning" style="color:#FF0000"><%= t('provider_settings_warning')%></div>
43
49
  <% end %>
@@ -13,22 +13,33 @@
13
13
 
14
14
  <table class="index">
15
15
  <thead>
16
- <th><%= t("name") %></th>
17
- <th><%= t("provider") %></th>
18
- <th><%= t("environment") %></th>
19
- <th><%= t("active") %></th>
20
- <th><%= t("action") %></th>
16
+ <% hook :admin_payment_methods_index_headers do %>
17
+ <th><%= t("name") %></th>
18
+ <th><%= t("provider") %></th>
19
+ <th><%= t("environment") %></th>
20
+ <th><%= t("display") %></th>
21
+ <th><%= t("active") %></th>
22
+ <% end %>
23
+ <th>
24
+ <% hook :admin_payment_methods_index_header_actions %>
25
+ </th>
21
26
  </thead>
22
27
  <tbody>
23
28
  <% @payment_methods.each do |method|%>
24
29
  <tr id="<%= dom_id method %>">
25
- <td width="120px"><%= method.name %></td>
26
- <td width="140px"><%= method.type %></td>
27
- <td width="100px"><%= method.environment.to_s.titleize %></td>
28
- <td width="60px"><%= method.active ? t(:yes) : t(:no) %></td>
30
+ <%- locals = {:method => method} -%>
31
+ <% hook :admin_payment_methods_index_rows, locals do %>
32
+ <td width="120px"><%= method.name %></td>
33
+ <td width="140px"><%= method.type %></td>
34
+ <td width="100px"><%= method.environment.to_s.titleize %></td>
35
+ <td width="60px"><%= method.display.blank? ? "Both" : t(method.display) %></td>
36
+ <td width="60px"><%= method.active ? t(:yes) : t(:no) %></td>
37
+ <% end %>
29
38
  <td width="140px">
30
- <%= link_to_edit method %> &nbsp;
31
- <%= link_to_delete method %>
39
+ <% hook :admin_payment_methods_index_row_actions, locals do %>
40
+ <%= link_to_edit method %> &nbsp;
41
+ <%= link_to_delete method %>
42
+ <% end %>
32
43
  </td>
33
44
  </tr>
34
45
  <% end %>