shoppe 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. data/app/assets/images/shoppe/chosen-sprite.png +0 -0
  2. data/app/assets/images/shoppe/chosen-sprite@2x.png +0 -0
  3. data/app/assets/images/shoppe/icons/bag.svg +1 -0
  4. data/app/assets/images/shoppe/icons/balance.svg +1 -0
  5. data/app/assets/images/shoppe/icons/box.svg +1 -0
  6. data/app/assets/images/shoppe/icons/building.svg +1 -0
  7. data/app/assets/images/shoppe/icons/chart.svg +1 -0
  8. data/app/assets/images/shoppe/icons/chat.svg +1 -0
  9. data/app/assets/images/shoppe/icons/checkbox.svg +1 -0
  10. data/app/assets/images/shoppe/icons/checkbox2.svg +1 -0
  11. data/app/assets/images/shoppe/icons/cloud.svg +1 -0
  12. data/app/assets/images/shoppe/icons/cone.svg +1 -0
  13. data/app/assets/images/shoppe/icons/credit_card.svg +1 -0
  14. data/app/assets/images/shoppe/icons/currency.svg +1 -0
  15. data/app/assets/images/shoppe/icons/flowchart.svg +1 -0
  16. data/app/assets/images/shoppe/icons/gift.svg +1 -0
  17. data/app/assets/images/shoppe/icons/globe.svg +1 -0
  18. data/app/assets/images/shoppe/icons/id.svg +1 -0
  19. data/app/assets/images/shoppe/icons/id2.svg +1 -0
  20. data/app/assets/images/shoppe/icons/locked.svg +1 -0
  21. data/app/assets/images/shoppe/icons/report.svg +1 -0
  22. data/app/assets/images/shoppe/icons/search.svg +1 -0
  23. data/app/assets/images/shoppe/icons/support.svg +1 -0
  24. data/app/assets/images/shoppe/icons/tags.svg +1 -0
  25. data/app/assets/images/shoppe/icons/toolbox.svg +1 -0
  26. data/app/assets/images/shoppe/icons/unlocked.svg +1 -0
  27. data/app/assets/images/shoppe/icons/wallet.svg +1 -0
  28. data/app/assets/images/shoppe/move.svg +1 -0
  29. data/app/assets/javascripts/shoppe/application.coffee +32 -1
  30. data/app/assets/javascripts/shoppe/chosen.jquery.js +1166 -0
  31. data/app/assets/javascripts/shoppe/jquery_ui.js +6 -0
  32. data/app/assets/stylesheets/shoppe/application.scss +95 -20
  33. data/app/assets/stylesheets/shoppe/chosen.css +430 -0
  34. data/app/assets/stylesheets/shoppe/elements.scss +6 -7
  35. data/app/controllers/shoppe/delivery_service_prices_controller.rb +1 -1
  36. data/app/controllers/shoppe/products_controller.rb +1 -1
  37. data/app/helpers/shoppe/shoppe_helper.rb +2 -0
  38. data/app/models/shoppe/delivery_service_price.rb +1 -0
  39. data/app/models/shoppe/order.rb +18 -1
  40. data/app/models/shoppe/order_item.rb +11 -5
  41. data/app/models/shoppe/product.rb +19 -4
  42. data/app/models/shoppe/product/product_attributes.rb +15 -0
  43. data/app/models/shoppe/product_attribute.rb +51 -0
  44. data/app/views/shoppe/delivery_service_prices/_form.html.haml +23 -19
  45. data/app/views/shoppe/delivery_service_prices/edit.html.haml +1 -1
  46. data/app/views/shoppe/delivery_service_prices/index.html.haml +1 -1
  47. data/app/views/shoppe/delivery_service_prices/new.html.haml +1 -1
  48. data/app/views/shoppe/delivery_services/_form.html.haml +27 -25
  49. data/app/views/shoppe/delivery_services/edit.html.haml +1 -1
  50. data/app/views/shoppe/delivery_services/index.html.haml +12 -8
  51. data/app/views/shoppe/delivery_services/new.html.haml +1 -1
  52. data/app/views/shoppe/orders/index.html.haml +16 -12
  53. data/app/views/shoppe/orders/show.html.haml +28 -25
  54. data/app/views/shoppe/product_categories/_form.html.haml +7 -6
  55. data/app/views/shoppe/product_categories/edit.html.haml +1 -1
  56. data/app/views/shoppe/product_categories/index.html.haml +8 -4
  57. data/app/views/shoppe/product_categories/new.html.haml +1 -1
  58. data/app/views/shoppe/products/_form.html.haml +88 -45
  59. data/app/views/shoppe/products/edit.html.haml +1 -1
  60. data/app/views/shoppe/products/index.html.haml +14 -13
  61. data/app/views/shoppe/products/new.html.haml +1 -1
  62. data/app/views/shoppe/users/_form.html.haml +17 -15
  63. data/app/views/shoppe/users/edit.html.haml +1 -1
  64. data/app/views/shoppe/users/index.html.haml +1 -1
  65. data/app/views/shoppe/users/new.html.haml +1 -1
  66. data/db/migrate/20131012123829_create_shoppe_product_attributes.rb +11 -0
  67. data/db/migrate/20131012163301_add_public_boolean_to_product_attributes.rb +5 -0
  68. data/db/migrate/20131013123937_add_cost_prices_to_various_objects.rb +8 -0
  69. data/db/migrate/20131013131658_add_stock_control_boolean_to_products.rb +5 -0
  70. data/db/seeds.rb +78 -30
  71. data/lib/shoppe/version.rb +1 -1
  72. data/test/dummy/db/development.sqlite3 +0 -0
  73. data/test/dummy/db/schema.rb +22 -6
  74. data/test/dummy/log/development.log +29 -0
  75. metadata +42 -5
@@ -2,7 +2,7 @@
2
2
 
3
3
  = content_for :header do
4
4
  %p.buttons=link_to "New user", :new_user, :class => 'button green'
5
- %h2 Users
5
+ %h2.users Users
6
6
 
7
7
  .table
8
8
  %table.data
@@ -1,5 +1,5 @@
1
1
  - @page_title = "Users"
2
2
  = content_for :header do
3
3
  %p.buttons= link_to "Back to users", :users, :class => 'button'
4
- %h2 New User
4
+ %h2.users Users
5
5
  = render 'form'
@@ -0,0 +1,11 @@
1
+ class CreateShoppeProductAttributes < ActiveRecord::Migration
2
+ def change
3
+ create_table :shoppe_product_attributes do |t|
4
+ t.integer :product_id
5
+ t.string :key, :value
6
+ t.integer :position, :default => 1
7
+ t.boolean :searchable, :default => true
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,5 @@
1
+ class AddPublicBooleanToProductAttributes < ActiveRecord::Migration
2
+ def change
3
+ add_column :shoppe_product_attributes, :public, :boolean, :default => true
4
+ end
5
+ end
@@ -0,0 +1,8 @@
1
+ class AddCostPricesToVariousObjects < ActiveRecord::Migration
2
+ def change
3
+ add_column :shoppe_products, :cost_price, :decimal, :precision => 8, :scale => 2, :after => :price
4
+ add_column :shoppe_delivery_service_prices, :cost_price, :decimal, :precision => 8, :scale => 2, :after => :price
5
+ add_column :shoppe_order_items, :unit_cost_price, :decimal, :precision => 8, :scale => 2, :after => :unit_price
6
+ add_column :shoppe_orders, :delivery_cost_price, :decimal, :precision => 8, :scale => 2, :after => :delivery_price
7
+ end
8
+ end
@@ -0,0 +1,5 @@
1
+ class AddStockControlBooleanToProducts < ActiveRecord::Migration
2
+ def change
3
+ add_column :shoppe_products, :stock_control, :boolean, :default => true
4
+ end
5
+ end
@@ -3,30 +3,30 @@
3
3
  # delivery services
4
4
 
5
5
  ds = Shoppe::DeliveryService.create!(:name => "Royal Mail (1st class)", :code => 'RMFC', :courier => 'Royal Mail', :tracking_url => 'http://royalmail.com/track/{{consignment_number}}')
6
- ds.delivery_service_prices.create!(:min_weight => 0, :max_weight => 0.050, :price => 0.60, :tax_rate => 0.0)
6
+ ds.delivery_service_prices.create!(:min_weight => 0, :max_weight => 0.050, :price => 0.60, :cost_price => 0.55, :tax_rate => 0.0)
7
7
 
8
8
 
9
9
  ds = Shoppe::DeliveryService.create!(:name => "Royal Mail (signed for)", :code => 'RMSF', :courier => 'Royal Mail', :tracking_url => 'http://royalmail.com/track/{{consignment_number}}')
10
- ds.delivery_service_prices.create!(:min_weight => 0, :max_weight => 1, :price => 5.0, :tax_rate => 20.0)
11
- ds.delivery_service_prices.create!(:min_weight => 1, :max_weight => 5, :price => 8.0, :tax_rate => 20.0)
12
- ds.delivery_service_prices.create!(:min_weight => 5, :max_weight => 10, :price => 10.0, :tax_rate => 20.0)
13
- ds.delivery_service_prices.create!(:min_weight => 10, :max_weight => 25, :price => 12.0, :tax_rate => 20.0)
14
- ds.delivery_service_prices.create!(:min_weight => 25, :max_weight => 50, :price => 16.25, :tax_rate => 20.0)
10
+ ds.delivery_service_prices.create!(:min_weight => 0, :max_weight => 1, :price => 5.0, :cost_price => 4.5 ,:tax_rate => 20.0)
11
+ ds.delivery_service_prices.create!(:min_weight => 1, :max_weight => 5, :price => 8.0, :cost_price => 7.5, :tax_rate => 20.0)
12
+ ds.delivery_service_prices.create!(:min_weight => 5, :max_weight => 10, :price => 10.0, :cost_price => 9.5, :tax_rate => 20.0)
13
+ ds.delivery_service_prices.create!(:min_weight => 10, :max_weight => 25, :price => 12.0, :cost_price => 11.5, :tax_rate => 20.0)
14
+ ds.delivery_service_prices.create!(:min_weight => 25, :max_weight => 50, :price => 16.25, :cost_price => 13.5, :tax_rate => 20.0)
15
15
 
16
16
  ds = Shoppe::DeliveryService.create!(:name => "Next Day Delivery (before 4pm)", :default => true, :code => 'ND16', :courier => 'UPS', :tracking_url => 'http://trackingurl.com/track/{{consignment_number}}')
17
- ds.delivery_service_prices.create!(:min_weight => 0, :max_weight => 1, :price => 7.0, :tax_rate => 20.0)
18
- ds.delivery_service_prices.create!(:min_weight => 1, :max_weight => 5, :price => 9.0, :tax_rate => 20.0)
19
- ds.delivery_service_prices.create!(:min_weight => 5, :max_weight => 20, :price => 11.50, :tax_rate => 20.0)
17
+ ds.delivery_service_prices.create!(:min_weight => 0, :max_weight => 1, :price => 7.0, :cost_price => 5.5, :tax_rate => 20.0)
18
+ ds.delivery_service_prices.create!(:min_weight => 1, :max_weight => 5, :price => 9.0, :cost_price => 7.6, :tax_rate => 20.0)
19
+ ds.delivery_service_prices.create!(:min_weight => 5, :max_weight => 20, :price => 11.50, :cost_price => 8.9, :tax_rate => 20.0)
20
20
 
21
21
  ds = Shoppe::DeliveryService.create!(:name => "Next Day Delivery (before 10am)", :code => 'NS10', :courier => 'UPS', :tracking_url => 'http://trackingurl.com/track/{{consignment_number}}')
22
- ds.delivery_service_prices.create!(:min_weight => 0, :max_weight => 1, :price => 17.0, :tax_rate => 20.0)
23
- ds.delivery_service_prices.create!(:min_weight => 1, :max_weight => 5, :price => 19.0, :tax_rate => 20.0)
24
- ds.delivery_service_prices.create!(:min_weight => 5, :max_weight => 20, :price => 27.0, :tax_rate => 20.0)
22
+ ds.delivery_service_prices.create!(:min_weight => 0, :max_weight => 1, :price => 17.0, :cost_price => 14.00, :tax_rate => 20.0)
23
+ ds.delivery_service_prices.create!(:min_weight => 1, :max_weight => 5, :price => 19.0, :cost_price => 16.00, :tax_rate => 20.0)
24
+ ds.delivery_service_prices.create!(:min_weight => 5, :max_weight => 20, :price => 27.0, :cost_price => 22.00, :tax_rate => 20.0)
25
25
 
26
26
  ds = Shoppe::DeliveryService.create!(:name => "Saturday Delivery", :code => 'NDSA16', :courier => 'UPS', :tracking_url => 'http://trackingurl.com/track/{{consignment_number}}')
27
- ds.delivery_service_prices.create!(:min_weight => 0, :max_weight => 1, :price => 27.0, :tax_rate => 20.0)
28
- ds.delivery_service_prices.create!(:min_weight => 1, :max_weight => 5, :price => 29.0, :tax_rate => 20.0)
29
- ds.delivery_service_prices.create!(:min_weight => 5, :max_weight => 20, :price => 37.0, :tax_rate => 20.0)
27
+ ds.delivery_service_prices.create!(:min_weight => 0, :max_weight => 1, :price => 27.0, :cost_price => 24.00, :tax_rate => 20.0)
28
+ ds.delivery_service_prices.create!(:min_weight => 1, :max_weight => 5, :price => 29.0, :cost_price => 20.00, :tax_rate => 20.0)
29
+ ds.delivery_service_prices.create!(:min_weight => 5, :max_weight => 20, :price => 37.0, :cost_price => 32.00,:tax_rate => 20.0)
30
30
 
31
31
  # categories
32
32
  cat1 = Shoppe::ProductCategory.create!(:name => 'VoIP Phones')
@@ -42,42 +42,90 @@ end
42
42
 
43
43
  lorem = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'
44
44
 
45
- pro = cat1.products.create!(:title => 'Yealink T20P', :sku => 'YL-SIP-T20P', :description => lorem, :short_description => 'If cheap & cheerful is what you’re after, the Yealink T20P is what you’re looking for.', :weight => 1.119, :price => 54.99, :tax_rate => 20.0, :stock => 20, :featured => true)
45
+ pro = cat1.products.create!(:title => 'Yealink T20P', :sku => 'YL-SIP-T20P', :description => lorem, :short_description => 'If cheap & cheerful is what you’re after, the Yealink T20P is what you’re looking for.', :weight => 1.119, :price => 54.99, :cost_price => 44.99, :tax_rate => 20.0, :stock => 20, :featured => true)
46
46
  pro.default_image_file = get_file('t20p.jpg')
47
47
  pro.save!
48
-
49
- pro = cat1.products.create!(:title => 'Yealink T22P', :sku => 'YL-SIP-T22P', :description => lorem, :short_description => lorem, :weight => 1.419, :price => 64.99, :tax_rate => 20.0, :stock => 12)
48
+ pro.product_attributes.create!(:key => 'Manufacturer', :value => 'Yealink', :position => 1)
49
+ pro.product_attributes.create!(:key => 'Model', :value => 'T20P', :position => 1)
50
+ pro.product_attributes.create!(:key => 'Colour', :value => 'Black', :position => 1)
51
+ pro.product_attributes.create!(:key => 'Lines', :value => '3', :position => 1)
52
+ pro.product_attributes.create!(:key => 'Colour Screen?', :value => 'No', :position => 1)
53
+ pro.product_attributes.create!(:key => 'Power over ethernet?', :value => 'Yes', :position => 1)
54
+
55
+ pro = cat1.products.create!(:title => 'Yealink T22P', :sku => 'YL-SIP-T22P', :description => lorem, :short_description => lorem, :weight => 1.419, :price => 64.99, :cost_price => 56.99, :tax_rate => 20.0, :stock => 12)
50
56
  pro.default_image_file = get_file('t22p.jpg')
51
57
  pro.save!
58
+ pro.product_attributes.create!(:key => 'Manufacturer', :value => 'Yealink', :position => 1)
59
+ pro.product_attributes.create!(:key => 'Model', :value => 'T22P', :position => 1)
60
+ pro.product_attributes.create!(:key => 'Colour', :value => 'Black', :position => 1)
61
+ pro.product_attributes.create!(:key => 'Lines', :value => '4', :position => 1)
62
+ pro.product_attributes.create!(:key => 'Colour Screen?', :value => 'No', :position => 1)
63
+ pro.product_attributes.create!(:key => 'Power over ethernet?', :value => 'Yes', :position => 1)
64
+
52
65
 
53
- pro = cat1.products.create!(:title => 'Yealink T26P', :sku => 'YL-SIP-T26P', :description => lorem, :short_description => lorem, :weight => 2.23, :price => 88.99, :tax_rate => 20.0, :stock => 5)
66
+ pro = cat1.products.create!(:title => 'Yealink T26P', :sku => 'YL-SIP-T26P', :description => lorem, :short_description => lorem, :weight => 2.23, :price => 88.99, :cost_price => 78.99, :tax_rate => 20.0, :stock => 5)
54
67
  pro.default_image_file = get_file('t26p.jpg')
55
68
  pro.save!
56
-
57
- pro = cat1.products.create!(:title => 'Yealink T46GN', :sku => 'YL-SIP-T46GN', :description => lorem, :short_description => 'Colourful, sharp, fast & down right sexy. The Yealink T46P will make your scream!', :weight => 2.23, :price => 149.99, :tax_rate => 20.0, :stock => 5, :featured => true)
69
+ pro.product_attributes.create!(:key => 'Manufacturer', :value => 'Yealink', :position => 1)
70
+ pro.product_attributes.create!(:key => 'Model', :value => 'T26P', :position => 1)
71
+ pro.product_attributes.create!(:key => 'Colour', :value => 'Black', :position => 1)
72
+ pro.product_attributes.create!(:key => 'Lines', :value => '6', :position => 1)
73
+ pro.product_attributes.create!(:key => 'Colour Screen?', :value => 'No', :position => 1)
74
+ pro.product_attributes.create!(:key => 'Power over ethernet?', :value => 'Yes', :position => 1)
75
+
76
+ pro = cat1.products.create!(:title => 'Yealink T46GN', :sku => 'YL-SIP-T46GN', :description => lorem, :short_description => 'Colourful, sharp, fast & down right sexy. The Yealink T46P will make your scream!', :weight => 2.23, :price => 149.99, :cost_price => 139.99, :tax_rate => 20.0, :stock => 5, :featured => true)
58
77
  pro.default_image_file = get_file('t46gn.jpg')
59
78
  pro.save!
60
-
61
- pro = cat1.products.create!(:title => 'Snom 870 (Grey)', :sku => 'SM-870-GREY', :description => lorem, :short_description => 'The perfect & beautiful VoIP phone for the discerning professional desk.', :weight => 2.4, :price => 235.00, :tax_rate => 20.0, :stock => 2)
79
+ pro.product_attributes.create!(:key => 'Manufacturer', :value => 'Yealink', :position => 1)
80
+ pro.product_attributes.create!(:key => 'Model', :value => 'T46GN', :position => 1)
81
+ pro.product_attributes.create!(:key => 'Colour', :value => 'Black', :position => 1)
82
+ pro.product_attributes.create!(:key => 'Lines', :value => '4', :position => 1)
83
+ pro.product_attributes.create!(:key => 'Colour Screen?', :value => 'Yes', :position => 1)
84
+ pro.product_attributes.create!(:key => 'Power over ethernet?', :value => 'Yes', :position => 1)
85
+
86
+ pro = cat1.products.create!(:title => 'Snom 870 (Grey)', :sku => 'SM-870-GREY', :description => lorem, :short_description => 'The perfect & beautiful VoIP phone for the discerning professional desk.', :weight => 2.4, :price => 235.00, :cost_price => 225.00, :tax_rate => 20.0, :stock => 2)
62
87
  pro.default_image_file = get_file('snom-870-grey.jpg')
63
88
  pro.save!
64
-
65
- pro = cat1.products.create!(:title => 'Snom 870 (Black)', :sku => 'SM-870-BLK', :description => lorem, :short_description => 'The perfect & beautiful VoIP phone for the discerning professional desk.', :weight => 2.4, :price => 235.00, :tax_rate => 20.0, :stock => 0, :featured => true)
89
+ pro.product_attributes.create!(:key => 'Manufacturer', :value => 'Snom', :position => 1)
90
+ pro.product_attributes.create!(:key => 'Model', :value => '870', :position => 1)
91
+ pro.product_attributes.create!(:key => 'Colour', :value => 'Grey', :position => 1)
92
+ pro.product_attributes.create!(:key => 'Lines', :value => '10', :position => 1)
93
+ pro.product_attributes.create!(:key => 'Colour Screen?', :value => 'Yes', :position => 1)
94
+ pro.product_attributes.create!(:key => 'Power over ethernet?', :value => 'Yes', :position => 1)
95
+
96
+ pro = cat1.products.create!(:title => 'Snom 870 (Black)', :sku => 'SM-870-BLK', :description => lorem, :short_description => 'The perfect & beautiful VoIP phone for the discerning professional desk.', :weight => 2.4, :price => 235.00, :cost_price => 225.00, :tax_rate => 20.0, :stock => 0, :featured => true)
66
97
  pro.default_image_file = get_file('snom-870-blk.jpg')
67
98
  pro.save!
68
-
69
- pro = cat2.products.create!(:title => 'Yealink Mono Headset', :sku => 'YL-YHS32', :description => lorem, :short_description => 'If you\'re often on the phone, this headset will make your life 100x easier. Guaranteed*.', :weight => 0.890, :price => 34.99, :tax_rate => 20.0, :stock => 3, :featured => true)
99
+ pro.product_attributes.create!(:key => 'Manufacturer', :value => 'Snom', :position => 1)
100
+ pro.product_attributes.create!(:key => 'Model', :value => '870', :position => 1)
101
+ pro.product_attributes.create!(:key => 'Colour', :value => 'Black', :position => 1)
102
+ pro.product_attributes.create!(:key => 'Lines', :value => '10', :position => 1)
103
+ pro.product_attributes.create!(:key => 'Colour Screen?', :value => 'Yes', :position => 1)
104
+ pro.product_attributes.create!(:key => 'Power over ethernet?', :value => 'Yes', :position => 1)
105
+
106
+ pro = cat2.products.create!(:title => 'Yealink Mono Headset', :sku => 'YL-YHS32', :description => lorem, :short_description => 'If you\'re often on the phone, this headset will make your life 100x easier. Guaranteed*.', :weight => 0.890, :price => 34.99, :cost_price => 24.99, :tax_rate => 20.0, :stock => 3, :featured => true)
70
107
  pro.default_image_file = get_file('yhs32.jpg')
71
108
  pro.save!
109
+ pro.product_attributes.create!(:key => 'Manufacturer', :value => 'Yealink', :position => 1)
110
+ pro.product_attributes.create!(:key => 'Model', :value => 'YHS32', :position => 1)
72
111
 
73
- pro = cat2.products.create!(:title => 'Snom Wired Headset (MM2)', :sku => 'SM-MM2', :description => lorem, :short_description => lorem, :weight => 0.780, :price => 38.00, :tax_rate => 20.0, :stock => 0)
112
+ pro = cat2.products.create!(:title => 'Snom Wired Headset (MM2)', :sku => 'SM-MM2', :description => lorem, :short_description => lorem, :weight => 0.780, :price => 38.00, :cost_price => 30, :tax_rate => 20.0, :stock => 0)
74
113
  pro.default_image_file = get_file('snom-mm2.jpg')
75
114
  pro.save!
115
+ pro.product_attributes.create!(:key => 'Manufacturer', :value => 'Snom', :position => 1)
116
+ pro.product_attributes.create!(:key => 'Model', :value => 'MM2', :position => 1)
76
117
 
77
- pro = cat2.products.create!(:title => 'Snom Wired Headset (MM3)', :sku => 'SM-MM3', :description => lorem, :short_description => lorem, :weight => 0.780, :price => 38.00, :tax_rate => 20.0, :stock => 1)
118
+ pro = cat2.products.create!(:title => 'Snom Wired Headset (MM3)', :sku => 'SM-MM3', :description => lorem, :short_description => lorem, :weight => 0.780, :price => 38.00, :cost_price => 30, :tax_rate => 20.0, :stock => 1)
78
119
  pro.default_image_file = get_file('snom-mm2.jpg')
79
120
  pro.save!
121
+ pro.product_attributes.create!(:key => 'Manufacturer', :value => 'Snom', :position => 1)
122
+ pro.product_attributes.create!(:key => 'Model', :value => 'MM3', :position => 1)
80
123
 
81
- pro = cat1.products.create!(:title => 'Yealink W52P', :sku => 'TL-SIP-W52P', :description => lorem, :short_description => 'Wireless SIP phones are hard to come by but this beauty from Yealink is fab.', :weight => 1.280, :price => 99.99, :tax_rate => 20.0, :stock => 1, :featured => true)
124
+ pro = cat1.products.create!(:title => 'Yealink W52P', :sku => 'TL-SIP-W52P', :description => lorem, :short_description => 'Wireless SIP phones are hard to come by but this beauty from Yealink is fab.', :weight => 1.280, :price => 99.99, :cost_price => 89.99, :tax_rate => 20.0, :stock => 1, :featured => true)
82
125
  pro.default_image_file = get_file('w52p.jpg')
83
126
  pro.save!
127
+ pro.product_attributes.create!(:key => 'Manufacturer', :value => 'Snom', :position => 1)
128
+ pro.product_attributes.create!(:key => 'Model', :value => 'W52P', :position => 1)
129
+ pro.product_attributes.create!(:key => 'Lines', :value => '3', :position => 1)
130
+ pro.product_attributes.create!(:key => 'Colour Screen?', :value => 'Yes', :position => 1)
131
+ pro.product_attributes.create!(:key => 'Power over ethernet?', :value => 'No', :position => 1)
@@ -1,3 +1,3 @@
1
1
  module Shoppe
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20131006144849) do
14
+ ActiveRecord::Schema.define(version: 20131013131658) do
15
15
 
16
16
  create_table "shoppe_delivery_service_prices", force: true do |t|
17
17
  t.integer "delivery_service_id"
@@ -22,6 +22,7 @@ ActiveRecord::Schema.define(version: 20131006144849) do
22
22
  t.decimal "max_weight", precision: 8, scale: 2
23
23
  t.datetime "created_at"
24
24
  t.datetime "updated_at"
25
+ t.decimal "cost_price", precision: 8, scale: 2
25
26
  end
26
27
 
27
28
  create_table "shoppe_delivery_services", force: true do |t|
@@ -38,13 +39,14 @@ ActiveRecord::Schema.define(version: 20131006144849) do
38
39
  create_table "shoppe_order_items", force: true do |t|
39
40
  t.integer "order_id"
40
41
  t.integer "product_id"
41
- t.integer "quantity", default: 1
42
- t.decimal "unit_price", precision: 8, scale: 2
43
- t.decimal "tax_amount", precision: 8, scale: 2
44
- t.decimal "tax_rate", precision: 8, scale: 2
45
- t.decimal "weight", precision: 8, scale: 3, default: 0.0
42
+ t.integer "quantity", default: 1
43
+ t.decimal "unit_price", precision: 8, scale: 2
44
+ t.decimal "tax_amount", precision: 8, scale: 2
45
+ t.decimal "tax_rate", precision: 8, scale: 2
46
+ t.decimal "weight", precision: 8, scale: 3, default: 0.0
46
47
  t.datetime "created_at"
47
48
  t.datetime "updated_at"
49
+ t.decimal "unit_cost_price", precision: 8, scale: 2
48
50
  end
49
51
 
50
52
  create_table "shoppe_orders", force: true do |t|
@@ -79,6 +81,18 @@ ActiveRecord::Schema.define(version: 20131006144849) do
79
81
  t.string "country"
80
82
  t.string "payment_reference"
81
83
  t.string "payment_method"
84
+ t.decimal "delivery_cost_price", precision: 8, scale: 2
85
+ end
86
+
87
+ create_table "shoppe_product_attributes", force: true do |t|
88
+ t.integer "product_id"
89
+ t.string "key"
90
+ t.string "value"
91
+ t.integer "position", default: 1
92
+ t.boolean "searchable", default: true
93
+ t.datetime "created_at"
94
+ t.datetime "updated_at"
95
+ t.boolean "public", default: true
82
96
  end
83
97
 
84
98
  create_table "shoppe_product_categories", force: true do |t|
@@ -105,6 +119,8 @@ ActiveRecord::Schema.define(version: 20131006144849) do
105
119
  t.datetime "updated_at"
106
120
  t.boolean "featured", default: false
107
121
  t.text "in_the_box"
122
+ t.decimal "cost_price", precision: 8, scale: 2
123
+ t.boolean "stock_control", default: true
108
124
  end
109
125
 
110
126
  create_table "shoppe_users", force: true do |t|
@@ -891,3 +891,32 @@ Migrating to AddPaymentReferenceFields (20131006144849)
891
891
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131006144849"]]
892
892
   (0.7ms) commit transaction
893
893
  ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
894
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
895
+ Migrating to CreateShoppeProductAttributes (20131012123829)
896
+  (0.1ms) begin transaction
897
+  (0.4ms) CREATE TABLE "shoppe_product_attributes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "product_id" integer, "key" varchar(255), "value" varchar(255), "position" integer DEFAULT 1, "searchable" boolean DEFAULT 't', "created_at" datetime, "updated_at" datetime) 
898
+ SQL (1.4ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131012123829"]]
899
+  (2.4ms) commit transaction
900
+ Migrating to AddPublicBooleanToProductAttributes (20131012163301)
901
+  (0.1ms) begin transaction
902
+  (0.7ms) ALTER TABLE "shoppe_product_attributes" ADD "public" boolean DEFAULT 't'
903
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131012163301"]]
904
+  (0.8ms) commit transaction
905
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
906
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
907
+ Migrating to AddCostPricesToVariousObjects (20131013123937)
908
+  (0.1ms) begin transaction
909
+  (0.4ms) ALTER TABLE "shoppe_products" ADD "cost_price" decimal(8,2)
910
+  (0.2ms) ALTER TABLE "shoppe_delivery_service_prices" ADD "cost_price" decimal(8,2)
911
+  (0.1ms) ALTER TABLE "shoppe_order_items" ADD "unit_cost_price" decimal(8,2)
912
+  (0.2ms) ALTER TABLE "shoppe_orders" ADD "delivery_cost_price" decimal(8,2)
913
+ SQL (1.4ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131013123937"]]
914
+  (1.1ms) commit transaction
915
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
916
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
917
+ Migrating to AddStockControlBooleanToProducts (20131013131658)
918
+  (0.0ms) begin transaction
919
+  (0.4ms) ALTER TABLE "shoppe_products" ADD "stock_control" boolean DEFAULT 't'
920
+ SQL (1.3ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131013131658"]]
921
+  (2.7ms) commit transaction
922
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shoppe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-10-07 00:00:00.000000000 Z
12
+ date: 2013-10-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -243,8 +243,36 @@ executables: []
243
243
  extensions: []
244
244
  extra_rdoc_files: []
245
245
  files:
246
+ - app/assets/images/shoppe/chosen-sprite.png
247
+ - app/assets/images/shoppe/chosen-sprite@2x.png
246
248
  - app/assets/images/shoppe/document.svg
249
+ - app/assets/images/shoppe/icons/bag.svg
250
+ - app/assets/images/shoppe/icons/balance.svg
251
+ - app/assets/images/shoppe/icons/box.svg
252
+ - app/assets/images/shoppe/icons/building.svg
253
+ - app/assets/images/shoppe/icons/chart.svg
254
+ - app/assets/images/shoppe/icons/chat.svg
255
+ - app/assets/images/shoppe/icons/checkbox.svg
256
+ - app/assets/images/shoppe/icons/checkbox2.svg
257
+ - app/assets/images/shoppe/icons/cloud.svg
258
+ - app/assets/images/shoppe/icons/cone.svg
259
+ - app/assets/images/shoppe/icons/credit_card.svg
260
+ - app/assets/images/shoppe/icons/currency.svg
261
+ - app/assets/images/shoppe/icons/flowchart.svg
262
+ - app/assets/images/shoppe/icons/gift.svg
263
+ - app/assets/images/shoppe/icons/globe.svg
264
+ - app/assets/images/shoppe/icons/id.svg
265
+ - app/assets/images/shoppe/icons/id2.svg
266
+ - app/assets/images/shoppe/icons/locked.svg
267
+ - app/assets/images/shoppe/icons/report.svg
268
+ - app/assets/images/shoppe/icons/search.svg
269
+ - app/assets/images/shoppe/icons/support.svg
270
+ - app/assets/images/shoppe/icons/tags.svg
271
+ - app/assets/images/shoppe/icons/toolbox.svg
272
+ - app/assets/images/shoppe/icons/unlocked.svg
273
+ - app/assets/images/shoppe/icons/wallet.svg
247
274
  - app/assets/images/shoppe/logo.svg
275
+ - app/assets/images/shoppe/move.svg
248
276
  - app/assets/images/shoppe/shoppe.svg
249
277
  - app/assets/images/shoppe/square.svg
250
278
  - app/assets/images/shoppe/statuses/accepted.svg
@@ -253,7 +281,10 @@ files:
253
281
  - app/assets/images/shoppe/statuses/rejected.svg
254
282
  - app/assets/images/shoppe/statuses/shipped.svg
255
283
  - app/assets/javascripts/shoppe/application.coffee
284
+ - app/assets/javascripts/shoppe/chosen.jquery.js
285
+ - app/assets/javascripts/shoppe/jquery_ui.js
256
286
  - app/assets/stylesheets/shoppe/application.scss
287
+ - app/assets/stylesheets/shoppe/chosen.css
257
288
  - app/assets/stylesheets/shoppe/elements.scss
258
289
  - app/assets/stylesheets/shoppe/reset.scss
259
290
  - app/assets/stylesheets/shoppe/sub.scss
@@ -276,7 +307,9 @@ files:
276
307
  - app/models/shoppe/delivery_service_price.rb
277
308
  - app/models/shoppe/order.rb
278
309
  - app/models/shoppe/order_item.rb
310
+ - app/models/shoppe/product/product_attributes.rb
279
311
  - app/models/shoppe/product.rb
312
+ - app/models/shoppe/product_attribute.rb
280
313
  - app/models/shoppe/product_category.rb
281
314
  - app/models/shoppe/user.rb
282
315
  - app/views/layouts/shoppe/application.html.haml
@@ -313,6 +346,10 @@ files:
313
346
  - config/routes.rb
314
347
  - config/shoppe.example.yml
315
348
  - db/migrate/20130926094549_create_shoppe_initial_schema.rb
349
+ - db/migrate/20131012123829_create_shoppe_product_attributes.rb
350
+ - db/migrate/20131012163301_add_public_boolean_to_product_attributes.rb
351
+ - db/migrate/20131013123937_add_cost_prices_to_various_objects.rb
352
+ - db/migrate/20131013131658_add_stock_control_boolean_to_products.rb
316
353
  - db/seeds.rb
317
354
  - db/seeds_data/poe400.jpg
318
355
  - db/seeds_data/snom-870-blk.jpg
@@ -379,7 +416,7 @@ files:
379
416
  - test/models/shoppe/user_test.rb
380
417
  - test/shoppe_test.rb
381
418
  - test/test_helper.rb
382
- homepage: http://shoppe.niftyware.io
419
+ homepage: http://tryshoppe.com
383
420
  licenses: []
384
421
  post_install_message:
385
422
  rdoc_options: []
@@ -393,7 +430,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
393
430
  version: '0'
394
431
  segments:
395
432
  - 0
396
- hash: 1863745214941774300
433
+ hash: 2652603386465863787
397
434
  required_rubygems_version: !ruby/object:Gem::Requirement
398
435
  none: false
399
436
  requirements:
@@ -402,7 +439,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
402
439
  version: '0'
403
440
  segments:
404
441
  - 0
405
- hash: 1863745214941774300
442
+ hash: 2652603386465863787
406
443
  requirements: []
407
444
  rubyforge_project:
408
445
  rubygems_version: 1.8.23