radiant-shop-extension 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (272) hide show
  1. data/README.md +5 -1
  2. data/VERSION +1 -1
  3. data/app/controllers/admin/shop/categories_controller.rb +32 -65
  4. data/app/controllers/admin/shop/customers_controller.rb +8 -7
  5. data/app/controllers/admin/shop/orders_controller.rb +37 -159
  6. data/app/controllers/admin/shop/packages/packings_controller.rb +90 -0
  7. data/app/controllers/admin/shop/packages_controller.rb +65 -0
  8. data/app/controllers/admin/shop/products/images_controller.rb +5 -8
  9. data/app/controllers/admin/shop/products/variant_templates_controller.rb +27 -0
  10. data/app/controllers/admin/shop/products/variants_controller.rb +60 -0
  11. data/app/controllers/admin/shop/products_controller.rb +67 -64
  12. data/app/controllers/admin/shop/variants_controller.rb +49 -0
  13. data/app/helpers/shop_helper.rb +5 -0
  14. data/app/models/form_address.rb +144 -0
  15. data/app/models/form_checkout.rb +200 -307
  16. data/app/models/form_line_item.rb +60 -0
  17. data/app/models/shop_address.rb +2 -2
  18. data/app/models/shop_category.rb +48 -51
  19. data/app/models/shop_customer.rb +25 -5
  20. data/app/models/shop_group.rb +15 -0
  21. data/app/models/shop_grouping.rb +6 -0
  22. data/app/models/shop_line_item.rb +7 -6
  23. data/app/models/shop_order.rb +44 -16
  24. data/app/models/shop_package.rb +74 -0
  25. data/app/models/shop_packing.rb +22 -0
  26. data/app/models/shop_page.rb +7 -0
  27. data/app/models/shop_payment.rb +5 -1
  28. data/app/models/shop_product.rb +86 -48
  29. data/app/models/shop_product_attachment.rb +5 -2
  30. data/app/models/shop_product_variant.rb +31 -0
  31. data/app/models/shop_variant.rb +25 -0
  32. data/app/views/admin/shop/categories/edit.html.haml +9 -10
  33. data/app/views/admin/shop/categories/edit/_foot.html.haml +9 -0
  34. data/app/views/admin/shop/categories/edit/_form.html.haml +14 -0
  35. data/app/views/admin/shop/categories/edit/_head.html.haml +4 -2
  36. data/app/views/admin/shop/categories/edit/_inputs.html.haml +2 -0
  37. data/app/views/admin/shop/categories/edit/_meta.html.haml +8 -7
  38. data/app/views/admin/shop/categories/edit/_parts.html.haml +9 -0
  39. data/app/views/admin/shop/categories/edit/_popups.html.haml +4 -0
  40. data/app/views/admin/shop/categories/edit/inputs/_name.html.haml +4 -0
  41. data/app/views/admin/shop/categories/edit/meta/_handle.html.haml +6 -5
  42. data/app/views/admin/shop/categories/edit/meta/_layouts.html.haml +6 -5
  43. data/app/views/admin/shop/categories/edit/meta/_page.html.haml +3 -0
  44. data/app/views/admin/shop/categories/edit/parts/_description.html.haml +4 -1
  45. data/app/views/admin/shop/categories/index/_category.html.haml +11 -10
  46. data/app/views/admin/shop/categories/new.html.haml +10 -9
  47. data/app/views/admin/shop/customers/edit.html.haml +8 -10
  48. data/app/views/admin/shop/customers/edit/_foot.html.haml +9 -0
  49. data/app/views/admin/shop/customers/edit/_form.html.haml +13 -0
  50. data/app/views/admin/shop/customers/edit/_head.html.haml +4 -2
  51. data/app/views/admin/shop/customers/edit/_inputs.html.haml +2 -0
  52. data/app/views/admin/shop/customers/edit/_parts.html.haml +9 -4
  53. data/app/views/admin/shop/customers/edit/inputs/_email.html.haml +3 -0
  54. data/app/views/admin/shop/customers/edit/inputs/_name.html.haml +3 -0
  55. data/app/views/admin/shop/customers/edit/parts/_orders.html.haml +10 -6
  56. data/app/views/admin/shop/customers/index.html.haml +4 -1
  57. data/app/views/admin/shop/customers/index/_customer.html.haml +3 -3
  58. data/app/views/admin/shop/customers/index/_foot.html.haml +4 -0
  59. data/app/views/admin/shop/customers/index/_head.html.haml +4 -0
  60. data/app/views/admin/shop/customers/new.html.haml +9 -9
  61. data/app/views/admin/shop/orders/edit.html.haml +11 -0
  62. data/app/views/admin/shop/orders/edit/_foot.html.haml +9 -0
  63. data/app/views/admin/shop/orders/edit/_form.html.haml +13 -0
  64. data/app/views/admin/shop/orders/edit/_head.html.haml +4 -0
  65. data/app/views/admin/shop/orders/edit/_inputs.html.haml +2 -0
  66. data/app/views/admin/shop/orders/edit/_meta.html.haml +8 -0
  67. data/app/views/admin/shop/orders/edit/_parts.html.haml +9 -0
  68. data/app/views/admin/shop/orders/edit/_popups.html.haml +4 -0
  69. data/app/views/admin/shop/orders/edit/parts/_address.html.haml +7 -0
  70. data/app/views/admin/shop/orders/edit/parts/_addresses.html.haml +9 -0
  71. data/app/views/admin/shop/orders/edit/parts/_customer.html.haml +3 -0
  72. data/app/views/admin/shop/orders/edit/parts/_items.html.haml +8 -0
  73. data/app/views/admin/shop/orders/index.html.haml +10 -30
  74. data/app/views/admin/shop/orders/index/_foot.html.haml +3 -0
  75. data/app/views/admin/shop/orders/index/_head.html.haml +4 -0
  76. data/app/views/admin/shop/orders/index/_order.html.haml +13 -0
  77. data/app/views/admin/shop/orders/index/buttons/_all.html.haml +1 -0
  78. data/app/views/admin/shop/orders/index/buttons/_new.html.haml +1 -0
  79. data/app/views/admin/shop/orders/index/buttons/_paid.html.haml +1 -0
  80. data/app/views/admin/shop/orders/index/buttons/_shipped.html.haml +1 -0
  81. data/app/views/admin/shop/packages/edit.html.haml +11 -0
  82. data/app/views/admin/shop/packages/edit/_foot.html.haml +17 -0
  83. data/app/views/admin/shop/packages/edit/_form.html.haml +15 -0
  84. data/app/views/admin/shop/packages/edit/_head.html.haml +4 -0
  85. data/app/views/admin/shop/packages/edit/_inputs.html.haml +2 -0
  86. data/app/views/admin/shop/packages/edit/_meta.html.haml +8 -0
  87. data/app/views/admin/shop/packages/edit/_parts.html.haml +9 -0
  88. data/app/views/admin/shop/packages/edit/_popups.html.haml +4 -0
  89. data/app/views/admin/shop/packages/edit/buttons/_browse_products.html.haml +1 -0
  90. data/app/views/admin/shop/packages/edit/inputs/_name.html.haml +3 -0
  91. data/app/views/admin/shop/packages/edit/inputs/_price.html.haml +3 -0
  92. data/app/views/admin/shop/packages/edit/meta/_sku.html.haml +5 -0
  93. data/app/views/admin/shop/packages/edit/parts/_description.html.haml +1 -0
  94. data/app/views/admin/shop/packages/edit/parts/_products.html.haml +3 -0
  95. data/app/views/admin/shop/packages/edit/popups/_browse_products.html.haml +7 -0
  96. data/app/views/admin/shop/packages/edit/shared/_product.html.haml +8 -0
  97. data/app/views/admin/shop/packages/index.html.haml +13 -0
  98. data/app/views/admin/shop/packages/index/_foot.html.haml +7 -0
  99. data/app/views/admin/shop/packages/index/_head.html.haml +4 -0
  100. data/app/views/admin/shop/packages/index/_package.html.haml +9 -0
  101. data/app/views/admin/shop/packages/new.html.haml +11 -0
  102. data/app/views/admin/shop/packages/remove.html.haml +12 -0
  103. data/app/views/admin/shop/products/edit.html.haml +9 -12
  104. data/app/views/admin/shop/products/edit/_foot.html.haml +19 -0
  105. data/app/views/admin/shop/products/edit/_form.html.haml +15 -0
  106. data/app/views/admin/shop/products/edit/_head.html.haml +4 -2
  107. data/app/views/admin/shop/products/edit/_inputs.html.haml +2 -0
  108. data/app/views/admin/shop/products/edit/_meta.html.haml +8 -8
  109. data/app/views/admin/shop/products/edit/_parts.html.haml +9 -0
  110. data/app/views/admin/shop/products/edit/_popups.html.haml +4 -0
  111. data/app/views/admin/shop/products/edit/buttons/_browse_images.html.haml +1 -1
  112. data/app/views/admin/shop/products/edit/buttons/_browse_templates.html.haml +1 -0
  113. data/app/views/admin/shop/products/edit/buttons/_new_image.html.haml +1 -1
  114. data/app/views/admin/shop/products/edit/buttons/_new_variant.html.haml +1 -0
  115. data/app/views/admin/shop/products/edit/inputs/_name.html.haml +4 -0
  116. data/app/views/admin/shop/products/edit/inputs/_price.html.haml +3 -0
  117. data/app/views/admin/shop/products/edit/meta/_category.html.haml +6 -5
  118. data/app/views/admin/shop/products/edit/meta/_page.html.haml +2 -0
  119. data/app/views/admin/shop/products/edit/meta/_sku.html.haml +6 -5
  120. data/app/views/admin/shop/products/edit/parts/_customers.html.haml +5 -0
  121. data/app/views/admin/shop/products/edit/parts/_description.html.haml +4 -1
  122. data/app/views/admin/shop/products/edit/parts/_images.html.haml +1 -1
  123. data/app/views/admin/shop/products/edit/parts/_variants.html.haml +3 -0
  124. data/app/views/admin/shop/products/edit/popups/_browse_images.html.haml +1 -1
  125. data/app/views/admin/shop/products/edit/popups/_browse_templates.html.haml +6 -0
  126. data/app/views/admin/shop/products/edit/popups/_new_image.html.haml +4 -4
  127. data/app/views/admin/shop/products/edit/popups/_new_variant.html.haml +16 -0
  128. data/app/views/admin/shop/products/edit/{_image.html.haml → shared/_image.html.haml} +0 -0
  129. data/app/views/admin/shop/products/edit/shared/_template.html.haml +6 -0
  130. data/app/views/admin/shop/products/edit/shared/_variant.html.haml +10 -0
  131. data/app/views/admin/shop/products/index.html.haml +6 -3
  132. data/app/views/admin/shop/products/index/_foot.html.haml +10 -0
  133. data/app/views/admin/shop/products/index/_head.html.haml +4 -0
  134. data/app/views/admin/shop/products/index/_product.html.haml +18 -10
  135. data/app/views/admin/shop/products/index/buttons/_discounts.html.haml +1 -0
  136. data/app/views/admin/shop/products/index/buttons/_packages.html.haml +1 -0
  137. data/app/views/admin/shop/products/index/buttons/_variants.html.haml +1 -0
  138. data/app/views/admin/shop/products/new.html.haml +10 -9
  139. data/app/views/admin/shop/variants/edit.html.haml +11 -0
  140. data/app/views/admin/shop/variants/edit/_foot.html.haml +9 -0
  141. data/app/views/admin/shop/variants/edit/_form.html.haml +13 -0
  142. data/app/views/admin/shop/variants/edit/_head.html.haml +4 -0
  143. data/app/views/admin/shop/variants/edit/_inputs.html.haml +2 -0
  144. data/app/views/admin/shop/variants/edit/_meta.html.haml +8 -0
  145. data/app/views/admin/shop/variants/edit/_parts.html.haml +9 -0
  146. data/app/views/admin/shop/variants/edit/_popups.html.haml +4 -0
  147. data/app/views/admin/shop/variants/edit/inputs/_name.html.haml +3 -0
  148. data/app/views/admin/shop/variants/edit/inputs/_options.html.haml +3 -0
  149. data/app/views/admin/shop/variants/index.html.haml +13 -0
  150. data/app/views/admin/shop/variants/index/_foot.html.haml +4 -0
  151. data/app/views/admin/shop/variants/index/_head.html.haml +4 -0
  152. data/app/views/admin/shop/variants/index/_variant.html.haml +9 -0
  153. data/app/views/admin/shop/variants/new.html.haml +11 -0
  154. data/app/views/admin/shop/variants/remove.html.haml +12 -0
  155. data/config/locales/en.yml +8 -1
  156. data/config/routes.rb +11 -22
  157. data/db/migrate/20100929011106_fix_relationship_foreign_keys.rb +101 -0
  158. data/db/migrate/20100929011607_drop_shop_addressables.rb +25 -0
  159. data/db/migrate/20100929030510_create_shop_groups.rb +19 -0
  160. data/db/migrate/20100929080301_shop_groups_change_add_description.rb +11 -0
  161. data/db/migrate/20100929081200_create_variants.rb +20 -0
  162. data/db/migrate/20100929143531_change_variants_add_updated_by.rb +25 -0
  163. data/db/migrate/20100929145641_change_created_by_to_id.rb +75 -0
  164. data/db/migrate/20100929235221_change_category_add_variant_id.rb +9 -0
  165. data/db/migrate/20100930235221_create_packages.rb +31 -0
  166. data/db/migrate/20101005231713_create_page_ids.rb +11 -0
  167. data/db/migrate/20101006051214_create_pages_for_products_and_categories.rb +73 -0
  168. data/db/migrate/20101007111845_add_default_position_to_attachment.rb +9 -0
  169. data/lib/shop/controllers/application_controller.rb +1 -1
  170. data/lib/shop/interface/categories.rb +29 -0
  171. data/lib/shop/interface/customers.rb +15 -15
  172. data/lib/shop/interface/orders.rb +34 -0
  173. data/lib/shop/interface/packages.rb +34 -0
  174. data/lib/shop/interface/products.rb +18 -31
  175. data/lib/shop/interface/variants.rb +34 -0
  176. data/lib/shop/models/form_extension.rb +23 -0
  177. data/lib/shop/models/page.rb +3 -2
  178. data/lib/shop/tags/address.rb +3 -3
  179. data/lib/shop/tags/cart.rb +12 -16
  180. data/lib/shop/tags/category.rb +4 -6
  181. data/lib/shop/tags/helpers.rb +131 -30
  182. data/lib/shop/tags/item.rb +16 -33
  183. data/lib/shop/tags/package.rb +95 -0
  184. data/lib/shop/tags/product.rb +11 -16
  185. data/lib/shop/tags/product_variant.rb +52 -0
  186. data/mockups/discounts/new-edit.bmml +492 -0
  187. data/public/javascripts/admin/extensions/shop/edit.js +20 -0
  188. data/public/javascripts/admin/extensions/shop/packages/edit.js +109 -0
  189. data/public/javascripts/admin/extensions/shop/products/edit.js +64 -65
  190. data/public/javascripts/admin/extensions/shop/products/index.js +31 -36
  191. data/public/stylesheets/sass/admin/extensions/shop/edit.sass +58 -11
  192. data/public/stylesheets/sass/admin/extensions/shop/index.sass +104 -53
  193. data/public/stylesheets/sass/admin/extensions/shop/packages/edit.sass +162 -0
  194. data/public/stylesheets/sass/admin/extensions/shop/products/edit.sass +115 -36
  195. data/public/stylesheets/sass/admin/extensions/shop/products/index.sass +12 -20
  196. data/radiant-shop-extension.gemspec +182 -38
  197. data/shop_extension.rb +29 -25
  198. data/spec/controllers/admin/shop/categories_controller_spec.rb +76 -191
  199. data/spec/controllers/admin/shop/customers_controller_spec.rb +67 -0
  200. data/spec/controllers/admin/shop/orders_controller_spec.rb +85 -0
  201. data/spec/controllers/admin/shop/packages/packings_controller_spec.rb +188 -0
  202. data/spec/controllers/admin/shop/packages_controller_spec.rb +32 -0
  203. data/spec/controllers/admin/shop/products/images_controller_spec.rb +10 -15
  204. data/spec/controllers/admin/shop/products/variant_templates_controller_spec.rb +53 -0
  205. data/spec/controllers/admin/shop/products/variants_controller_spec.rb +116 -0
  206. data/spec/controllers/admin/shop/products_controller_spec.rb +80 -148
  207. data/spec/controllers/admin/shop/variants_controller_spec.rb +67 -0
  208. data/spec/datasets/forms.rb +23 -8
  209. data/spec/datasets/shop_addresses.rb +1 -4
  210. data/spec/datasets/shop_categories.rb +25 -4
  211. data/spec/datasets/shop_groups.rb +15 -0
  212. data/spec/datasets/shop_line_items.rb +4 -3
  213. data/spec/datasets/shop_orders.rb +6 -15
  214. data/spec/datasets/shop_packages.rb +25 -0
  215. data/spec/datasets/shop_payments.rb +12 -0
  216. data/spec/datasets/{images.rb → shop_product_attachments.rb} +9 -1
  217. data/spec/datasets/shop_product_variants.rb +22 -0
  218. data/spec/datasets/shop_products.rb +28 -18
  219. data/spec/datasets/shop_variants.rb +17 -0
  220. data/spec/lib/shop/models/image_spec.rb +4 -4
  221. data/spec/lib/shop/tags/address_spec.rb +3 -3
  222. data/spec/lib/shop/tags/cart_spec.rb +32 -43
  223. data/spec/lib/shop/tags/category_spec.rb +58 -93
  224. data/spec/lib/shop/tags/helpers_spec.rb +162 -69
  225. data/spec/lib/shop/tags/item_spec.rb +116 -158
  226. data/spec/lib/shop/tags/package_spec.rb +342 -0
  227. data/spec/lib/shop/tags/product_spec.rb +29 -26
  228. data/spec/lib/shop/tags/product_variant_spec.rb +175 -0
  229. data/spec/models/form_address_spec.rb +166 -0
  230. data/spec/models/form_checkout_spec.rb +27 -157
  231. data/spec/models/shop_address_spec.rb +81 -0
  232. data/spec/models/shop_category_spec.rb +114 -31
  233. data/spec/models/shop_customer_spec.rb +105 -0
  234. data/spec/models/shop_group_spec.rb +38 -0
  235. data/spec/models/shop_line_item_spec.rb +5 -5
  236. data/spec/models/shop_order_spec.rb +89 -83
  237. data/spec/models/shop_package_spec.rb +117 -0
  238. data/spec/models/shop_packing_spec.rb +67 -0
  239. data/spec/models/shop_payment_spec.rb +19 -0
  240. data/spec/models/shop_product_attachment_spec.rb +4 -3
  241. data/spec/models/shop_product_spec.rb +171 -92
  242. data/spec/models/shop_product_variant_spec.rb +92 -0
  243. data/spec/models/shop_variant_spec.rb +47 -0
  244. metadata +183 -39
  245. data/app/controllers/shop/categories_controller.rb +0 -45
  246. data/app/controllers/shop/line_items_controller.rb +0 -165
  247. data/app/controllers/shop/orders_controller.rb +0 -16
  248. data/app/controllers/shop/products_controller.rb +0 -48
  249. data/app/models/shop_addressable.rb +0 -11
  250. data/app/views/admin/shop/categories/edit/_fields.html.haml +0 -28
  251. data/app/views/admin/shop/categories/edit/_part.html.haml +0 -3
  252. data/app/views/admin/shop/categories/edit/_popup.html.haml +0 -3
  253. data/app/views/admin/shop/customers/edit/_fields.html.haml +0 -33
  254. data/app/views/admin/shop/customers/index/_bottom.html.haml +0 -4
  255. data/app/views/admin/shop/products/edit/_fields.html.haml +0 -38
  256. data/app/views/admin/shop/products/edit/_part.html.haml +0 -3
  257. data/app/views/admin/shop/products/edit/_popup.html.haml +0 -3
  258. data/app/views/admin/shop/products/index/_bottom.html.haml +0 -5
  259. data/spec/controllers/shop/categories_controller_spec.rb +0 -42
  260. data/spec/controllers/shop/line_items_controller_spec.rb +0 -256
  261. data/spec/controllers/shop/orders_controller_specs.rb +0 -37
  262. data/spec/controllers/shop/products_controller_spec.rb +0 -51
  263. data/vendor/plugins/json_fields/.gitignore +0 -3
  264. data/vendor/plugins/json_fields/MIT-LICENSE +0 -20
  265. data/vendor/plugins/json_fields/README.rdoc +0 -65
  266. data/vendor/plugins/json_fields/Rakefile +0 -55
  267. data/vendor/plugins/json_fields/init.rb +0 -2
  268. data/vendor/plugins/json_fields/lib/json_fields.rb +0 -99
  269. data/vendor/plugins/json_fields/spec/lib/json_fields_spec.rb +0 -124
  270. data/vendor/plugins/json_fields/spec/spec.opts +0 -6
  271. data/vendor/plugins/json_fields/spec/spec_helper.rb +0 -29
  272. data/vendor/plugins/json_fields/spec/test_models.rb +0 -12
@@ -0,0 +1,95 @@
1
+ module Shop
2
+ module Tags
3
+ module Package
4
+ include Radiant::Taggable
5
+ include ActionView::Helpers::NumberHelper
6
+
7
+ tag 'shop:packages' do |tag|
8
+ tag.locals.shop_packages = Helpers.current_packages(tag)
9
+ tag.expand
10
+ end
11
+
12
+ desc %{ expands if there are packages within the context }
13
+ tag 'shop:packages:if_packages' do |tag|
14
+ tag.expand if tag.locals.shop_packages.present?
15
+ end
16
+
17
+ desc %{ expands if there are no packages within the context }
18
+ tag 'shop:packages:unless_packages' do |tag|
19
+ tag.expand unless tag.locals.shop_packages.present?
20
+ end
21
+
22
+ desc %{ iterates through each package within the scope }
23
+ tag 'shop:packages:each' do |tag|
24
+ content = ''
25
+
26
+ tag.locals.shop_packages.each do |package|
27
+ tag.locals.shop_package = package
28
+ content << tag.expand
29
+ end
30
+
31
+ content
32
+ end
33
+
34
+ tag 'shop:package' do |tag|
35
+ tag.locals.shop_package = Helpers.current_package(tag)
36
+ tag.expand unless tag.locals.shop_package.nil?
37
+ end
38
+
39
+ [:id, :name, :sku].each do |symbol|
40
+ desc %{ outputs the #{symbol} of the current package }
41
+ tag "shop:package:#{symbol}" do |tag|
42
+ tag.locals.shop_package.send(symbol)
43
+ end
44
+ end
45
+
46
+ desc %{ outputs the description of the current packaage}
47
+ tag "shop:package:description" do |tag|
48
+ parse(TextileFilter.filter(tag.locals.shop_package.description))
49
+ end
50
+
51
+ [:price, :value].each do |symbol|
52
+ desc %{ output #{symbol} of product }
53
+ tag "shop:package:#{symbol}" do |tag|
54
+ attr = tag.attr.symbolize_keys
55
+ package = tag.locals.shop_package
56
+
57
+ Helpers.currency(package.send(symbol),attr)
58
+ end
59
+ end
60
+
61
+ desc %{ expands if the package has products }
62
+ tag 'shop:package:if_products' do |tag|
63
+ tag.expand unless tag.locals.shop_package.products.empty?
64
+ end
65
+
66
+ desc %{ expands if the package do not have products }
67
+ tag 'shop:package:unless_products' do |tag|
68
+ tag.expand if tag.locals.shop_package.products.empty?
69
+ end
70
+
71
+ tag 'shop:package:products' do |tag|
72
+ tag.expand
73
+ end
74
+
75
+ desc %{ iterates through each of the products images }
76
+ tag 'shop:package:products:each' do |tag|
77
+ content = ''
78
+
79
+ tag.locals.shop_package.packings.each do |packing|
80
+ tag.locals.shop_product = packing.product
81
+ tag.locals.shop_packing = packing
82
+ content << tag.expand
83
+ end
84
+
85
+ content
86
+ end
87
+
88
+ desc %{ outputs the quantity of the current packing }
89
+ tag 'shop:package:product:quantity' do |tag|
90
+ tag.locals.shop_packing.quantity
91
+ end
92
+
93
+ end
94
+ end
95
+ end
@@ -2,17 +2,6 @@ module Shop
2
2
  module Tags
3
3
  module Product
4
4
  include Radiant::Taggable
5
- include ActionView::Helpers::NumberHelper
6
-
7
- desc %{ expands if there are products within the context }
8
- tag 'shop:if_products' do |tag|
9
- tag.expand unless Helpers.current_products(tag).empty?
10
- end
11
-
12
- desc %{ expands if there are no products within the context }
13
- tag 'shop:unless_products' do |tag|
14
- tag.expand if Helpers.current_products(tag).empty?
15
- end
16
5
 
17
6
  tag 'shop:products' do |tag|
18
7
  tag.locals.shop_products = Helpers.current_products(tag)
@@ -20,6 +9,16 @@ module Shop
20
9
  tag.expand
21
10
  end
22
11
 
12
+ desc %{ expands if there are products within the context }
13
+ tag 'shop:products:if_products' do |tag|
14
+ tag.expand unless tag.locals.shop_products.empty?
15
+ end
16
+
17
+ desc %{ expands if there are no products within the context }
18
+ tag 'shop:products:unless_products' do |tag|
19
+ tag.expand if tag.locals.shop_products.empty?
20
+ end
21
+
23
22
  desc %{ iterates through each product within the scope }
24
23
  tag 'shop:products:each' do |tag|
25
24
  content = ''
@@ -70,11 +69,7 @@ module Shop
70
69
  tag 'shop:product:price' do |tag|
71
70
  attr = tag.attr.symbolize_keys
72
71
 
73
- number_to_currency(tag.locals.shop_product.price,
74
- :precision =>(attr[:precision] || Radiant::Config['shop.price_precision']).to_i,
75
- :unit => attr[:unit] || Radiant::Config['shop.price_unit'],
76
- :separator => attr[:separator] || Radiant::Config['shop.price_seperator'],
77
- :delimiter => attr[:delimiter] || Radiant::Config['shop.price_delimiter'])
72
+ Helpers.currency(tag.locals.shop_product.price,attr)
78
73
  end
79
74
 
80
75
  tag 'shop:product:images' do |tag|
@@ -0,0 +1,52 @@
1
+ module Shop
2
+ module Tags
3
+ module ProductVariant
4
+ include Radiant::Taggable
5
+
6
+ tag 'shop:product:variants' do |tag|
7
+ tag.locals.shop_product_variants = Helpers.current_product_variants(tag)
8
+
9
+ tag.expand
10
+ end
11
+
12
+ tag 'shop:product:variants:if_variants' do |tag|
13
+ tag.expand if tag.locals.shop_product_variants.present?
14
+ end
15
+
16
+ tag 'shop:product:variants:unless_variants' do |tag|
17
+ tag.expand if tag.locals.shop_product_variants.empty?
18
+ end
19
+
20
+ tag 'shop:product:variants:each' do |tag|
21
+ content = ''
22
+
23
+ tag.locals.shop_product_variants.each do |variant|
24
+ tag.locals.shop_product_variant = variant
25
+ content << tag.expand
26
+ end
27
+
28
+ content
29
+ end
30
+
31
+ tag 'shop:product:variant' do |tag|
32
+ tag.locals.shop_product_variant = Helpers.current_product_variant(tag)
33
+ tag.expand if tag.locals.shop_product_variant.present?
34
+ end
35
+
36
+ [:id, :name, :sku].each do |symbol|
37
+ desc %{ outputs the #{symbol} of the current shop variant }
38
+ tag "shop:product:variant:#{symbol}" do |tag|
39
+ tag.locals.shop_product_variant.send(symbol)
40
+ end
41
+ end
42
+
43
+ desc %{ output price of variant }
44
+ tag 'shop:product:variant:price' do |tag|
45
+ attr = tag.attr.symbolize_keys
46
+
47
+ Helpers.currency(tag.locals.shop_product_variant.price,attr)
48
+ end
49
+
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,492 @@
1
+ <mockup version="1.0" skin="sketch" measuredW="2141" measuredH="909" mockupW="2100" mockupH="867">
2
+ <controls>
3
+ <control controlID="0" controlTypeID="com.balsamiq.mockups::BrowserWindow" x="31" y="32" w="1024" h="732" measuredW="450" measuredH="400" zOrder="0" locked="false" isInGroup="-1">
4
+ <controlProperties>
5
+ <text>A%20Web%20Page%0Ahttp%3A//admin/shop/discounts/new</text>
6
+ </controlProperties>
7
+ </control>
8
+ <control controlID="1" controlTypeID="com.balsamiq.mockups::TextInput" x="78" y="290" w="930" h="-1" measuredW="118" measuredH="36" zOrder="3" locked="false" isInGroup="-1">
9
+ <controlProperties>
10
+ <size>20</size>
11
+ <text>Free%20Friday</text>
12
+ </controlProperties>
13
+ </control>
14
+ <control controlID="2" controlTypeID="com.balsamiq.mockups::Label" x="78" y="267" w="-1" h="-1" measuredW="38" measuredH="23" zOrder="4" locked="false" isInGroup="-1">
15
+ <controlProperties>
16
+ <text>Name</text>
17
+ </controlProperties>
18
+ </control>
19
+ <control controlID="3" controlTypeID="com.balsamiq.mockups::TextInput" x="78" y="364" w="930" h="-1" measuredW="79" measuredH="36" zOrder="6" locked="false" isInGroup="-1">
20
+ <controlProperties>
21
+ <size>20</size>
22
+ <text/>
23
+ </controlProperties>
24
+ </control>
25
+ <control controlID="4" controlTypeID="com.balsamiq.mockups::Label" x="78" y="341" w="-1" h="-1" measuredW="71" measuredH="23" zOrder="7" locked="false" isInGroup="-1">
26
+ <controlProperties>
27
+ <text>Discount%20%25</text>
28
+ </controlProperties>
29
+ </control>
30
+ <control controlID="6" controlTypeID="com.balsamiq.mockups::TextInput" x="78" y="438" w="930" h="-1" measuredW="79" measuredH="36" zOrder="8" locked="false" isInGroup="-1">
31
+ <controlProperties>
32
+ <size>20</size>
33
+ <text/>
34
+ </controlProperties>
35
+ </control>
36
+ <control controlID="7" controlTypeID="com.balsamiq.mockups::Label" x="78" y="415" w="-1" h="-1" measuredW="85" measuredH="23" zOrder="9" locked="false" isInGroup="-1">
37
+ <controlProperties>
38
+ <text>Voucher%20Code</text>
39
+ </controlProperties>
40
+ </control>
41
+ <control controlID="8" controlTypeID="com.balsamiq.mockups::Canvas" x="78" y="471" w="87" h="27" measuredW="100" measuredH="70" zOrder="10" locked="false" isInGroup="-1">
42
+ <controlProperties>
43
+ <color>5263440</color>
44
+ </controlProperties>
45
+ </control>
46
+ <control controlID="9" controlTypeID="com.balsamiq.mockups::Label" x="80" y="474" w="85" h="19" measuredW="27" measuredH="19" zOrder="11" locked="false" isInGroup="-1">
47
+ <controlProperties>
48
+ <align>center</align>
49
+ <color>16777215</color>
50
+ <size>10</size>
51
+ <text>more</text>
52
+ </controlProperties>
53
+ </control>
54
+ <control controlID="10" controlTypeID="com.balsamiq.mockups::Canvas" x="78" y="662" w="930" h="49" measuredW="100" measuredH="70" zOrder="12" locked="false" isInGroup="-1"/>
55
+ <control controlID="12" controlTypeID="com.balsamiq.mockups::Button" x="88" y="672" w="-1" h="-1" measuredW="52" measuredH="28" zOrder="13" locked="false" isInGroup="-1">
56
+ <controlProperties>
57
+ <text>Save</text>
58
+ </controlProperties>
59
+ </control>
60
+ <control controlID="13" controlTypeID="com.balsamiq.mockups::Button" x="155" y="672" w="193" h="28" measuredW="179" measuredH="28" zOrder="14" locked="false" isInGroup="-1">
61
+ <controlProperties>
62
+ <text>Save%20and%20Continue%20Editing</text>
63
+ </controlProperties>
64
+ </control>
65
+ <control controlID="14" controlTypeID="com.balsamiq.mockups::Link" x="358" y="675" w="-1" h="-1" measuredW="42" measuredH="23" zOrder="15" locked="false" isInGroup="-1">
66
+ <controlProperties>
67
+ <text>cancel</text>
68
+ </controlProperties>
69
+ </control>
70
+ <control controlID="16" controlTypeID="com.balsamiq.mockups::TabBar" x="38" y="113" w="1017" h="625" measuredW="364" measuredH="100" zOrder="2" locked="false" isInGroup="-1">
71
+ <controlProperties>
72
+ <selectedIndex>3</selectedIndex>
73
+ <size>18</size>
74
+ <text>content%2C%20Design%2C%20Settings%2C%20Shop</text>
75
+ </controlProperties>
76
+ </control>
77
+ <control controlID="20" controlTypeID="com.balsamiq.mockups::Canvas" x="36" y="101" w="1019" h="637" measuredW="100" measuredH="70" zOrder="1" locked="false" isInGroup="-1">
78
+ <controlProperties>
79
+ <color>10027008</color>
80
+ </controlProperties>
81
+ </control>
82
+ <control controlID="21" controlTypeID="com.balsamiq.mockups::Canvas" x="38" y="185" w="1017" h="49" measuredW="100" measuredH="70" zOrder="16" locked="false" isInGroup="-1">
83
+ <controlProperties>
84
+ <color>5263440</color>
85
+ </controlProperties>
86
+ </control>
87
+ <control controlID="22" controlTypeID="com.balsamiq.mockups::Button" x="771" y="195" w="111" h="28" measuredW="79" measuredH="28" zOrder="17" locked="false" isInGroup="-1">
88
+ <controlProperties>
89
+ <color>16777215</color>
90
+ <text>Packages</text>
91
+ </controlProperties>
92
+ </control>
93
+ <control controlID="23" controlTypeID="com.balsamiq.mockups::Button" x="645" y="195" w="111" h="28" measuredW="74" measuredH="28" zOrder="18" locked="false" isInGroup="-1">
94
+ <controlProperties>
95
+ <color>16777215</color>
96
+ <text>Variants</text>
97
+ </controlProperties>
98
+ </control>
99
+ <control controlID="24" controlTypeID="com.balsamiq.mockups::Button" x="897" y="195" w="111" h="28" measuredW="80" measuredH="28" zOrder="19" locked="false" isInGroup="-1">
100
+ <controlProperties>
101
+ <color>13421772</color>
102
+ <text>Discounts</text>
103
+ </controlProperties>
104
+ </control>
105
+ <control controlID="28" controlTypeID="com.balsamiq.mockups::VRule" x="262" y="145" w="-1" h="40" measuredW="5" measuredH="100" zOrder="20" locked="false" isInGroup="-1"/>
106
+ <control controlID="29" controlTypeID="com.balsamiq.mockups::VRule" x="384" y="145" w="-1" h="40" measuredW="5" measuredH="100" zOrder="21" locked="false" isInGroup="-1"/>
107
+ <control controlID="30" controlTypeID="com.balsamiq.mockups::Label" x="38" y="150" w="117" h="29" measuredW="77" measuredH="29" zOrder="22" locked="false" isInGroup="-1">
108
+ <controlProperties>
109
+ <align>center</align>
110
+ <size>18</size>
111
+ <text>Products</text>
112
+ </controlProperties>
113
+ </control>
114
+ <control controlID="31" controlTypeID="com.balsamiq.mockups::Label" x="155" y="150" w="109" h="29" measuredW="60" measuredH="29" zOrder="23" locked="false" isInGroup="-1">
115
+ <controlProperties>
116
+ <align>center</align>
117
+ <size>18</size>
118
+ <text>Orders</text>
119
+ </controlProperties>
120
+ </control>
121
+ <control controlID="32" controlTypeID="com.balsamiq.mockups::Label" x="262" y="150" w="122" h="29" measuredW="90" measuredH="29" zOrder="24" locked="false" isInGroup="-1">
122
+ <controlProperties>
123
+ <align>center</align>
124
+ <size>18</size>
125
+ <text>Customers</text>
126
+ </controlProperties>
127
+ </control>
128
+ <control controlID="33" controlTypeID="com.balsamiq.mockups::Canvas" x="38" y="141" w="117" h="44" measuredW="100" measuredH="70" zOrder="5" locked="false" isInGroup="-1">
129
+ <controlProperties>
130
+ <borderStyle>none</borderStyle>
131
+ <color>13421772</color>
132
+ </controlProperties>
133
+ </control>
134
+ <control controlID="34" controlTypeID="com.balsamiq.mockups::TabBar" x="78" y="517" w="930" h="124" measuredW="167" measuredH="100" zOrder="25" locked="false" isInGroup="-1">
135
+ <controlProperties>
136
+ <selectedIndex>0</selectedIndex>
137
+ <text>categories</text>
138
+ </controlProperties>
139
+ </control>
140
+ <control controlID="35" controlTypeID="com.balsamiq.mockups::CheckBoxGroup" x="95" y="558" w="899" h="115" measuredW="80" measuredH="69" zOrder="26" locked="false" isInGroup="-1">
141
+ <controlProperties>
142
+ <text>%5B%20%5D%20books%0A%5Bx%5D%20movies%0A%5B%20%5D%20figurines</text>
143
+ </controlProperties>
144
+ </control>
145
+ <control controlID="36" controlTypeID="com.balsamiq.mockups::BrowserWindow" x="1107" y="32" w="1024" h="867" measuredW="450" measuredH="400" zOrder="27" locked="false" isInGroup="-1">
146
+ <controlProperties>
147
+ <text>A%20Web%20Page%0Ahttp%3A//admin/shop/discounts/1/edit</text>
148
+ </controlProperties>
149
+ </control>
150
+ <control controlID="37" controlTypeID="com.balsamiq.mockups::Canvas" x="1112" y="101" w="1019" h="766" measuredW="100" measuredH="70" zOrder="28" locked="false" isInGroup="-1">
151
+ <controlProperties>
152
+ <color>10027008</color>
153
+ </controlProperties>
154
+ </control>
155
+ <control controlID="38" controlTypeID="com.balsamiq.mockups::TabBar" x="1114" y="113" w="1017" h="758" measuredW="364" measuredH="100" zOrder="29" locked="false" isInGroup="-1">
156
+ <controlProperties>
157
+ <selectedIndex>3</selectedIndex>
158
+ <size>18</size>
159
+ <text>content%2C%20Design%2C%20Settings%2C%20Shop</text>
160
+ </controlProperties>
161
+ </control>
162
+ <control controlID="39" controlTypeID="com.balsamiq.mockups::TextInput" x="1154" y="290" w="930" h="-1" measuredW="118" measuredH="36" zOrder="30" locked="false" isInGroup="-1">
163
+ <controlProperties>
164
+ <size>20</size>
165
+ <text>Free%20Friday</text>
166
+ </controlProperties>
167
+ </control>
168
+ <control controlID="40" controlTypeID="com.balsamiq.mockups::Label" x="1154" y="267" w="-1" h="-1" measuredW="40" measuredH="24" zOrder="31" locked="false" isInGroup="-1">
169
+ <controlProperties>
170
+ <text>Name</text>
171
+ </controlProperties>
172
+ </control>
173
+ <control controlID="41" controlTypeID="com.balsamiq.mockups::Canvas" x="1114" y="141" w="117" h="44" measuredW="100" measuredH="70" zOrder="32" locked="false" isInGroup="-1">
174
+ <controlProperties>
175
+ <borderStyle>none</borderStyle>
176
+ <color>13421772</color>
177
+ </controlProperties>
178
+ </control>
179
+ <control controlID="42" controlTypeID="com.balsamiq.mockups::TextInput" x="1154" y="364" w="930" h="-1" measuredW="36" measuredH="36" zOrder="33" locked="false" isInGroup="-1">
180
+ <controlProperties>
181
+ <size>20</size>
182
+ <text>25</text>
183
+ </controlProperties>
184
+ </control>
185
+ <control controlID="43" controlTypeID="com.balsamiq.mockups::Label" x="1154" y="341" w="-1" h="-1" measuredW="74" measuredH="24" zOrder="34" locked="false" isInGroup="-1">
186
+ <controlProperties>
187
+ <text>Discount%20%25</text>
188
+ </controlProperties>
189
+ </control>
190
+ <control controlID="44" controlTypeID="com.balsamiq.mockups::TextInput" x="1154" y="438" w="930" h="-1" measuredW="54" measuredH="36" zOrder="35" locked="false" isInGroup="-1">
191
+ <controlProperties>
192
+ <size>20</size>
193
+ <text>ff25</text>
194
+ </controlProperties>
195
+ </control>
196
+ <control controlID="45" controlTypeID="com.balsamiq.mockups::Label" x="1154" y="415" w="-1" h="-1" measuredW="89" measuredH="24" zOrder="36" locked="false" isInGroup="-1">
197
+ <controlProperties>
198
+ <text>Voucher%20Code</text>
199
+ </controlProperties>
200
+ </control>
201
+ <control controlID="46" controlTypeID="com.balsamiq.mockups::Canvas" x="1154" y="573" w="87" h="27" measuredW="100" measuredH="70" zOrder="37" locked="false" isInGroup="-1">
202
+ <controlProperties>
203
+ <color>5263440</color>
204
+ </controlProperties>
205
+ </control>
206
+ <control controlID="47" controlTypeID="com.balsamiq.mockups::Label" x="1156" y="576" w="85" h="19" measuredW="30" measuredH="20" zOrder="38" locked="false" isInGroup="-1">
207
+ <controlProperties>
208
+ <align>center</align>
209
+ <color>16777215</color>
210
+ <size>10</size>
211
+ <text>more</text>
212
+ </controlProperties>
213
+ </control>
214
+ <control controlID="48" controlTypeID="com.balsamiq.mockups::Canvas" x="1154" y="793" w="930" h="49" measuredW="100" measuredH="70" zOrder="39" locked="false" isInGroup="-1"/>
215
+ <control controlID="49" controlTypeID="com.balsamiq.mockups::Button" x="1164" y="803" w="-1" h="-1" measuredW="53" measuredH="28" zOrder="40" locked="false" isInGroup="-1">
216
+ <controlProperties>
217
+ <text>Save</text>
218
+ </controlProperties>
219
+ </control>
220
+ <control controlID="50" controlTypeID="com.balsamiq.mockups::Button" x="1231" y="803" w="193" h="28" measuredW="185" measuredH="28" zOrder="41" locked="false" isInGroup="-1">
221
+ <controlProperties>
222
+ <text>Save%20and%20Continue%20Editing</text>
223
+ </controlProperties>
224
+ </control>
225
+ <control controlID="51" controlTypeID="com.balsamiq.mockups::Link" x="1434" y="806" w="-1" h="-1" measuredW="45" measuredH="24" zOrder="42" locked="false" isInGroup="-1">
226
+ <controlProperties>
227
+ <text>cancel</text>
228
+ </controlProperties>
229
+ </control>
230
+ <control controlID="52" controlTypeID="com.balsamiq.mockups::Canvas" x="1114" y="185" w="1017" h="49" measuredW="100" measuredH="70" zOrder="43" locked="false" isInGroup="-1">
231
+ <controlProperties>
232
+ <color>5263440</color>
233
+ </controlProperties>
234
+ </control>
235
+ <control controlID="53" controlTypeID="com.balsamiq.mockups::Button" x="1852" y="195" w="111" h="28" measuredW="84" measuredH="28" zOrder="44" locked="false" isInGroup="-1">
236
+ <controlProperties>
237
+ <color>16777215</color>
238
+ <text>Packages</text>
239
+ </controlProperties>
240
+ </control>
241
+ <control controlID="54" controlTypeID="com.balsamiq.mockups::Button" x="1726" y="195" w="111" h="28" measuredW="78" measuredH="28" zOrder="45" locked="false" isInGroup="-1">
242
+ <controlProperties>
243
+ <color>16777215</color>
244
+ <text>Variants</text>
245
+ </controlProperties>
246
+ </control>
247
+ <control controlID="55" controlTypeID="com.balsamiq.mockups::Button" x="1973" y="195" w="111" h="28" measuredW="82" measuredH="28" zOrder="46" locked="false" isInGroup="-1">
248
+ <controlProperties>
249
+ <color>13421772</color>
250
+ <text>Discounts</text>
251
+ </controlProperties>
252
+ </control>
253
+ <control controlID="56" controlTypeID="com.balsamiq.mockups::VRule" x="1338" y="145" w="-1" h="40" measuredW="5" measuredH="100" zOrder="47" locked="false" isInGroup="-1"/>
254
+ <control controlID="57" controlTypeID="com.balsamiq.mockups::VRule" x="1460" y="145" w="-1" h="40" measuredW="5" measuredH="100" zOrder="48" locked="false" isInGroup="-1"/>
255
+ <control controlID="58" controlTypeID="com.balsamiq.mockups::Label" x="1114" y="150" w="117" h="29" measuredW="77" measuredH="29" zOrder="49" locked="false" isInGroup="-1">
256
+ <controlProperties>
257
+ <align>center</align>
258
+ <size>18</size>
259
+ <text>Products</text>
260
+ </controlProperties>
261
+ </control>
262
+ <control controlID="59" controlTypeID="com.balsamiq.mockups::Label" x="1231" y="150" w="109" h="29" measuredW="60" measuredH="29" zOrder="50" locked="false" isInGroup="-1">
263
+ <controlProperties>
264
+ <align>center</align>
265
+ <size>18</size>
266
+ <text>Orders</text>
267
+ </controlProperties>
268
+ </control>
269
+ <control controlID="60" controlTypeID="com.balsamiq.mockups::Label" x="1338" y="150" w="122" h="29" measuredW="87" measuredH="29" zOrder="51" locked="false" isInGroup="-1">
270
+ <controlProperties>
271
+ <align>center</align>
272
+ <size>18</size>
273
+ <text>Customers</text>
274
+ </controlProperties>
275
+ </control>
276
+ <control controlID="61" controlTypeID="com.balsamiq.mockups::TabBar" x="1154" y="626" w="930" h="138" measuredW="167" measuredH="100" zOrder="52" locked="false" isInGroup="-1">
277
+ <controlProperties>
278
+ <selectedIndex>0</selectedIndex>
279
+ <text>categories</text>
280
+ </controlProperties>
281
+ </control>
282
+ <control controlID="62" controlTypeID="com.balsamiq.mockups::CheckBoxGroup" x="1171" y="672" w="899" h="77" measuredW="83" measuredH="72" zOrder="53" locked="false" isInGroup="-1">
283
+ <controlProperties>
284
+ <text>%5B%20%5D%20books%0A%5Bx%5D%20movies%0A%5B%20%5D%20figurines</text>
285
+ </controlProperties>
286
+ </control>
287
+ <control controlID="63" controlTypeID="com.balsamiq.mockups::Canvas" x="1155" y="470" w="930" h="105" measuredW="100" measuredH="70" zOrder="54" locked="false" isInGroup="-1">
288
+ <controlProperties>
289
+ <color>5263440</color>
290
+ </controlProperties>
291
+ </control>
292
+ <control controlID="64" controlTypeID="com.balsamiq.mockups::Label" x="1171" y="483" w="100" h="24" measuredW="74" measuredH="24" zOrder="55" locked="false" isInGroup="-1">
293
+ <controlProperties>
294
+ <color>16777215</color>
295
+ <text>Start%20Date</text>
296
+ </controlProperties>
297
+ </control>
298
+ <control controlID="65" controlTypeID="com.balsamiq.mockups::Label" x="1171" y="533" w="100" h="24" measuredW="63" measuredH="24" zOrder="56" locked="false" isInGroup="-1">
299
+ <controlProperties>
300
+ <color>16777215</color>
301
+ <text>End%20Date</text>
302
+ </controlProperties>
303
+ </control>
304
+ <control controlID="66" controlTypeID="com.balsamiq.mockups::TextInput" x="1258" y="481" w="186" h="-1" measuredW="79" measuredH="28" zOrder="57" locked="false" isInGroup="-1">
305
+ <controlProperties>
306
+ <size>13</size>
307
+ <text/>
308
+ </controlProperties>
309
+ </control>
310
+ <control controlID="67" controlTypeID="com.balsamiq.mockups::TextInput" x="1258" y="531" w="186" h="-1" measuredW="79" measuredH="28" zOrder="58" locked="false" isInGroup="-1">
311
+ <controlProperties>
312
+ <size>13</size>
313
+ <text/>
314
+ </controlProperties>
315
+ </control>
316
+ <control controlID="68" controlTypeID="com.balsamiq.mockups::Icon" x="1447" y="479" w="-1" h="-1" measuredW="32" measuredH="32" zOrder="59" locked="false" isInGroup="-1">
317
+ <controlProperties>
318
+ <color>0</color>
319
+ <icon>CalendarIcon%7Cmedium</icon>
320
+ </controlProperties>
321
+ </control>
322
+ <control controlID="69" controlTypeID="com.balsamiq.mockups::Icon" x="1446" y="529" w="-1" h="-1" measuredW="32" measuredH="32" zOrder="60" locked="false" isInGroup="-1">
323
+ <controlProperties>
324
+ <color>0</color>
325
+ <icon>CalendarIcon%7Cmedium</icon>
326
+ </controlProperties>
327
+ </control>
328
+ <control controlID="70" controlTypeID="com.balsamiq.mockups::Label" x="75" y="194" w="-1" h="-1" measuredW="112" measuredH="29" zOrder="61" locked="false" isInGroup="-1">
329
+ <controlProperties>
330
+ <color>16777215</color>
331
+ <size>18</size>
332
+ <text>New%20Product</text>
333
+ </controlProperties>
334
+ </control>
335
+ <control controlID="71" controlTypeID="com.balsamiq.mockups::Label" x="1154" y="194" w="-1" h="-1" measuredW="96" measuredH="29" zOrder="62" locked="false" isInGroup="-1">
336
+ <controlProperties>
337
+ <color>16777215</color>
338
+ <size>18</size>
339
+ <text>Free%20Friday</text>
340
+ </controlProperties>
341
+ </control>
342
+ <control controlID="72" controlTypeID="com.balsamiq.mockups::BrowserWindow" x="51" y="52" w="1024" h="732" measuredW="450" measuredH="400" zOrder="63" locked="false" isInGroup="-1">
343
+ <controlProperties>
344
+ <text>A%20Web%20Page%0Ahttp%3A//admin/shop/discounts/new</text>
345
+ </controlProperties>
346
+ </control>
347
+ <control controlID="73" controlTypeID="com.balsamiq.mockups::Canvas" x="56" y="121" w="1019" h="637" measuredW="100" measuredH="70" zOrder="64" locked="false" isInGroup="-1">
348
+ <controlProperties>
349
+ <color>10027008</color>
350
+ </controlProperties>
351
+ </control>
352
+ <control controlID="74" controlTypeID="com.balsamiq.mockups::TabBar" x="58" y="133" w="1017" h="625" measuredW="364" measuredH="100" zOrder="65" locked="false" isInGroup="-1">
353
+ <controlProperties>
354
+ <selectedIndex>3</selectedIndex>
355
+ <size>18</size>
356
+ <text>content%2C%20Design%2C%20Settings%2C%20Shop</text>
357
+ </controlProperties>
358
+ </control>
359
+ <control controlID="75" controlTypeID="com.balsamiq.mockups::TextInput" x="98" y="310" w="930" h="-1" measuredW="118" measuredH="36" zOrder="66" locked="false" isInGroup="-1">
360
+ <controlProperties>
361
+ <size>20</size>
362
+ <text>Free%20Friday</text>
363
+ </controlProperties>
364
+ </control>
365
+ <control controlID="76" controlTypeID="com.balsamiq.mockups::Label" x="98" y="287" w="-1" h="-1" measuredW="40" measuredH="24" zOrder="67" locked="false" isInGroup="-1">
366
+ <controlProperties>
367
+ <text>Name</text>
368
+ </controlProperties>
369
+ </control>
370
+ <control controlID="77" controlTypeID="com.balsamiq.mockups::Canvas" x="58" y="161" w="117" h="44" measuredW="100" measuredH="70" zOrder="68" locked="false" isInGroup="-1">
371
+ <controlProperties>
372
+ <borderStyle>none</borderStyle>
373
+ <color>13421772</color>
374
+ </controlProperties>
375
+ </control>
376
+ <control controlID="78" controlTypeID="com.balsamiq.mockups::TextInput" x="98" y="384" w="930" h="-1" measuredW="79" measuredH="36" zOrder="69" locked="false" isInGroup="-1">
377
+ <controlProperties>
378
+ <size>20</size>
379
+ <text/>
380
+ </controlProperties>
381
+ </control>
382
+ <control controlID="79" controlTypeID="com.balsamiq.mockups::Label" x="98" y="361" w="-1" h="-1" measuredW="74" measuredH="24" zOrder="70" locked="false" isInGroup="-1">
383
+ <controlProperties>
384
+ <text>Discount%20%25</text>
385
+ </controlProperties>
386
+ </control>
387
+ <control controlID="80" controlTypeID="com.balsamiq.mockups::TextInput" x="98" y="458" w="930" h="-1" measuredW="79" measuredH="36" zOrder="71" locked="false" isInGroup="-1">
388
+ <controlProperties>
389
+ <size>20</size>
390
+ <text/>
391
+ </controlProperties>
392
+ </control>
393
+ <control controlID="81" controlTypeID="com.balsamiq.mockups::Label" x="98" y="435" w="-1" h="-1" measuredW="89" measuredH="24" zOrder="72" locked="false" isInGroup="-1">
394
+ <controlProperties>
395
+ <text>Voucher%20Code</text>
396
+ </controlProperties>
397
+ </control>
398
+ <control controlID="82" controlTypeID="com.balsamiq.mockups::Canvas" x="98" y="491" w="87" h="27" measuredW="100" measuredH="70" zOrder="73" locked="false" isInGroup="-1">
399
+ <controlProperties>
400
+ <color>5263440</color>
401
+ </controlProperties>
402
+ </control>
403
+ <control controlID="83" controlTypeID="com.balsamiq.mockups::Label" x="100" y="494" w="85" h="19" measuredW="30" measuredH="20" zOrder="74" locked="false" isInGroup="-1">
404
+ <controlProperties>
405
+ <align>center</align>
406
+ <color>16777215</color>
407
+ <size>10</size>
408
+ <text>more</text>
409
+ </controlProperties>
410
+ </control>
411
+ <control controlID="84" controlTypeID="com.balsamiq.mockups::Canvas" x="98" y="682" w="930" h="49" measuredW="100" measuredH="70" zOrder="75" locked="false" isInGroup="-1"/>
412
+ <control controlID="85" controlTypeID="com.balsamiq.mockups::Button" x="108" y="692" w="-1" h="-1" measuredW="53" measuredH="28" zOrder="76" locked="false" isInGroup="-1">
413
+ <controlProperties>
414
+ <text>Save</text>
415
+ </controlProperties>
416
+ </control>
417
+ <control controlID="86" controlTypeID="com.balsamiq.mockups::Button" x="175" y="692" w="193" h="28" measuredW="185" measuredH="28" zOrder="77" locked="false" isInGroup="-1">
418
+ <controlProperties>
419
+ <text>Save%20and%20Continue%20Editing</text>
420
+ </controlProperties>
421
+ </control>
422
+ <control controlID="87" controlTypeID="com.balsamiq.mockups::Link" x="378" y="695" w="-1" h="-1" measuredW="45" measuredH="24" zOrder="78" locked="false" isInGroup="-1">
423
+ <controlProperties>
424
+ <text>cancel</text>
425
+ </controlProperties>
426
+ </control>
427
+ <control controlID="88" controlTypeID="com.balsamiq.mockups::Canvas" x="58" y="205" w="1017" h="49" measuredW="100" measuredH="70" zOrder="79" locked="false" isInGroup="-1">
428
+ <controlProperties>
429
+ <color>5263440</color>
430
+ </controlProperties>
431
+ </control>
432
+ <control controlID="89" controlTypeID="com.balsamiq.mockups::Button" x="791" y="215" w="111" h="28" measuredW="84" measuredH="28" zOrder="80" locked="false" isInGroup="-1">
433
+ <controlProperties>
434
+ <color>16777215</color>
435
+ <text>Packages</text>
436
+ </controlProperties>
437
+ </control>
438
+ <control controlID="90" controlTypeID="com.balsamiq.mockups::Button" x="665" y="215" w="111" h="28" measuredW="78" measuredH="28" zOrder="81" locked="false" isInGroup="-1">
439
+ <controlProperties>
440
+ <color>16777215</color>
441
+ <text>Variants</text>
442
+ </controlProperties>
443
+ </control>
444
+ <control controlID="91" controlTypeID="com.balsamiq.mockups::Button" x="917" y="215" w="111" h="28" measuredW="82" measuredH="28" zOrder="82" locked="false" isInGroup="-1">
445
+ <controlProperties>
446
+ <color>13421772</color>
447
+ <text>Discounts</text>
448
+ </controlProperties>
449
+ </control>
450
+ <control controlID="92" controlTypeID="com.balsamiq.mockups::VRule" x="282" y="165" w="-1" h="40" measuredW="5" measuredH="100" zOrder="83" locked="false" isInGroup="-1"/>
451
+ <control controlID="93" controlTypeID="com.balsamiq.mockups::VRule" x="404" y="165" w="-1" h="40" measuredW="5" measuredH="100" zOrder="84" locked="false" isInGroup="-1"/>
452
+ <control controlID="94" controlTypeID="com.balsamiq.mockups::Label" x="58" y="170" w="117" h="29" measuredW="77" measuredH="29" zOrder="85" locked="false" isInGroup="-1">
453
+ <controlProperties>
454
+ <align>center</align>
455
+ <size>18</size>
456
+ <text>Products</text>
457
+ </controlProperties>
458
+ </control>
459
+ <control controlID="95" controlTypeID="com.balsamiq.mockups::Label" x="175" y="170" w="109" h="29" measuredW="60" measuredH="29" zOrder="86" locked="false" isInGroup="-1">
460
+ <controlProperties>
461
+ <align>center</align>
462
+ <size>18</size>
463
+ <text>Orders</text>
464
+ </controlProperties>
465
+ </control>
466
+ <control controlID="96" controlTypeID="com.balsamiq.mockups::Label" x="282" y="170" w="122" h="29" measuredW="87" measuredH="29" zOrder="87" locked="false" isInGroup="-1">
467
+ <controlProperties>
468
+ <align>center</align>
469
+ <size>18</size>
470
+ <text>Customers</text>
471
+ </controlProperties>
472
+ </control>
473
+ <control controlID="97" controlTypeID="com.balsamiq.mockups::TabBar" x="98" y="537" w="930" h="124" measuredW="167" measuredH="100" zOrder="88" locked="false" isInGroup="-1">
474
+ <controlProperties>
475
+ <selectedIndex>0</selectedIndex>
476
+ <text>categories</text>
477
+ </controlProperties>
478
+ </control>
479
+ <control controlID="98" controlTypeID="com.balsamiq.mockups::CheckBoxGroup" x="115" y="578" w="899" h="115" measuredW="83" measuredH="72" zOrder="89" locked="false" isInGroup="-1">
480
+ <controlProperties>
481
+ <text>%5B%20%5D%20books%0A%5Bx%5D%20movies%0A%5B%20%5D%20figurines</text>
482
+ </controlProperties>
483
+ </control>
484
+ <control controlID="99" controlTypeID="com.balsamiq.mockups::Label" x="95" y="214" w="-1" h="-1" measuredW="112" measuredH="29" zOrder="90" locked="false" isInGroup="-1">
485
+ <controlProperties>
486
+ <color>16777215</color>
487
+ <size>18</size>
488
+ <text>New%20Product</text>
489
+ </controlProperties>
490
+ </control>
491
+ </controls>
492
+ </mockup>