shoppe 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/images/shoppe/chosen-sprite.png +0 -0
- data/app/assets/images/shoppe/chosen-sprite@2x.png +0 -0
- data/app/assets/images/shoppe/icons/bag.svg +1 -0
- data/app/assets/images/shoppe/icons/balance.svg +1 -0
- data/app/assets/images/shoppe/icons/box.svg +1 -0
- data/app/assets/images/shoppe/icons/building.svg +1 -0
- data/app/assets/images/shoppe/icons/chart.svg +1 -0
- data/app/assets/images/shoppe/icons/chat.svg +1 -0
- data/app/assets/images/shoppe/icons/checkbox.svg +1 -0
- data/app/assets/images/shoppe/icons/checkbox2.svg +1 -0
- data/app/assets/images/shoppe/icons/cloud.svg +1 -0
- data/app/assets/images/shoppe/icons/cone.svg +1 -0
- data/app/assets/images/shoppe/icons/credit_card.svg +1 -0
- data/app/assets/images/shoppe/icons/currency.svg +1 -0
- data/app/assets/images/shoppe/icons/flowchart.svg +1 -0
- data/app/assets/images/shoppe/icons/gift.svg +1 -0
- data/app/assets/images/shoppe/icons/globe.svg +1 -0
- data/app/assets/images/shoppe/icons/id.svg +1 -0
- data/app/assets/images/shoppe/icons/id2.svg +1 -0
- data/app/assets/images/shoppe/icons/locked.svg +1 -0
- data/app/assets/images/shoppe/icons/report.svg +1 -0
- data/app/assets/images/shoppe/icons/search.svg +1 -0
- data/app/assets/images/shoppe/icons/support.svg +1 -0
- data/app/assets/images/shoppe/icons/tags.svg +1 -0
- data/app/assets/images/shoppe/icons/toolbox.svg +1 -0
- data/app/assets/images/shoppe/icons/unlocked.svg +1 -0
- data/app/assets/images/shoppe/icons/wallet.svg +1 -0
- data/app/assets/images/shoppe/move.svg +1 -0
- data/app/assets/javascripts/shoppe/application.coffee +32 -1
- data/app/assets/javascripts/shoppe/chosen.jquery.js +1166 -0
- data/app/assets/javascripts/shoppe/jquery_ui.js +6 -0
- data/app/assets/stylesheets/shoppe/application.scss +95 -20
- data/app/assets/stylesheets/shoppe/chosen.css +430 -0
- data/app/assets/stylesheets/shoppe/elements.scss +6 -7
- data/app/controllers/shoppe/delivery_service_prices_controller.rb +1 -1
- data/app/controllers/shoppe/products_controller.rb +1 -1
- data/app/helpers/shoppe/shoppe_helper.rb +2 -0
- data/app/models/shoppe/delivery_service_price.rb +1 -0
- data/app/models/shoppe/order.rb +18 -1
- data/app/models/shoppe/order_item.rb +11 -5
- data/app/models/shoppe/product.rb +19 -4
- data/app/models/shoppe/product/product_attributes.rb +15 -0
- data/app/models/shoppe/product_attribute.rb +51 -0
- data/app/views/shoppe/delivery_service_prices/_form.html.haml +23 -19
- data/app/views/shoppe/delivery_service_prices/edit.html.haml +1 -1
- data/app/views/shoppe/delivery_service_prices/index.html.haml +1 -1
- data/app/views/shoppe/delivery_service_prices/new.html.haml +1 -1
- data/app/views/shoppe/delivery_services/_form.html.haml +27 -25
- data/app/views/shoppe/delivery_services/edit.html.haml +1 -1
- data/app/views/shoppe/delivery_services/index.html.haml +12 -8
- data/app/views/shoppe/delivery_services/new.html.haml +1 -1
- data/app/views/shoppe/orders/index.html.haml +16 -12
- data/app/views/shoppe/orders/show.html.haml +28 -25
- data/app/views/shoppe/product_categories/_form.html.haml +7 -6
- data/app/views/shoppe/product_categories/edit.html.haml +1 -1
- data/app/views/shoppe/product_categories/index.html.haml +8 -4
- data/app/views/shoppe/product_categories/new.html.haml +1 -1
- data/app/views/shoppe/products/_form.html.haml +88 -45
- data/app/views/shoppe/products/edit.html.haml +1 -1
- data/app/views/shoppe/products/index.html.haml +14 -13
- data/app/views/shoppe/products/new.html.haml +1 -1
- data/app/views/shoppe/users/_form.html.haml +17 -15
- data/app/views/shoppe/users/edit.html.haml +1 -1
- data/app/views/shoppe/users/index.html.haml +1 -1
- data/app/views/shoppe/users/new.html.haml +1 -1
- data/db/migrate/20131012123829_create_shoppe_product_attributes.rb +11 -0
- data/db/migrate/20131012163301_add_public_boolean_to_product_attributes.rb +5 -0
- data/db/migrate/20131013123937_add_cost_prices_to_various_objects.rb +8 -0
- data/db/migrate/20131013131658_add_stock_control_boolean_to_products.rb +5 -0
- data/db/seeds.rb +78 -30
- data/lib/shoppe/version.rb +1 -1
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/schema.rb +22 -6
- data/test/dummy/log/development.log +29 -0
- metadata +42 -5
@@ -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,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
|
data/db/seeds.rb
CHANGED
@@ -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
|
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
|
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
|
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
|
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
|
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)
|
data/lib/shoppe/version.rb
CHANGED
Binary file
|
data/test/dummy/db/schema.rb
CHANGED
@@ -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:
|
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",
|
42
|
-
t.decimal "unit_price",
|
43
|
-
t.decimal "tax_amount",
|
44
|
-
t.decimal "tax_rate",
|
45
|
-
t.decimal "weight",
|
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
|
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20131006144849"]]
|
892
892
|
[1m[35m (0.7ms)[0m commit transaction
|
893
893
|
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
894
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
895
|
+
Migrating to CreateShoppeProductAttributes (20131012123829)
|
896
|
+
[1m[35m (0.1ms)[0m begin transaction
|
897
|
+
[1m[36m (0.4ms)[0m [1mCREATE 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) [0m
|
898
|
+
[1m[35mSQL (1.4ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131012123829"]]
|
899
|
+
[1m[36m (2.4ms)[0m [1mcommit transaction[0m
|
900
|
+
Migrating to AddPublicBooleanToProductAttributes (20131012163301)
|
901
|
+
[1m[35m (0.1ms)[0m begin transaction
|
902
|
+
[1m[36m (0.7ms)[0m [1mALTER TABLE "shoppe_product_attributes" ADD "public" boolean DEFAULT 't'[0m
|
903
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131012163301"]]
|
904
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
905
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
906
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
907
|
+
Migrating to AddCostPricesToVariousObjects (20131013123937)
|
908
|
+
[1m[35m (0.1ms)[0m begin transaction
|
909
|
+
[1m[36m (0.4ms)[0m [1mALTER TABLE "shoppe_products" ADD "cost_price" decimal(8,2)[0m
|
910
|
+
[1m[35m (0.2ms)[0m ALTER TABLE "shoppe_delivery_service_prices" ADD "cost_price" decimal(8,2)
|
911
|
+
[1m[36m (0.1ms)[0m [1mALTER TABLE "shoppe_order_items" ADD "unit_cost_price" decimal(8,2)[0m
|
912
|
+
[1m[35m (0.2ms)[0m ALTER TABLE "shoppe_orders" ADD "delivery_cost_price" decimal(8,2)
|
913
|
+
[1m[36mSQL (1.4ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20131013123937"]]
|
914
|
+
[1m[35m (1.1ms)[0m commit transaction
|
915
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
916
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
917
|
+
Migrating to AddStockControlBooleanToProducts (20131013131658)
|
918
|
+
[1m[35m (0.0ms)[0m begin transaction
|
919
|
+
[1m[36m (0.4ms)[0m [1mALTER TABLE "shoppe_products" ADD "stock_control" boolean DEFAULT 't'[0m
|
920
|
+
[1m[35mSQL (1.3ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131013131658"]]
|
921
|
+
[1m[36m (2.7ms)[0m [1mcommit transaction[0m
|
922
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m 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.
|
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-
|
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://
|
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:
|
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:
|
442
|
+
hash: 2652603386465863787
|
406
443
|
requirements: []
|
407
444
|
rubyforge_project:
|
408
445
|
rubygems_version: 1.8.23
|