radiant-shop-extension 0.11.6 → 0.90.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (227) hide show
  1. data/HISTORY.md +21 -3
  2. data/LICENSE +42 -0
  3. data/README.md +62 -25
  4. data/Rakefile +4 -5
  5. data/VERSION +1 -1
  6. data/app/controllers/admin/shop/categories_controller.rb +1 -0
  7. data/app/controllers/admin/shop/orders_controller.rb +1 -1
  8. data/app/controllers/admin/shop/products_controller.rb +18 -7
  9. data/app/helpers/shop_helper.rb +8 -0
  10. data/app/models/form_address.rb +5 -5
  11. data/app/models/form_checkout.rb +25 -17
  12. data/app/models/form_line_item.rb +1 -1
  13. data/app/models/shop_category.rb +22 -7
  14. data/app/models/shop_customer.rb +1 -1
  15. data/app/models/shop_line_item.rb +26 -26
  16. data/app/models/shop_order.rb +0 -2
  17. data/app/models/shop_product.rb +15 -18
  18. data/app/views/.DS_Store +0 -0
  19. data/app/views/admin/shop/categories/edit/meta/_status.html.haml +3 -0
  20. data/app/views/admin/shop/products/edit/_foot.html.haml +1 -8
  21. data/app/views/admin/shop/products/edit/meta/_layout.html.haml +6 -0
  22. data/app/views/admin/shop/products/edit/meta/_status.html.haml +3 -0
  23. data/app/views/admin/shop/products/index/_product.html.haml +1 -1
  24. data/config/locales/en.yml +8 -7
  25. data/config/routes.rb +4 -16
  26. data/db/migrate/20101011063133_setup_shop.rb +94 -0
  27. data/db/seeds/forms.rb +113 -154
  28. data/db/seeds/layouts.rb +67 -103
  29. data/db/seeds/pages.rb +101 -0
  30. data/db/seeds/products.rb +29 -0
  31. data/db/seeds/snippets.rb +36 -21
  32. data/lib/shop/controllers/application_controller.rb +5 -3
  33. data/lib/shop/models/form_extension.rb +1 -2
  34. data/lib/shop/models/page.rb +0 -1
  35. data/lib/shop/models/user.rb +0 -1
  36. data/lib/shop/tags/card.rb +8 -2
  37. data/lib/shop/tags/cart.rb +5 -1
  38. data/lib/shop/tags/helpers.rb +35 -60
  39. data/lib/shop/tags/item.rb +2 -16
  40. data/lib/shop/tags/product.rb +7 -0
  41. data/lib/tasks/shop_extension_tasks.rake +9 -4
  42. data/public/javascripts/admin/extensions/shop/products/edit.js +0 -25
  43. data/radiant-shop-extension.gemspec +25 -201
  44. data/shop_extension.rb +18 -19
  45. data/spec/datasets/forms.rb +25 -28
  46. data/spec/datasets/shop_categories.rb +2 -2
  47. data/spec/datasets/shop_config.rb +24 -0
  48. data/spec/datasets/shop_customers.rb +1 -0
  49. data/spec/datasets/shop_line_items.rb +21 -3
  50. data/spec/datasets/shop_products.rb +4 -1
  51. data/spec/datasets/tags.rb +19 -0
  52. data/spec/lib/shop/models/page_spec.rb +1 -1
  53. data/spec/lib/shop/tags/card_spec.rb +30 -4
  54. data/spec/lib/shop/tags/cart_spec.rb +29 -12
  55. data/spec/lib/shop/tags/helpers_spec.rb +45 -66
  56. data/spec/lib/shop/tags/item_spec.rb +6 -10
  57. data/spec/lib/shop/tags/product_spec.rb +27 -2
  58. data/spec/models/form_address_spec.rb +9 -8
  59. data/spec/models/form_checkout_spec.rb +28 -22
  60. data/spec/models/shop_category_spec.rb +2 -10
  61. data/spec/models/shop_line_item_spec.rb +71 -34
  62. data/spec/models/shop_order_spec.rb +5 -5
  63. data/spec/models/shop_product_attachment_spec.rb +1 -0
  64. data/spec/models/shop_product_spec.rb +4 -47
  65. data/spec/spec.opts +3 -5
  66. metadata +60 -248
  67. data/Gemfile +0 -26
  68. data/Gemfile.lock +0 -75
  69. data/MIT-LICENSE +0 -20
  70. data/app/controllers/admin/shop/discounts/discountables_controller.rb +0 -44
  71. data/app/controllers/admin/shop/discounts_controller.rb +0 -64
  72. data/app/controllers/admin/shop/packages/packings_controller.rb +0 -90
  73. data/app/controllers/admin/shop/packages_controller.rb +0 -63
  74. data/app/controllers/admin/shop/products/variant_templates_controller.rb +0 -27
  75. data/app/controllers/admin/shop/products/variants_controller.rb +0 -60
  76. data/app/controllers/admin/shop/variants_controller.rb +0 -48
  77. data/app/models/form_discount.rb +0 -39
  78. data/app/models/shop_discount.rb +0 -37
  79. data/app/models/shop_discountable.rb +0 -64
  80. data/app/models/shop_group.rb +0 -15
  81. data/app/models/shop_grouping.rb +0 -6
  82. data/app/models/shop_package.rb +0 -74
  83. data/app/models/shop_packing.rb +0 -22
  84. data/app/models/shop_product_variant.rb +0 -34
  85. data/app/models/shop_variant.rb +0 -23
  86. data/app/views/admin/pages/_shop_category.html.haml +0 -4
  87. data/app/views/admin/pages/_shop_product.html.haml +0 -4
  88. data/app/views/admin/shop/discounts/edit/_foot.html.haml +0 -16
  89. data/app/views/admin/shop/discounts/edit/_form.html.haml +0 -15
  90. data/app/views/admin/shop/discounts/edit/_head.html.haml +0 -4
  91. data/app/views/admin/shop/discounts/edit/_inputs.html.haml +0 -2
  92. data/app/views/admin/shop/discounts/edit/_meta.html.haml +0 -8
  93. data/app/views/admin/shop/discounts/edit/_parts.html.haml +0 -9
  94. data/app/views/admin/shop/discounts/edit/_popups.html.haml +0 -4
  95. data/app/views/admin/shop/discounts/edit/buttons/_browse_categories.html.haml +0 -1
  96. data/app/views/admin/shop/discounts/edit/buttons/_browse_products.html.haml +0 -1
  97. data/app/views/admin/shop/discounts/edit/inputs/_amount.html.haml +0 -3
  98. data/app/views/admin/shop/discounts/edit/inputs/_code.html.haml +0 -3
  99. data/app/views/admin/shop/discounts/edit/inputs/_name.html.haml +0 -3
  100. data/app/views/admin/shop/discounts/edit/meta/_finish.html.haml +0 -5
  101. data/app/views/admin/shop/discounts/edit/meta/_start.html.haml +0 -5
  102. data/app/views/admin/shop/discounts/edit/parts/_categories.html.haml +0 -3
  103. data/app/views/admin/shop/discounts/edit/parts/_products.html.haml +0 -3
  104. data/app/views/admin/shop/discounts/edit/popups/_browse_categories.html.haml +0 -6
  105. data/app/views/admin/shop/discounts/edit/popups/_browse_products.html.haml +0 -6
  106. data/app/views/admin/shop/discounts/edit/shared/_category.html.haml +0 -11
  107. data/app/views/admin/shop/discounts/edit/shared/_product.html.haml +0 -12
  108. data/app/views/admin/shop/discounts/edit.html.haml +0 -11
  109. data/app/views/admin/shop/discounts/index/_discount.html.haml +0 -13
  110. data/app/views/admin/shop/discounts/index/_foot.html.haml +0 -5
  111. data/app/views/admin/shop/discounts/index/_head.html.haml +0 -2
  112. data/app/views/admin/shop/discounts/index/buttons/_new_discount.html.haml +0 -1
  113. data/app/views/admin/shop/discounts/index.html.haml +0 -13
  114. data/app/views/admin/shop/discounts/new.html.haml +0 -11
  115. data/app/views/admin/shop/discounts/remove.html.haml +0 -12
  116. data/app/views/admin/shop/packages/edit/_foot.html.haml +0 -17
  117. data/app/views/admin/shop/packages/edit/_form.html.haml +0 -15
  118. data/app/views/admin/shop/packages/edit/_head.html.haml +0 -4
  119. data/app/views/admin/shop/packages/edit/_inputs.html.haml +0 -2
  120. data/app/views/admin/shop/packages/edit/_meta.html.haml +0 -8
  121. data/app/views/admin/shop/packages/edit/_parts.html.haml +0 -9
  122. data/app/views/admin/shop/packages/edit/_popups.html.haml +0 -4
  123. data/app/views/admin/shop/packages/edit/buttons/_browse_products.html.haml +0 -1
  124. data/app/views/admin/shop/packages/edit/inputs/_name.html.haml +0 -3
  125. data/app/views/admin/shop/packages/edit/inputs/_price.html.haml +0 -3
  126. data/app/views/admin/shop/packages/edit/meta/_sku.html.haml +0 -5
  127. data/app/views/admin/shop/packages/edit/parts/_description.html.haml +0 -1
  128. data/app/views/admin/shop/packages/edit/parts/_products.html.haml +0 -3
  129. data/app/views/admin/shop/packages/edit/popups/_browse_products.html.haml +0 -7
  130. data/app/views/admin/shop/packages/edit/shared/_product.html.haml +0 -8
  131. data/app/views/admin/shop/packages/edit.html.haml +0 -11
  132. data/app/views/admin/shop/packages/index/_foot.html.haml +0 -8
  133. data/app/views/admin/shop/packages/index/_head.html.haml +0 -2
  134. data/app/views/admin/shop/packages/index/_package.html.haml +0 -9
  135. data/app/views/admin/shop/packages/index/buttons/_new_package.html.haml +0 -1
  136. data/app/views/admin/shop/packages/index.html.haml +0 -13
  137. data/app/views/admin/shop/packages/new.html.haml +0 -11
  138. data/app/views/admin/shop/packages/remove.html.haml +0 -12
  139. data/app/views/admin/shop/products/edit/buttons/_browse_templates.html.haml +0 -1
  140. data/app/views/admin/shop/products/edit/buttons/_new_variant.html.haml +0 -1
  141. data/app/views/admin/shop/products/edit/parts/_variants.html.haml +0 -3
  142. data/app/views/admin/shop/products/edit/popups/_browse_templates.html.haml +0 -6
  143. data/app/views/admin/shop/products/edit/popups/_new_variant.html.haml +0 -16
  144. data/app/views/admin/shop/products/edit/shared/_template.html.haml +0 -6
  145. data/app/views/admin/shop/products/edit/shared/_variant.html.haml +0 -10
  146. data/app/views/admin/shop/products/index/buttons/_variants.html.haml +0 -1
  147. data/app/views/admin/shop/variants/edit/_foot.html.haml +0 -9
  148. data/app/views/admin/shop/variants/edit/_form.html.haml +0 -13
  149. data/app/views/admin/shop/variants/edit/_head.html.haml +0 -4
  150. data/app/views/admin/shop/variants/edit/_inputs.html.haml +0 -2
  151. data/app/views/admin/shop/variants/edit/_meta.html.haml +0 -8
  152. data/app/views/admin/shop/variants/edit/_parts.html.haml +0 -9
  153. data/app/views/admin/shop/variants/edit/_popups.html.haml +0 -4
  154. data/app/views/admin/shop/variants/edit/inputs/_name.html.haml +0 -3
  155. data/app/views/admin/shop/variants/edit/inputs/_options.html.haml +0 -3
  156. data/app/views/admin/shop/variants/edit.html.haml +0 -11
  157. data/app/views/admin/shop/variants/index/_foot.html.haml +0 -5
  158. data/app/views/admin/shop/variants/index/_head.html.haml +0 -2
  159. data/app/views/admin/shop/variants/index/_variant.html.haml +0 -9
  160. data/app/views/admin/shop/variants/index/buttons/_add_variant.html.haml +0 -1
  161. data/app/views/admin/shop/variants/index/buttons/_categories.html.haml +0 -1
  162. data/app/views/admin/shop/variants/index.html.haml +0 -13
  163. data/app/views/admin/shop/variants/new.html.haml +0 -11
  164. data/app/views/admin/shop/variants/remove.html.haml +0 -12
  165. data/app/views/shop/categories/show.html.haml +0 -1
  166. data/app/views/shop/orders/show.html.haml +0 -1
  167. data/app/views/shop/products/index.html.haml +0 -1
  168. data/app/views/shop/products/show.html.haml +0 -1
  169. data/cucumber.yml +0 -1
  170. data/db/migrate/20100311053701_initial.rb +0 -153
  171. data/db/migrate/20100927041219_remove_payment_methods.rb +0 -16
  172. data/db/migrate/20100927041624_change_payments_add_gateway.rb +0 -11
  173. data/db/migrate/20100927140446_change_payment_add_card_type_card_number.rb +0 -11
  174. data/db/migrate/20100929011106_fix_relationship_foreign_keys.rb +0 -101
  175. data/db/migrate/20100929011607_drop_shop_addressables.rb +0 -25
  176. data/db/migrate/20100929030510_create_shop_groups.rb +0 -19
  177. data/db/migrate/20100929080301_shop_groups_change_add_description.rb +0 -11
  178. data/db/migrate/20100929081200_create_variants.rb +0 -20
  179. data/db/migrate/20100929143531_change_variants_add_updated_by.rb +0 -25
  180. data/db/migrate/20100929145641_change_created_by_to_id.rb +0 -75
  181. data/db/migrate/20100929235221_change_category_add_variant_id.rb +0 -9
  182. data/db/migrate/20100930235221_create_packages.rb +0 -31
  183. data/db/migrate/20101005231713_create_page_ids.rb +0 -11
  184. data/db/migrate/20101006051214_create_pages_for_products_and_categories.rb +0 -73
  185. data/db/migrate/20101007111845_add_default_position_to_attachment.rb +0 -9
  186. data/db/migrate/20101010071143_create_discounts.rb +0 -29
  187. data/db/migrate/20101010072225_modify_categories_remove_variant.rb +0 -9
  188. data/db/migrate/20101010130034_change_discountables_add_observer.rb +0 -15
  189. data/db/migrate/20101011063133_change_orders_set_limits_to_null.rb +0 -11
  190. data/features/support/env.rb +0 -16
  191. data/features/support/paths.rb +0 -14
  192. data/lib/shop/interface/packages.rb +0 -34
  193. data/lib/shop/interface/variants.rb +0 -34
  194. data/lib/shop/tags/package.rb +0 -95
  195. data/lib/shop/tags/product_variant.rb +0 -52
  196. data/lib/shop/tags/responses.rb +0 -34
  197. data/mockups/balsamiq/products-retro_fun_tshirt-more.bmml +0 -0
  198. data/mockups/balsamiq/products-retro_fun_tshirt.bmml +0 -0
  199. data/mockups/discounts/new-edit.bmml +0 -492
  200. data/public/javascripts/admin/extensions/shop/discounts/edit.js +0 -76
  201. data/public/javascripts/admin/extensions/shop/packages/edit.js +0 -109
  202. data/public/stylesheets/sass/admin/extensions/shop/discounts/edit.sass +0 -125
  203. data/public/stylesheets/sass/admin/extensions/shop/packages/edit.sass +0 -162
  204. data/spec/controllers/admin/shop/discounts/discountables_controller_spec.rb +0 -73
  205. data/spec/controllers/admin/shop/discounts_controller_spec.rb +0 -81
  206. data/spec/controllers/admin/shop/packages/packings_controller_spec.rb +0 -188
  207. data/spec/controllers/admin/shop/packages_controller_spec.rb +0 -32
  208. data/spec/controllers/admin/shop/products/variant_templates_controller_spec.rb +0 -53
  209. data/spec/controllers/admin/shop/products/variants_controller_spec.rb +0 -116
  210. data/spec/controllers/admin/shop/variants_controller_spec.rb +0 -67
  211. data/spec/datasets/shop_discountables.rb +0 -22
  212. data/spec/datasets/shop_discounts.rb +0 -29
  213. data/spec/datasets/shop_groups.rb +0 -15
  214. data/spec/datasets/shop_packages.rb +0 -25
  215. data/spec/datasets/shop_product_variants.rb +0 -22
  216. data/spec/datasets/shop_variants.rb +0 -17
  217. data/spec/lib/shop/tags/package_spec.rb +0 -342
  218. data/spec/lib/shop/tags/product_variant_spec.rb +0 -175
  219. data/spec/lib/shop/tags/responses_spec.rb +0 -129
  220. data/spec/models/form_discount_spec.rb +0 -63
  221. data/spec/models/shop_discount_spec.rb +0 -130
  222. data/spec/models/shop_discountable_spec.rb +0 -114
  223. data/spec/models/shop_group_spec.rb +0 -38
  224. data/spec/models/shop_package_spec.rb +0 -117
  225. data/spec/models/shop_packing_spec.rb +0 -67
  226. data/spec/models/shop_product_variant_spec.rb +0 -92
  227. data/spec/models/shop_variant_spec.rb +0 -32
@@ -5,11 +5,16 @@ namespace :radiant do
5
5
  desc "Runs the migration of the Shop extension"
6
6
  task :migrate => :environment do
7
7
  require 'radiant/extension_migrator'
8
- if ENV["VERSION"]
9
- ShopExtension.migrator.migrate(ENV["VERSION"].to_i)
10
- else
11
- ShopExtension.migrator.migrate
8
+
9
+ # Migrate required extensions first
10
+ ['Settings','Images','Forms','Scoped','Drag'].each do |name|
11
+ extension = "#{name}Extension".pluralize.classify.constantize
12
+ extension.migrator.migrate
12
13
  end
14
+
15
+ version = ENV["VERSION"] ? ENV["VERSION"].to_i : nil
16
+ ShopExtension.migrator.migrate(version)
17
+
13
18
  Rake::Task['db:schema:dump'].invoke
14
19
  end
15
20
 
@@ -6,8 +6,6 @@ document.observe("dom:loaded", function() {
6
6
  '#image_form:submit' : function(e) { shop_product_edit.imageSubmit() },
7
7
  '#browse_images_popup .image:click' : function(e) { shop_product_edit.imageAttach($(this)) },
8
8
  '#product_attachments .delete:click' : function(e) { shop_product_edit.imageRemove($(this).up('.image')) },
9
-
10
- '#variants .delete:click' : function(e) { shop_product_edit.variantRemove($(this).up('.variant')) }
11
9
  });
12
10
  });
13
11
 
@@ -84,29 +82,6 @@ var ShopProductEdit = Class.create({
84
82
  });
85
83
  },
86
84
 
87
- variantRemove: function(element) {
88
- var variant_id = element.readAttribute('data-variant_id');
89
- var route = shop.getRoute('admin_shop_product_variant_path', 'js', variant_id);
90
-
91
- if(confirm('Are you Sure?')) {
92
- showStatus('Removing Variant...');
93
- element.hide();
94
-
95
- new Ajax.Request(route, {
96
- method: 'delete',
97
- onSuccess: function(data) {
98
- element.remove();
99
- }.bind(element),
100
- onFailure: function(data) {
101
- element.show();
102
- }.bind(element),
103
- onComplete: function() {
104
- hideStatus();
105
- }
106
- });
107
- }
108
- },
109
-
110
85
  imageSubmit: function() {
111
86
  showStatus('Uploading Image...');
112
87
  }
@@ -5,67 +5,48 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{radiant-shop-extension}
8
- s.version = "0.11.6"
8
+ s.version = "0.90.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Dirk Kelly", "John Barker"]
12
- s.date = %q{2010-10-14}
11
+ s.authors = ["Dirk Kelly", "John Barker", "Darcy Laycock"]
12
+ s.date = %q{2010-11-10}
13
13
  s.description = %q{Radiant Shop is an attempt at a simple but complete store. It includes Products, Categories, Orders and Credit Card Payments}
14
14
  s.email = %q{dk@dirkkelly.com}
15
15
  s.extra_rdoc_files = [
16
- "README.md"
16
+ "LICENSE",
17
+ "README.md"
17
18
  ]
18
19
  s.files = [
19
20
  ".gitignore",
20
- "Gemfile",
21
- "Gemfile.lock",
22
21
  "HISTORY.md",
23
- "MIT-LICENSE",
22
+ "LICENSE",
24
23
  "README.md",
25
24
  "Rakefile",
26
25
  "VERSION",
27
26
  "app/.DS_Store",
28
27
  "app/controllers/admin/shop/categories_controller.rb",
29
28
  "app/controllers/admin/shop/customers_controller.rb",
30
- "app/controllers/admin/shop/discounts/discountables_controller.rb",
31
- "app/controllers/admin/shop/discounts_controller.rb",
32
29
  "app/controllers/admin/shop/orders_controller.rb",
33
- "app/controllers/admin/shop/packages/packings_controller.rb",
34
- "app/controllers/admin/shop/packages_controller.rb",
35
30
  "app/controllers/admin/shop/products/images_controller.rb",
36
- "app/controllers/admin/shop/products/variant_templates_controller.rb",
37
- "app/controllers/admin/shop/products/variants_controller.rb",
38
31
  "app/controllers/admin/shop/products_controller.rb",
39
- "app/controllers/admin/shop/variants_controller.rb",
40
32
  "app/controllers/admin/shops_controller.rb",
41
33
  "app/helpers/shop_helper.rb",
42
34
  "app/models/form_address.rb",
43
35
  "app/models/form_checkout.rb",
44
- "app/models/form_discount.rb",
45
36
  "app/models/form_line_item.rb",
46
37
  "app/models/shop_address.rb",
47
38
  "app/models/shop_category.rb",
48
39
  "app/models/shop_category_page.rb",
49
40
  "app/models/shop_customer.rb",
50
- "app/models/shop_discount.rb",
51
- "app/models/shop_discountable.rb",
52
- "app/models/shop_group.rb",
53
- "app/models/shop_grouping.rb",
54
41
  "app/models/shop_line_item.rb",
55
42
  "app/models/shop_order.rb",
56
- "app/models/shop_package.rb",
57
- "app/models/shop_packing.rb",
58
43
  "app/models/shop_page.rb",
59
44
  "app/models/shop_payment.rb",
60
45
  "app/models/shop_product.rb",
61
46
  "app/models/shop_product_attachment.rb",
62
47
  "app/models/shop_product_page.rb",
63
- "app/models/shop_product_variant.rb",
64
- "app/models/shop_variant.rb",
65
48
  "app/views/.DS_Store",
66
49
  "app/views/admin/.DS_Store",
67
- "app/views/admin/pages/_shop_category.html.haml",
68
- "app/views/admin/pages/_shop_product.html.haml",
69
50
  "app/views/admin/shop/categories/edit.html.haml",
70
51
  "app/views/admin/shop/categories/edit/_foot.html.haml",
71
52
  "app/views/admin/shop/categories/edit/_form.html.haml",
@@ -78,6 +59,7 @@ Gem::Specification.new do |s|
78
59
  "app/views/admin/shop/categories/edit/meta/_handle.html.haml",
79
60
  "app/views/admin/shop/categories/edit/meta/_layouts.html.haml",
80
61
  "app/views/admin/shop/categories/edit/meta/_page.html.haml",
62
+ "app/views/admin/shop/categories/edit/meta/_status.html.haml",
81
63
  "app/views/admin/shop/categories/edit/parts/_description.html.haml",
82
64
  "app/views/admin/shop/categories/index/_category.html.haml",
83
65
  "app/views/admin/shop/categories/new.html.haml",
@@ -104,34 +86,6 @@ Gem::Specification.new do |s|
104
86
  "app/views/admin/shop/customers/index/_head.html.haml",
105
87
  "app/views/admin/shop/customers/new.html.haml",
106
88
  "app/views/admin/shop/customers/remove.html.haml",
107
- "app/views/admin/shop/discounts/edit.html.haml",
108
- "app/views/admin/shop/discounts/edit/_foot.html.haml",
109
- "app/views/admin/shop/discounts/edit/_form.html.haml",
110
- "app/views/admin/shop/discounts/edit/_head.html.haml",
111
- "app/views/admin/shop/discounts/edit/_inputs.html.haml",
112
- "app/views/admin/shop/discounts/edit/_meta.html.haml",
113
- "app/views/admin/shop/discounts/edit/_parts.html.haml",
114
- "app/views/admin/shop/discounts/edit/_popups.html.haml",
115
- "app/views/admin/shop/discounts/edit/buttons/_browse_categories.html.haml",
116
- "app/views/admin/shop/discounts/edit/buttons/_browse_products.html.haml",
117
- "app/views/admin/shop/discounts/edit/inputs/_amount.html.haml",
118
- "app/views/admin/shop/discounts/edit/inputs/_code.html.haml",
119
- "app/views/admin/shop/discounts/edit/inputs/_name.html.haml",
120
- "app/views/admin/shop/discounts/edit/meta/_finish.html.haml",
121
- "app/views/admin/shop/discounts/edit/meta/_start.html.haml",
122
- "app/views/admin/shop/discounts/edit/parts/_categories.html.haml",
123
- "app/views/admin/shop/discounts/edit/parts/_products.html.haml",
124
- "app/views/admin/shop/discounts/edit/popups/_browse_categories.html.haml",
125
- "app/views/admin/shop/discounts/edit/popups/_browse_products.html.haml",
126
- "app/views/admin/shop/discounts/edit/shared/_category.html.haml",
127
- "app/views/admin/shop/discounts/edit/shared/_product.html.haml",
128
- "app/views/admin/shop/discounts/index.html.haml",
129
- "app/views/admin/shop/discounts/index/_discount.html.haml",
130
- "app/views/admin/shop/discounts/index/_foot.html.haml",
131
- "app/views/admin/shop/discounts/index/_head.html.haml",
132
- "app/views/admin/shop/discounts/index/buttons/_new_discount.html.haml",
133
- "app/views/admin/shop/discounts/new.html.haml",
134
- "app/views/admin/shop/discounts/remove.html.haml",
135
89
  "app/views/admin/shop/orders/edit.html.haml",
136
90
  "app/views/admin/shop/orders/edit/_foot.html.haml",
137
91
  "app/views/admin/shop/orders/edit/_form.html.haml",
@@ -152,29 +106,6 @@ Gem::Specification.new do |s|
152
106
  "app/views/admin/shop/orders/index/buttons/_new.html.haml",
153
107
  "app/views/admin/shop/orders/index/buttons/_paid.html.haml",
154
108
  "app/views/admin/shop/orders/index/buttons/_shipped.html.haml",
155
- "app/views/admin/shop/packages/edit.html.haml",
156
- "app/views/admin/shop/packages/edit/_foot.html.haml",
157
- "app/views/admin/shop/packages/edit/_form.html.haml",
158
- "app/views/admin/shop/packages/edit/_head.html.haml",
159
- "app/views/admin/shop/packages/edit/_inputs.html.haml",
160
- "app/views/admin/shop/packages/edit/_meta.html.haml",
161
- "app/views/admin/shop/packages/edit/_parts.html.haml",
162
- "app/views/admin/shop/packages/edit/_popups.html.haml",
163
- "app/views/admin/shop/packages/edit/buttons/_browse_products.html.haml",
164
- "app/views/admin/shop/packages/edit/inputs/_name.html.haml",
165
- "app/views/admin/shop/packages/edit/inputs/_price.html.haml",
166
- "app/views/admin/shop/packages/edit/meta/_sku.html.haml",
167
- "app/views/admin/shop/packages/edit/parts/_description.html.haml",
168
- "app/views/admin/shop/packages/edit/parts/_products.html.haml",
169
- "app/views/admin/shop/packages/edit/popups/_browse_products.html.haml",
170
- "app/views/admin/shop/packages/edit/shared/_product.html.haml",
171
- "app/views/admin/shop/packages/index.html.haml",
172
- "app/views/admin/shop/packages/index/_foot.html.haml",
173
- "app/views/admin/shop/packages/index/_head.html.haml",
174
- "app/views/admin/shop/packages/index/_package.html.haml",
175
- "app/views/admin/shop/packages/index/buttons/_new_package.html.haml",
176
- "app/views/admin/shop/packages/new.html.haml",
177
- "app/views/admin/shop/packages/remove.html.haml",
178
109
  "app/views/admin/shop/products/edit.html.haml",
179
110
  "app/views/admin/shop/products/edit/_foot.html.haml",
180
111
  "app/views/admin/shop/products/edit/_form.html.haml",
@@ -184,94 +115,44 @@ Gem::Specification.new do |s|
184
115
  "app/views/admin/shop/products/edit/_parts.html.haml",
185
116
  "app/views/admin/shop/products/edit/_popups.html.haml",
186
117
  "app/views/admin/shop/products/edit/buttons/_browse_images.html.haml",
187
- "app/views/admin/shop/products/edit/buttons/_browse_templates.html.haml",
188
118
  "app/views/admin/shop/products/edit/buttons/_new_image.html.haml",
189
- "app/views/admin/shop/products/edit/buttons/_new_variant.html.haml",
190
119
  "app/views/admin/shop/products/edit/inputs/_name.html.haml",
191
120
  "app/views/admin/shop/products/edit/inputs/_price.html.haml",
192
121
  "app/views/admin/shop/products/edit/meta/_category.html.haml",
122
+ "app/views/admin/shop/products/edit/meta/_layout.html.haml",
193
123
  "app/views/admin/shop/products/edit/meta/_page.html.haml",
194
124
  "app/views/admin/shop/products/edit/meta/_sku.html.haml",
125
+ "app/views/admin/shop/products/edit/meta/_status.html.haml",
195
126
  "app/views/admin/shop/products/edit/parts/_customers.html.haml",
196
127
  "app/views/admin/shop/products/edit/parts/_description.html.haml",
197
128
  "app/views/admin/shop/products/edit/parts/_images.html.haml",
198
- "app/views/admin/shop/products/edit/parts/_variants.html.haml",
199
129
  "app/views/admin/shop/products/edit/popups/_browse_images.html.haml",
200
- "app/views/admin/shop/products/edit/popups/_browse_templates.html.haml",
201
130
  "app/views/admin/shop/products/edit/popups/_new_image.html.haml",
202
- "app/views/admin/shop/products/edit/popups/_new_variant.html.haml",
203
131
  "app/views/admin/shop/products/edit/shared/_image.html.haml",
204
- "app/views/admin/shop/products/edit/shared/_template.html.haml",
205
- "app/views/admin/shop/products/edit/shared/_variant.html.haml",
206
132
  "app/views/admin/shop/products/index.html.haml",
207
133
  "app/views/admin/shop/products/index/_foot.html.haml",
208
134
  "app/views/admin/shop/products/index/_head.html.haml",
209
135
  "app/views/admin/shop/products/index/_product.html.haml",
210
136
  "app/views/admin/shop/products/index/buttons/_add_category.html.haml",
211
- "app/views/admin/shop/products/index/buttons/_variants.html.haml",
212
137
  "app/views/admin/shop/products/new.html.haml",
213
138
  "app/views/admin/shop/products/remove.html.haml",
214
- "app/views/admin/shop/variants/edit.html.haml",
215
- "app/views/admin/shop/variants/edit/_foot.html.haml",
216
- "app/views/admin/shop/variants/edit/_form.html.haml",
217
- "app/views/admin/shop/variants/edit/_head.html.haml",
218
- "app/views/admin/shop/variants/edit/_inputs.html.haml",
219
- "app/views/admin/shop/variants/edit/_meta.html.haml",
220
- "app/views/admin/shop/variants/edit/_parts.html.haml",
221
- "app/views/admin/shop/variants/edit/_popups.html.haml",
222
- "app/views/admin/shop/variants/edit/inputs/_name.html.haml",
223
- "app/views/admin/shop/variants/edit/inputs/_options.html.haml",
224
- "app/views/admin/shop/variants/index.html.haml",
225
- "app/views/admin/shop/variants/index/_foot.html.haml",
226
- "app/views/admin/shop/variants/index/_head.html.haml",
227
- "app/views/admin/shop/variants/index/_variant.html.haml",
228
- "app/views/admin/shop/variants/index/buttons/_add_variant.html.haml",
229
- "app/views/admin/shop/variants/index/buttons/_categories.html.haml",
230
- "app/views/admin/shop/variants/new.html.haml",
231
- "app/views/admin/shop/variants/remove.html.haml",
232
- "app/views/shop/categories/show.html.haml",
233
- "app/views/shop/orders/show.html.haml",
234
- "app/views/shop/products/index.html.haml",
235
- "app/views/shop/products/show.html.haml",
236
139
  "config/locales/en.yml",
237
140
  "config/routes.rb",
238
141
  "config/shop_cart.yml",
239
- "cucumber.yml",
240
- "db/migrate/20100311053701_initial.rb",
241
- "db/migrate/20100927041219_remove_payment_methods.rb",
242
- "db/migrate/20100927041624_change_payments_add_gateway.rb",
243
- "db/migrate/20100927140446_change_payment_add_card_type_card_number.rb",
244
- "db/migrate/20100929011106_fix_relationship_foreign_keys.rb",
245
- "db/migrate/20100929011607_drop_shop_addressables.rb",
246
- "db/migrate/20100929030510_create_shop_groups.rb",
247
- "db/migrate/20100929080301_shop_groups_change_add_description.rb",
248
- "db/migrate/20100929081200_create_variants.rb",
249
- "db/migrate/20100929143531_change_variants_add_updated_by.rb",
250
- "db/migrate/20100929145641_change_created_by_to_id.rb",
251
- "db/migrate/20100929235221_change_category_add_variant_id.rb",
252
- "db/migrate/20100930235221_create_packages.rb",
253
- "db/migrate/20101005231713_create_page_ids.rb",
254
- "db/migrate/20101006051214_create_pages_for_products_and_categories.rb",
255
- "db/migrate/20101007111845_add_default_position_to_attachment.rb",
256
- "db/migrate/20101010071143_create_discounts.rb",
257
- "db/migrate/20101010072225_modify_categories_remove_variant.rb",
258
- "db/migrate/20101010130034_change_discountables_add_observer.rb",
259
- "db/migrate/20101011063133_change_orders_set_limits_to_null.rb",
142
+ "db/migrate/20101011063133_setup_shop.rb",
260
143
  "db/seed.rb",
261
144
  "db/seeds/forms.rb",
262
145
  "db/seeds/layouts.rb",
146
+ "db/seeds/pages.rb",
147
+ "db/seeds/products.rb",
263
148
  "db/seeds/snippets.rb",
264
- "features/support/env.rb",
265
- "features/support/paths.rb",
266
149
  "lib/shop/controllers/application_controller.rb",
267
150
  "lib/shop/controllers/site_controller.rb",
268
151
  "lib/shop/interface/categories.rb",
269
152
  "lib/shop/interface/customers.rb",
270
153
  "lib/shop/interface/discounts.rb",
271
154
  "lib/shop/interface/orders.rb",
272
- "lib/shop/interface/packages.rb",
273
155
  "lib/shop/interface/products.rb",
274
- "lib/shop/interface/variants.rb",
275
156
  "lib/shop/models/form_extension.rb",
276
157
  "lib/shop/models/image.rb",
277
158
  "lib/shop/models/page.rb",
@@ -283,57 +164,36 @@ Gem::Specification.new do |s|
283
164
  "lib/shop/tags/core.rb",
284
165
  "lib/shop/tags/helpers.rb",
285
166
  "lib/shop/tags/item.rb",
286
- "lib/shop/tags/package.rb",
287
167
  "lib/shop/tags/product.rb",
288
- "lib/shop/tags/product_variant.rb",
289
- "lib/shop/tags/responses.rb",
290
168
  "lib/shop/tags/tax.rb",
291
169
  "lib/tasks/shop_extension_tasks.rake",
292
- "mockups/balsamiq/products-retro_fun_tshirt-more.bmml",
293
- "mockups/balsamiq/products-retro_fun_tshirt.bmml",
294
- "mockups/discounts/new-edit.bmml",
295
170
  "public/images/admin/extensions/shop/products/sort.png",
296
- "public/javascripts/admin/extensions/shop/discounts/edit.js",
297
171
  "public/javascripts/admin/extensions/shop/edit.js",
298
- "public/javascripts/admin/extensions/shop/packages/edit.js",
299
172
  "public/javascripts/admin/extensions/shop/products/edit.js",
300
173
  "public/javascripts/admin/extensions/shop/products/index.js",
301
- "public/stylesheets/sass/admin/extensions/shop/discounts/edit.sass",
302
174
  "public/stylesheets/sass/admin/extensions/shop/edit.sass",
303
175
  "public/stylesheets/sass/admin/extensions/shop/index.sass",
304
- "public/stylesheets/sass/admin/extensions/shop/packages/edit.sass",
305
176
  "public/stylesheets/sass/admin/extensions/shop/products/edit.sass",
306
177
  "public/stylesheets/sass/admin/extensions/shop/products/index.sass",
307
178
  "radiant-shop-extension.gemspec",
308
179
  "shop_extension.rb",
309
180
  "spec/controllers/admin/shop/categories_controller_spec.rb",
310
181
  "spec/controllers/admin/shop/customers_controller_spec.rb",
311
- "spec/controllers/admin/shop/discounts/discountables_controller_spec.rb",
312
- "spec/controllers/admin/shop/discounts_controller_spec.rb",
313
182
  "spec/controllers/admin/shop/orders_controller_spec.rb",
314
- "spec/controllers/admin/shop/packages/packings_controller_spec.rb",
315
- "spec/controllers/admin/shop/packages_controller_spec.rb",
316
183
  "spec/controllers/admin/shop/products/images_controller_spec.rb",
317
- "spec/controllers/admin/shop/products/variant_templates_controller_spec.rb",
318
- "spec/controllers/admin/shop/products/variants_controller_spec.rb",
319
184
  "spec/controllers/admin/shop/products_controller_spec.rb",
320
- "spec/controllers/admin/shop/variants_controller_spec.rb",
321
185
  "spec/controllers/admin/shops_controller_spec.rb",
322
186
  "spec/datasets/forms.rb",
323
187
  "spec/datasets/shop_addresses.rb",
324
188
  "spec/datasets/shop_categories.rb",
189
+ "spec/datasets/shop_config.rb",
325
190
  "spec/datasets/shop_customers.rb",
326
- "spec/datasets/shop_discountables.rb",
327
- "spec/datasets/shop_discounts.rb",
328
- "spec/datasets/shop_groups.rb",
329
191
  "spec/datasets/shop_line_items.rb",
330
192
  "spec/datasets/shop_orders.rb",
331
- "spec/datasets/shop_packages.rb",
332
193
  "spec/datasets/shop_payments.rb",
333
194
  "spec/datasets/shop_product_attachments.rb",
334
- "spec/datasets/shop_product_variants.rb",
335
195
  "spec/datasets/shop_products.rb",
336
- "spec/datasets/shop_variants.rb",
196
+ "spec/datasets/tags.rb",
337
197
  "spec/helpers/nested_tag_helper.rb",
338
198
  "spec/lib/shop/models/image_spec.rb",
339
199
  "spec/lib/shop/models/page_spec.rb",
@@ -344,33 +204,22 @@ Gem::Specification.new do |s|
344
204
  "spec/lib/shop/tags/core_spec.rb",
345
205
  "spec/lib/shop/tags/helpers_spec.rb",
346
206
  "spec/lib/shop/tags/item_spec.rb",
347
- "spec/lib/shop/tags/package_spec.rb",
348
207
  "spec/lib/shop/tags/product_spec.rb",
349
- "spec/lib/shop/tags/product_variant_spec.rb",
350
- "spec/lib/shop/tags/responses_spec.rb",
351
208
  "spec/lib/shop/tags/tax_spec.rb",
352
209
  "spec/matchers/comparison.rb",
353
210
  "spec/matchers/render_matcher.rb",
354
211
  "spec/models/form_address_spec.rb",
355
212
  "spec/models/form_checkout_spec.rb",
356
- "spec/models/form_discount_spec.rb",
357
213
  "spec/models/shop_address_spec.rb",
358
214
  "spec/models/shop_category_page_spec.rb",
359
215
  "spec/models/shop_category_spec.rb",
360
216
  "spec/models/shop_customer_spec.rb",
361
- "spec/models/shop_discount_spec.rb",
362
- "spec/models/shop_discountable_spec.rb",
363
- "spec/models/shop_group_spec.rb",
364
217
  "spec/models/shop_line_item_spec.rb",
365
218
  "spec/models/shop_order_spec.rb",
366
- "spec/models/shop_package_spec.rb",
367
- "spec/models/shop_packing_spec.rb",
368
219
  "spec/models/shop_payment_spec.rb",
369
220
  "spec/models/shop_product_attachment_spec.rb",
370
221
  "spec/models/shop_product_page_spec.rb",
371
222
  "spec/models/shop_product_spec.rb",
372
- "spec/models/shop_product_variant_spec.rb",
373
- "spec/models/shop_variant_spec.rb",
374
223
  "spec/spec.opts",
375
224
  "spec/spec_helper.rb",
376
225
  "vendor/plugins/acts_as_list/README",
@@ -386,32 +235,21 @@ Gem::Specification.new do |s|
386
235
  s.test_files = [
387
236
  "spec/controllers/admin/shop/categories_controller_spec.rb",
388
237
  "spec/controllers/admin/shop/customers_controller_spec.rb",
389
- "spec/controllers/admin/shop/discounts/discountables_controller_spec.rb",
390
- "spec/controllers/admin/shop/discounts_controller_spec.rb",
391
238
  "spec/controllers/admin/shop/orders_controller_spec.rb",
392
- "spec/controllers/admin/shop/packages/packings_controller_spec.rb",
393
- "spec/controllers/admin/shop/packages_controller_spec.rb",
394
239
  "spec/controllers/admin/shop/products/images_controller_spec.rb",
395
- "spec/controllers/admin/shop/products/variant_templates_controller_spec.rb",
396
- "spec/controllers/admin/shop/products/variants_controller_spec.rb",
397
240
  "spec/controllers/admin/shop/products_controller_spec.rb",
398
- "spec/controllers/admin/shop/variants_controller_spec.rb",
399
241
  "spec/controllers/admin/shops_controller_spec.rb",
400
242
  "spec/datasets/forms.rb",
401
243
  "spec/datasets/shop_addresses.rb",
402
244
  "spec/datasets/shop_categories.rb",
245
+ "spec/datasets/shop_config.rb",
403
246
  "spec/datasets/shop_customers.rb",
404
- "spec/datasets/shop_discountables.rb",
405
- "spec/datasets/shop_discounts.rb",
406
- "spec/datasets/shop_groups.rb",
407
247
  "spec/datasets/shop_line_items.rb",
408
248
  "spec/datasets/shop_orders.rb",
409
- "spec/datasets/shop_packages.rb",
410
249
  "spec/datasets/shop_payments.rb",
411
250
  "spec/datasets/shop_product_attachments.rb",
412
- "spec/datasets/shop_product_variants.rb",
413
251
  "spec/datasets/shop_products.rb",
414
- "spec/datasets/shop_variants.rb",
252
+ "spec/datasets/tags.rb",
415
253
  "spec/helpers/nested_tag_helper.rb",
416
254
  "spec/lib/shop/models/image_spec.rb",
417
255
  "spec/lib/shop/models/page_spec.rb",
@@ -422,33 +260,22 @@ Gem::Specification.new do |s|
422
260
  "spec/lib/shop/tags/core_spec.rb",
423
261
  "spec/lib/shop/tags/helpers_spec.rb",
424
262
  "spec/lib/shop/tags/item_spec.rb",
425
- "spec/lib/shop/tags/package_spec.rb",
426
263
  "spec/lib/shop/tags/product_spec.rb",
427
- "spec/lib/shop/tags/product_variant_spec.rb",
428
- "spec/lib/shop/tags/responses_spec.rb",
429
264
  "spec/lib/shop/tags/tax_spec.rb",
430
265
  "spec/matchers/comparison.rb",
431
266
  "spec/matchers/render_matcher.rb",
432
267
  "spec/models/form_address_spec.rb",
433
268
  "spec/models/form_checkout_spec.rb",
434
- "spec/models/form_discount_spec.rb",
435
269
  "spec/models/shop_address_spec.rb",
436
270
  "spec/models/shop_category_page_spec.rb",
437
271
  "spec/models/shop_category_spec.rb",
438
272
  "spec/models/shop_customer_spec.rb",
439
- "spec/models/shop_discount_spec.rb",
440
- "spec/models/shop_discountable_spec.rb",
441
- "spec/models/shop_group_spec.rb",
442
273
  "spec/models/shop_line_item_spec.rb",
443
274
  "spec/models/shop_order_spec.rb",
444
- "spec/models/shop_package_spec.rb",
445
- "spec/models/shop_packing_spec.rb",
446
275
  "spec/models/shop_payment_spec.rb",
447
276
  "spec/models/shop_product_attachment_spec.rb",
448
277
  "spec/models/shop_product_page_spec.rb",
449
278
  "spec/models/shop_product_spec.rb",
450
- "spec/models/shop_product_variant_spec.rb",
451
- "spec/models/shop_variant_spec.rb",
452
279
  "spec/spec_helper.rb"
453
280
  ]
454
281
 
@@ -460,32 +287,29 @@ Gem::Specification.new do |s|
460
287
  s.add_runtime_dependency(%q<radiant>, [">= 0.9.1"])
461
288
  s.add_runtime_dependency(%q<activemerchant>, [">= 1.8.0"])
462
289
  s.add_runtime_dependency(%q<fastercsv>, [">= 1.5.3"])
463
- s.add_runtime_dependency(%q<radiant-layouts-extension>, [">= 0.9.1"])
464
290
  s.add_runtime_dependency(%q<radiant-settings-extension>, [">= 1.1.1"])
465
- s.add_runtime_dependency(%q<radiant-images-extension>, [">= 0.3.2"])
466
- s.add_runtime_dependency(%q<radiant-forms-extension>, [">= 3.1.1"])
467
- s.add_runtime_dependency(%q<radiant-scoped-extension>, [">= 0.2.2"])
291
+ s.add_runtime_dependency(%q<radiant-images-extension>, [">= 0.4.0"])
292
+ s.add_runtime_dependency(%q<radiant-forms-extension>, [">= 3.2.1"])
293
+ s.add_runtime_dependency(%q<radiant-users-extension>, [">= 0.0.1"])
468
294
  s.add_runtime_dependency(%q<radiant-drag-extension>, [">= 0.1.0"])
469
295
  else
470
296
  s.add_dependency(%q<radiant>, [">= 0.9.1"])
471
297
  s.add_dependency(%q<activemerchant>, [">= 1.8.0"])
472
298
  s.add_dependency(%q<fastercsv>, [">= 1.5.3"])
473
- s.add_dependency(%q<radiant-layouts-extension>, [">= 0.9.1"])
474
299
  s.add_dependency(%q<radiant-settings-extension>, [">= 1.1.1"])
475
- s.add_dependency(%q<radiant-images-extension>, [">= 0.3.2"])
476
- s.add_dependency(%q<radiant-forms-extension>, [">= 3.1.1"])
477
- s.add_dependency(%q<radiant-scoped-extension>, [">= 0.2.2"])
300
+ s.add_dependency(%q<radiant-images-extension>, [">= 0.4.0"])
301
+ s.add_dependency(%q<radiant-forms-extension>, [">= 3.2.1"])
302
+ s.add_dependency(%q<radiant-users-extension>, [">= 0.0.1"])
478
303
  s.add_dependency(%q<radiant-drag-extension>, [">= 0.1.0"])
479
304
  end
480
305
  else
481
306
  s.add_dependency(%q<radiant>, [">= 0.9.1"])
482
307
  s.add_dependency(%q<activemerchant>, [">= 1.8.0"])
483
308
  s.add_dependency(%q<fastercsv>, [">= 1.5.3"])
484
- s.add_dependency(%q<radiant-layouts-extension>, [">= 0.9.1"])
485
309
  s.add_dependency(%q<radiant-settings-extension>, [">= 1.1.1"])
486
- s.add_dependency(%q<radiant-images-extension>, [">= 0.3.2"])
487
- s.add_dependency(%q<radiant-forms-extension>, [">= 3.1.1"])
488
- s.add_dependency(%q<radiant-scoped-extension>, [">= 0.2.2"])
310
+ s.add_dependency(%q<radiant-images-extension>, [">= 0.4.0"])
311
+ s.add_dependency(%q<radiant-forms-extension>, [">= 3.2.1"])
312
+ s.add_dependency(%q<radiant-users-extension>, [">= 0.0.1"])
489
313
  s.add_dependency(%q<radiant-drag-extension>, [">= 0.1.0"])
490
314
  end
491
315
  end
data/shop_extension.rb CHANGED
@@ -4,36 +4,37 @@ class ShopExtension < Radiant::Extension
4
4
  url "http://github.com/squaretalent/radiant-shop-extension"
5
5
 
6
6
  extension_config do |config|
7
- config.gem 'activemerchant', :lib => 'active_merchant'
8
- config.gem 'fastercsv', :lib => 'fastercsv'
7
+ config.gem 'activemerchant', :lib => 'active_merchant'
8
+ config.gem 'fastercsv', :lib => 'fastercsv'
9
+ config.gem 'radiant-settings-extension', :lib => false
10
+ config.gem 'radiant-users-extension', :lib => false
11
+ config.gem 'radiant-images-extension', :lib => false
12
+ config.gem 'radiant-forms-extension', :lib => false
13
+ config.gem 'radiant-drag-extension', :lib => false
9
14
  end
10
15
 
11
16
  UserActionObserver.instance.send :add_observer!, ShopCategory
12
- UserActionObserver.instance.send :add_observer!, ShopDiscount
13
17
  UserActionObserver.instance.send :add_observer!, ShopOrder
14
- UserActionObserver.instance.send :add_observer!, ShopPackage
15
18
  UserActionObserver.instance.send :add_observer!, ShopProduct
16
19
  UserActionObserver.instance.send :add_observer!, ShopProductAttachment
17
- UserActionObserver.instance.send :add_observer!, ShopDiscountable
18
- UserActionObserver.instance.send :add_observer!, ShopProductVariant
19
- UserActionObserver.instance.send :add_observer!, ShopVariant
20
20
 
21
21
  def activate
22
22
  # View Hooks
23
23
  unless defined? admin.products
24
- Radiant::AdminUI.send :include, Shop::Interface::Categories, Shop::Interface::Customers, Shop::Interface::Discounts, Shop::Interface::Orders, Shop::Interface::Packages, Shop::Interface::Products, Shop::Interface::Variants
24
+ Radiant::AdminUI.send :include, Shop::Interface::Categories, Shop::Interface::Customers
25
+ Radiant::AdminUI.send :include, Shop::Interface::Discounts, Shop::Interface::Orders, Shop::Interface::Products
25
26
 
26
27
  admin.categories = Radiant::AdminUI.load_default_shop_categories_regions
27
28
  admin.customers = Radiant::AdminUI.load_default_shop_customers_regions
28
29
  admin.discounts = Radiant::AdminUI.load_default_shop_discounts_regions
29
- admin.orders = Radiant::AdminUI.load_default_shop_orders_regions
30
- admin.packages = Radiant::AdminUI.load_default_shop_packages_regions
30
+ admin.orders = Radiant::AdminUI.load_default_shop_orders_regions
31
31
  admin.products = Radiant::AdminUI.load_default_shop_products_regions
32
- admin.variants = Radiant::AdminUI.load_default_shop_variants_regions
33
32
  end
34
33
 
35
34
  # Tags
36
- Page.send :include, Shop::Tags::Core, Shop::Tags::Address, Shop::Tags::Card, Shop::Tags::Cart, Shop::Tags::Category, Shop::Tags::Item, Shop::Tags::Package, Shop::Tags::Product, Shop::Tags::ProductVariant, Shop::Tags::Responses, Shop::Tags::Tax
35
+ Page.send :include, Shop::Tags::Core, Shop::Tags::Address, Shop::Tags::Card, Shop::Tags::Cart
36
+ Page.send :include, Shop::Tags::Category, Shop::Tags::Item, Shop::Tags::Product
37
+ Page.send :include, Shop::Tags::Tax
37
38
 
38
39
  # Model Includes
39
40
  Page.send :include, Shop::Models::Page
@@ -44,18 +45,14 @@ class ShopExtension < Radiant::Extension
44
45
  ApplicationController.send :include, Shop::Controllers::ApplicationController
45
46
  SiteController.send :include, Shop::Controllers::SiteController
46
47
 
47
- # Tabs3
48
-
48
+ # Tabs
49
49
  tab "Shop" do
50
50
  add_item "Products", "/admin/shop"
51
- add_item "Packages", "/admin/shop/packages"
52
51
  add_item "Orders", "/admin/shop/orders"
53
- add_item "Discounts", "/admin/shop/discounts"
54
52
  add_item "Customers", "/admin/shop/customers"
55
53
  end
56
54
 
57
- Radiant::Config['shop.root_page_id'] ||= (Page.first(:conditions => { :slug => 'shop'}).id rescue (Page.first.id rescue nil))
58
- Radiant::Config['shop.root_page_slug'] ||= 'shop'
55
+ Radiant::Config['shop.root_page_id'] ||= nil
59
56
 
60
57
  Radiant::Config['shop.layout_product'] ||= 'Product'
61
58
  Radiant::Config['shop.layout_category'] ||= 'Products'
@@ -65,10 +62,12 @@ class ShopExtension < Radiant::Extension
65
62
  Radiant::Config['shop.price_separator'] ||= '.'
66
63
  Radiant::Config['shop.price_delimiter'] ||= ','
67
64
 
68
- Radiant::Config['shop.tax_strategy'] ||= 'inclusive' #exclusive
65
+ Radiant::Config['shop.tax_strategy'] ||= 'inclusive'
69
66
  Radiant::Config['shop.tax_percentage'] ||= '10'
70
67
  Radiant::Config['shop.tax_name'] ||= 'gst'
71
68
 
69
+ Radiant::Config['shop.date_format'] ||= '%d/%m/%Y'
70
+
72
71
  # Scoped Customer Welcome Page
73
72
  Radiant::Config['scoped.customer.redirect'] = '/cart'
74
73
  end