solidus_sample 2.9.6 → 2.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/db/samples/addresses.rb +5 -8
- data/db/samples/assets.rb +79 -40
- data/db/samples/images/ruby_hoodie.jpg +0 -0
- data/db/samples/images/ruby_hoodie_zip.jpg +0 -0
- data/db/samples/images/ruby_mug.jpg +0 -0
- data/db/samples/images/ruby_polo.jpg +0 -0
- data/db/samples/images/ruby_polo_back.jpg +0 -0
- data/db/samples/images/solidus_girly.jpg +0 -0
- data/db/samples/images/solidus_girly_black.png +0 -0
- data/db/samples/images/solidus_girly_blue.png +0 -0
- data/db/samples/images/solidus_girly_white.png +0 -0
- data/db/samples/images/solidus_hoodie.jpg +0 -0
- data/db/samples/images/solidus_long.jpg +0 -0
- data/db/samples/images/solidus_long_back.jpg +0 -0
- data/db/samples/images/solidus_long_back_black.png +0 -0
- data/db/samples/images/solidus_long_back_blue.png +0 -0
- data/db/samples/images/solidus_long_back_white.png +0 -0
- data/db/samples/images/solidus_long_black.png +0 -0
- data/db/samples/images/solidus_long_blue.png +0 -0
- data/db/samples/images/solidus_long_white.png +0 -0
- data/db/samples/images/solidus_mug.jpg +0 -0
- data/db/samples/images/solidus_snapback_cap.jpg +0 -0
- data/db/samples/images/solidus_tshirt.jpg +0 -0
- data/db/samples/images/solidus_tshirt_back.jpg +0 -0
- data/db/samples/images/solidus_tshirt_back_black.png +0 -0
- data/db/samples/images/solidus_tshirt_back_blue.png +0 -0
- data/db/samples/images/solidus_tshirt_back_white.png +0 -0
- data/db/samples/images/solidus_tshirt_black.png +0 -0
- data/db/samples/images/solidus_tshirt_blue.png +0 -0
- data/db/samples/images/solidus_tshirt_white.png +0 -0
- data/db/samples/images/tote_bag_ruby.jpg +0 -0
- data/db/samples/images/tote_bag_solidus.jpg +0 -0
- data/db/samples/option_values.rb +13 -1
- data/db/samples/orders.rb +3 -3
- data/db/samples/product_option_types.rb +3 -3
- data/db/samples/product_properties.rb +78 -28
- data/db/samples/products.rb +97 -27
- data/db/samples/reimbursements.rb +35 -12
- data/db/samples/taxons.rb +58 -40
- data/db/samples/variants.rb +149 -62
- data/solidus_sample.gemspec +5 -5
- metadata +40 -33
- data/db/samples/images/apache_baseball.png +0 -0
- data/db/samples/images/ror_bag.jpeg +0 -0
- data/db/samples/images/ror_baseball.jpeg +0 -0
- data/db/samples/images/ror_baseball_back.jpeg +0 -0
- data/db/samples/images/ror_baseball_jersey_back_blue.png +0 -0
- data/db/samples/images/ror_baseball_jersey_back_green.png +0 -0
- data/db/samples/images/ror_baseball_jersey_back_red.png +0 -0
- data/db/samples/images/ror_baseball_jersey_blue.png +0 -0
- data/db/samples/images/ror_baseball_jersey_green.png +0 -0
- data/db/samples/images/ror_baseball_jersey_red.png +0 -0
- data/db/samples/images/ror_jr_spaghetti.jpeg +0 -0
- data/db/samples/images/ror_mug.jpeg +0 -0
- data/db/samples/images/ror_mug_back.jpeg +0 -0
- data/db/samples/images/ror_ringer.jpeg +0 -0
- data/db/samples/images/ror_ringer_back.jpeg +0 -0
- data/db/samples/images/ror_stein.jpeg +0 -0
- data/db/samples/images/ror_stein_back.jpeg +0 -0
- data/db/samples/images/ror_tote.jpeg +0 -0
- data/db/samples/images/ror_tote_back.jpeg +0 -0
- data/db/samples/images/ruby_baseball.png +0 -0
- data/spec/lib/load_sample_spec.rb +0 -12
- data/spec/spec_helper.rb +0 -41
data/db/samples/products.rb
CHANGED
@@ -22,66 +22,136 @@ default_attrs = {
|
|
22
22
|
|
23
23
|
products = [
|
24
24
|
{
|
25
|
-
name: "
|
25
|
+
name: "Solidus T-Shirt",
|
26
26
|
tax_category: tax_category,
|
27
27
|
shipping_category: shipping_category,
|
28
|
-
price:
|
29
|
-
eur_price:
|
28
|
+
price: 19.99,
|
29
|
+
eur_price: 16,
|
30
|
+
weight: 0.5,
|
31
|
+
height: 20,
|
32
|
+
width: 10,
|
33
|
+
depth: 5
|
30
34
|
},
|
31
35
|
{
|
32
|
-
name: "
|
36
|
+
name: "Solidus Long Sleeve",
|
33
37
|
tax_category: tax_category,
|
34
38
|
shipping_category: shipping_category,
|
35
|
-
price:
|
36
|
-
eur_price:
|
39
|
+
price: 19.99,
|
40
|
+
eur_price: 16,
|
41
|
+
weight: 0.5,
|
42
|
+
height: 20,
|
43
|
+
width: 10,
|
44
|
+
depth: 5
|
37
45
|
},
|
38
46
|
{
|
39
|
-
name: "
|
47
|
+
name: "Solidus Girly",
|
40
48
|
tax_category: tax_category,
|
41
49
|
shipping_category: shipping_category,
|
42
50
|
price: 19.99,
|
43
|
-
eur_price: 16
|
51
|
+
eur_price: 16,
|
52
|
+
weight: 0.5,
|
53
|
+
height: 20,
|
54
|
+
width: 10,
|
55
|
+
depth: 5
|
44
56
|
},
|
45
57
|
{
|
46
|
-
name: "
|
58
|
+
name: "Solidus Snapback Cap",
|
47
59
|
tax_category: tax_category,
|
48
60
|
shipping_category: shipping_category,
|
49
|
-
price:
|
50
|
-
eur_price:
|
51
|
-
|
61
|
+
price: 15.99,
|
62
|
+
eur_price: 14,
|
63
|
+
weight: 0.5,
|
64
|
+
height: 5,
|
65
|
+
width: 5,
|
66
|
+
depth: 5
|
52
67
|
},
|
53
68
|
{
|
54
|
-
name: "
|
69
|
+
name: "Solidus Hoodie Zip",
|
70
|
+
tax_category: tax_category,
|
55
71
|
shipping_category: shipping_category,
|
72
|
+
price: 29.99,
|
73
|
+
eur_price: 27,
|
74
|
+
weight: 1,
|
75
|
+
height: 20,
|
76
|
+
width: 10,
|
77
|
+
depth: 5
|
78
|
+
},
|
79
|
+
{
|
80
|
+
name: "Ruby Hoodie",
|
56
81
|
tax_category: tax_category,
|
57
|
-
|
58
|
-
|
82
|
+
shipping_category: shipping_category,
|
83
|
+
price: 29.99,
|
84
|
+
eur_price: 27,
|
85
|
+
weight: 1,
|
86
|
+
height: 20,
|
87
|
+
width: 10,
|
88
|
+
depth: 5
|
59
89
|
},
|
60
90
|
{
|
61
|
-
name: "Ruby
|
91
|
+
name: "Ruby Hoodie Zip",
|
62
92
|
tax_category: tax_category,
|
63
93
|
shipping_category: shipping_category,
|
64
|
-
price:
|
65
|
-
eur_price:
|
94
|
+
price: 29.99,
|
95
|
+
eur_price: 27,
|
96
|
+
weight: 0.8,
|
97
|
+
height: 20,
|
98
|
+
width: 10,
|
99
|
+
depth: 5
|
66
100
|
},
|
67
101
|
{
|
68
|
-
name: "
|
102
|
+
name: "Ruby Polo",
|
69
103
|
tax_category: tax_category,
|
70
104
|
shipping_category: shipping_category,
|
71
|
-
price:
|
72
|
-
eur_price:
|
105
|
+
price: 26.99,
|
106
|
+
eur_price: 23,
|
107
|
+
weight: 0.5,
|
108
|
+
height: 20,
|
109
|
+
width: 10,
|
110
|
+
depth: 5
|
73
111
|
},
|
74
112
|
{
|
75
|
-
name: "
|
113
|
+
name: "Solidus Mug",
|
114
|
+
tax_category: tax_category,
|
115
|
+
shipping_category: shipping_category,
|
116
|
+
price: 9.99,
|
117
|
+
eur_price: 7,
|
118
|
+
weight: 1,
|
119
|
+
height: 5,
|
120
|
+
width: 5,
|
121
|
+
depth: 5
|
122
|
+
},
|
123
|
+
{
|
124
|
+
name: "Ruby Mug",
|
125
|
+
tax_category: tax_category,
|
126
|
+
shipping_category: shipping_category,
|
127
|
+
price: 9.99,
|
128
|
+
eur_price: 7,
|
129
|
+
weight: 1,
|
130
|
+
height: 5,
|
131
|
+
width: 5,
|
132
|
+
depth: 5
|
133
|
+
},
|
134
|
+
{
|
135
|
+
name: "Solidus Tote",
|
136
|
+
tax_category: tax_category,
|
76
137
|
shipping_category: shipping_category,
|
77
|
-
price:
|
78
|
-
eur_price:
|
138
|
+
price: 15.99,
|
139
|
+
eur_price: 14,
|
140
|
+
weight: 0.5,
|
141
|
+
height: 20,
|
142
|
+
width: 10,
|
143
|
+
depth: 5
|
79
144
|
},
|
80
145
|
{
|
81
|
-
name: "Ruby
|
146
|
+
name: "Ruby Tote",
|
147
|
+
tax_category: tax_category,
|
82
148
|
shipping_category: shipping_category,
|
83
|
-
price:
|
84
|
-
eur_price: 14
|
149
|
+
price: 15.99,
|
150
|
+
eur_price: 14,
|
151
|
+
weight: 0.5,
|
152
|
+
height: 20,
|
153
|
+
width: 10,
|
154
|
+
depth: 5
|
85
155
|
}
|
86
156
|
]
|
87
157
|
|
@@ -2,22 +2,45 @@
|
|
2
2
|
|
3
3
|
Spree::Sample.load_sample("orders")
|
4
4
|
|
5
|
-
order
|
6
|
-
inventory_unit = order.inventory_units.
|
5
|
+
order = Spree::Order.last
|
6
|
+
inventory_unit = order.inventory_units.take!
|
7
7
|
stock_location = inventory_unit.find_stock_item.stock_location
|
8
|
+
return_reason = Spree::ReturnReason.active.take!
|
9
|
+
preferred_reimbursement_type = Spree::ReimbursementType.where(name: 'Original').take!
|
10
|
+
admin_user = if defined?(Spree::Auth)
|
11
|
+
Spree.user_class.admin.take!
|
12
|
+
else
|
13
|
+
Spree.user_class.find_or_create_by!(email: 'admin@example.com')
|
14
|
+
end
|
8
15
|
|
9
|
-
|
16
|
+
# Mark the order paid and shipped
|
17
|
+
order.payments.pending.each(&:complete)
|
18
|
+
order.shipments.each do |shipment|
|
19
|
+
shipment.suppress_mailer = false
|
20
|
+
shipment.ship!
|
21
|
+
end
|
10
22
|
|
11
|
-
|
12
|
-
return_item.
|
13
|
-
|
23
|
+
# Create a return authorization
|
24
|
+
return_item = Spree::ReturnItem.new(
|
25
|
+
inventory_unit: inventory_unit,
|
26
|
+
preferred_reimbursement_type: preferred_reimbursement_type
|
27
|
+
)
|
14
28
|
|
15
|
-
|
16
|
-
|
17
|
-
return_items: [return_item]
|
29
|
+
order.return_authorizations.create!(
|
30
|
+
reason: return_reason,
|
31
|
+
return_items: [return_item],
|
32
|
+
stock_location: stock_location
|
18
33
|
)
|
19
34
|
|
20
|
-
|
21
|
-
|
22
|
-
return_items: [return_item]
|
35
|
+
# Create a customer return and mark it as received
|
36
|
+
customer_return = Spree::CustomerReturn.create!(
|
37
|
+
return_items: [return_item],
|
38
|
+
stock_location: stock_location
|
23
39
|
)
|
40
|
+
return_item.reload
|
41
|
+
return_item.receive!
|
42
|
+
customer_return.process_return!
|
43
|
+
|
44
|
+
# Accept the customer return and reimburse it
|
45
|
+
reimbursement = Spree::Reimbursement.build_from_customer_return(customer_return)
|
46
|
+
reimbursement.return_all(created_by: admin_user)
|
data/db/samples/taxons.rb
CHANGED
@@ -7,15 +7,18 @@ categories = Spree::Taxonomy.find_by!(name: "Categories")
|
|
7
7
|
brands = Spree::Taxonomy.find_by!(name: "Brand")
|
8
8
|
|
9
9
|
products = {
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
10
|
+
solidus_tshirt: "Solidus T-Shirt",
|
11
|
+
solidus_long: "Solidus Long Sleeve",
|
12
|
+
solidus_tote: "Solidus Tote",
|
13
|
+
ruby_tote: "Ruby Tote",
|
14
|
+
solidus_snapback_cap: "Solidus Snapback Cap",
|
15
|
+
solidus_hoodie: "Solidus Hoodie Zip",
|
16
|
+
ruby_hoodie: "Ruby Hoodie",
|
17
|
+
ruby_hoodie_zip: "Ruby Hoodie Zip",
|
18
|
+
ruby_polo: "Ruby Polo",
|
19
|
+
solidus_mug: "Solidus Mug",
|
20
|
+
ruby_mug: "Ruby Mug",
|
21
|
+
solidus_girly: "Solidus Girly"
|
19
22
|
}
|
20
23
|
|
21
24
|
products.each do |key, name|
|
@@ -29,29 +32,38 @@ taxons = [
|
|
29
32
|
position: 0
|
30
33
|
},
|
31
34
|
{
|
32
|
-
name: "
|
35
|
+
name: "Clothing",
|
36
|
+
taxonomy: categories,
|
37
|
+
parent: "Categories"
|
38
|
+
},
|
39
|
+
{
|
40
|
+
name: "Caps",
|
33
41
|
taxonomy: categories,
|
34
42
|
parent: "Categories",
|
35
43
|
position: 1,
|
36
44
|
products: [
|
37
|
-
products[:
|
38
|
-
products[:ror_bag]
|
45
|
+
products[:solidus_snapback_cap]
|
39
46
|
]
|
40
47
|
},
|
41
48
|
{
|
42
|
-
name: "
|
49
|
+
name: "Bags",
|
43
50
|
taxonomy: categories,
|
44
51
|
parent: "Categories",
|
45
52
|
position: 2,
|
46
53
|
products: [
|
47
|
-
products[:
|
48
|
-
products[:
|
54
|
+
products[:solidus_tote],
|
55
|
+
products[:ruby_tote]
|
49
56
|
]
|
50
57
|
},
|
51
58
|
{
|
52
|
-
name: "
|
59
|
+
name: "Mugs",
|
53
60
|
taxonomy: categories,
|
54
|
-
parent: "Categories"
|
61
|
+
parent: "Categories",
|
62
|
+
position: 3,
|
63
|
+
products: [
|
64
|
+
products[:solidus_mug],
|
65
|
+
products[:ruby_mug]
|
66
|
+
]
|
55
67
|
},
|
56
68
|
{
|
57
69
|
name: "Shirts",
|
@@ -59,7 +71,20 @@ taxons = [
|
|
59
71
|
parent: "Clothing",
|
60
72
|
position: 0,
|
61
73
|
products: [
|
62
|
-
products[:
|
74
|
+
products[:solidus_long],
|
75
|
+
products[:ruby_polo],
|
76
|
+
products[:solidus_girly]
|
77
|
+
]
|
78
|
+
},
|
79
|
+
{
|
80
|
+
name: "Hoodie",
|
81
|
+
taxonomy: categories,
|
82
|
+
parent: "Clothing",
|
83
|
+
position: 0,
|
84
|
+
products: [
|
85
|
+
products[:solidus_hoodie],
|
86
|
+
products[:ruby_hoodie],
|
87
|
+
products[:ruby_hoodie_zip]
|
63
88
|
]
|
64
89
|
},
|
65
90
|
{
|
@@ -67,10 +92,7 @@ taxons = [
|
|
67
92
|
taxonomy: categories,
|
68
93
|
parent: "Clothing",
|
69
94
|
products: [
|
70
|
-
products[:
|
71
|
-
products[:ror_ringer],
|
72
|
-
products[:apache_baseball_jersey],
|
73
|
-
products[:ruby_baseball_jersey]
|
95
|
+
products[:solidus_tshirt]
|
74
96
|
],
|
75
97
|
position: 0
|
76
98
|
},
|
@@ -79,33 +101,29 @@ taxons = [
|
|
79
101
|
taxonomy: brands
|
80
102
|
},
|
81
103
|
{
|
82
|
-
name: "
|
83
|
-
taxonomy: brands,
|
84
|
-
parent: "Brand",
|
85
|
-
products: [
|
86
|
-
products[:ruby_baseball_jersey]
|
87
|
-
]
|
88
|
-
},
|
89
|
-
{
|
90
|
-
name: "Apache",
|
104
|
+
name: "Solidus",
|
91
105
|
taxonomy: brands,
|
92
106
|
parent: "Brand",
|
93
107
|
products: [
|
94
|
-
products[:
|
108
|
+
products[:solidus_tshirt],
|
109
|
+
products[:solidus_long],
|
110
|
+
products[:solidus_snapback_cap],
|
111
|
+
products[:solidus_hoodie],
|
112
|
+
products[:solidus_mug],
|
113
|
+
products[:solidus_tote],
|
114
|
+
products[:solidus_girly]
|
95
115
|
]
|
96
116
|
},
|
97
117
|
{
|
98
|
-
name: "
|
118
|
+
name: "Ruby",
|
99
119
|
taxonomy: brands,
|
100
120
|
parent: "Brand",
|
101
121
|
products: [
|
102
|
-
products[:
|
103
|
-
products[:
|
104
|
-
products[:
|
105
|
-
products[:
|
106
|
-
products[:
|
107
|
-
products[:ror_jr_spaghetti],
|
108
|
-
products[:ror_ringer]
|
122
|
+
products[:ruby_hoodie],
|
123
|
+
products[:ruby_hoodie_zip],
|
124
|
+
products[:ruby_polo],
|
125
|
+
products[:ruby_mug],
|
126
|
+
products[:ruby_tote]
|
109
127
|
]
|
110
128
|
}
|
111
129
|
]
|
data/db/samples/variants.rb
CHANGED
@@ -3,123 +3,210 @@
|
|
3
3
|
Spree::Sample.load_sample("option_values")
|
4
4
|
Spree::Sample.load_sample("products")
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
6
|
+
solidus_tshirt = Spree::Product.find_by!(name: "Solidus T-Shirt")
|
7
|
+
solidus_long = Spree::Product.find_by!(name: "Solidus Long Sleeve")
|
8
|
+
solidus_snapback_cap = Spree::Product.find_by!(name: "Solidus Snapback Cap")
|
9
|
+
solidus_hoodie = Spree::Product.find_by!(name: "Solidus Hoodie Zip")
|
10
|
+
ruby_hoodie = Spree::Product.find_by!(name: "Ruby Hoodie")
|
11
|
+
ruby_hoodie_zip = Spree::Product.find_by!(name: "Ruby Hoodie Zip")
|
12
|
+
ruby_polo = Spree::Product.find_by!(name: "Ruby Polo")
|
13
|
+
solidus_mug = Spree::Product.find_by!(name: "Solidus Mug")
|
14
|
+
ruby_mug = Spree::Product.find_by!(name: "Ruby Mug")
|
15
|
+
solidus_tote = Spree::Product.find_by!(name: "Solidus Tote")
|
16
|
+
ruby_tote = Spree::Product.find_by!(name: "Ruby Tote")
|
17
|
+
solidus_girly = Spree::Product.find_by!(name: "Solidus Girly")
|
15
18
|
|
16
19
|
small = Spree::OptionValue.find_by!(name: "Small")
|
17
20
|
medium = Spree::OptionValue.find_by!(name: "Medium")
|
18
21
|
large = Spree::OptionValue.find_by!(name: "Large")
|
19
22
|
extra_large = Spree::OptionValue.find_by!(name: "Extra Large")
|
20
23
|
|
21
|
-
red = Spree::OptionValue.find_by!(name: "Red")
|
22
24
|
blue = Spree::OptionValue.find_by!(name: "Blue")
|
23
|
-
|
25
|
+
black = Spree::OptionValue.find_by!(name: "Black")
|
26
|
+
white = Spree::OptionValue.find_by!(name: "White")
|
24
27
|
|
25
28
|
variants = [
|
26
29
|
{
|
27
|
-
product:
|
28
|
-
option_values: [small,
|
29
|
-
sku: "
|
30
|
+
product: solidus_tshirt,
|
31
|
+
option_values: [small, blue],
|
32
|
+
sku: "SOL-00003",
|
33
|
+
cost_price: 17
|
34
|
+
},
|
35
|
+
{
|
36
|
+
product: solidus_tshirt,
|
37
|
+
option_values: [small, black],
|
38
|
+
sku: "SOL-00002",
|
39
|
+
cost_price: 17
|
40
|
+
},
|
41
|
+
{
|
42
|
+
product: solidus_tshirt,
|
43
|
+
option_values: [small, white],
|
44
|
+
sku: "SOL-00004",
|
45
|
+
cost_price: 17
|
46
|
+
},
|
47
|
+
{
|
48
|
+
product: solidus_tshirt,
|
49
|
+
option_values: [medium, blue],
|
50
|
+
sku: "SOL-00005",
|
51
|
+
cost_price: 17
|
52
|
+
},
|
53
|
+
{
|
54
|
+
product: solidus_tshirt,
|
55
|
+
option_values: [large, white],
|
56
|
+
sku: "SOL-00006",
|
57
|
+
cost_price: 17
|
58
|
+
},
|
59
|
+
{
|
60
|
+
product: solidus_tshirt,
|
61
|
+
option_values: [large, black],
|
62
|
+
sku: "SOL-00007",
|
63
|
+
cost_price: 17
|
64
|
+
},
|
65
|
+
{
|
66
|
+
product: solidus_tshirt,
|
67
|
+
option_values: [extra_large, blue],
|
68
|
+
sku: "SOL-0008",
|
69
|
+
cost_price: 17
|
70
|
+
},
|
71
|
+
{
|
72
|
+
product: solidus_long,
|
73
|
+
option_values: [small, black],
|
74
|
+
sku: "SOL-LS02",
|
30
75
|
cost_price: 17
|
31
76
|
},
|
32
77
|
{
|
33
|
-
product:
|
78
|
+
product: solidus_long,
|
79
|
+
option_values: [small, white],
|
80
|
+
sku: "SOL-LS01",
|
81
|
+
cost_price: 17
|
82
|
+
},
|
83
|
+
{
|
84
|
+
product: solidus_long,
|
34
85
|
option_values: [small, blue],
|
35
|
-
sku: "
|
86
|
+
sku: "SOL-LS03",
|
36
87
|
cost_price: 17
|
37
88
|
},
|
38
89
|
{
|
39
|
-
product:
|
40
|
-
option_values: [
|
41
|
-
sku: "
|
90
|
+
product: solidus_long,
|
91
|
+
option_values: [medium, white],
|
92
|
+
sku: "SOL-LS04",
|
42
93
|
cost_price: 17
|
43
94
|
},
|
44
95
|
{
|
45
|
-
product:
|
46
|
-
option_values: [medium,
|
47
|
-
sku: "
|
96
|
+
product: solidus_long,
|
97
|
+
option_values: [medium, black],
|
98
|
+
sku: "SOL-LS05",
|
48
99
|
cost_price: 17
|
49
100
|
},
|
50
101
|
{
|
51
|
-
product:
|
102
|
+
product: solidus_long,
|
52
103
|
option_values: [medium, blue],
|
53
|
-
sku: "
|
104
|
+
sku: "SOL-LS06",
|
54
105
|
cost_price: 17
|
55
106
|
},
|
56
107
|
{
|
57
|
-
product:
|
58
|
-
option_values: [
|
59
|
-
sku: "
|
108
|
+
product: solidus_long,
|
109
|
+
option_values: [large, white],
|
110
|
+
sku: "SOL-LS07",
|
60
111
|
cost_price: 17
|
61
112
|
},
|
62
113
|
{
|
63
|
-
product:
|
64
|
-
option_values: [large,
|
65
|
-
sku: "
|
114
|
+
product: solidus_long,
|
115
|
+
option_values: [large, black],
|
116
|
+
sku: "SOL-LS08",
|
66
117
|
cost_price: 17
|
67
118
|
},
|
68
119
|
{
|
69
|
-
product:
|
120
|
+
product: solidus_long,
|
70
121
|
option_values: [large, blue],
|
71
|
-
sku: "
|
122
|
+
sku: "SOL-LS09",
|
123
|
+
cost_price: 17
|
124
|
+
},
|
125
|
+
{
|
126
|
+
product: solidus_girly,
|
127
|
+
option_values: [small, black],
|
128
|
+
sku: "SOL-WM001",
|
129
|
+
cost_price: 17
|
130
|
+
},
|
131
|
+
{
|
132
|
+
product: solidus_girly,
|
133
|
+
option_values: [small, blue],
|
134
|
+
sku: "SOL-WM002",
|
72
135
|
cost_price: 17
|
73
136
|
},
|
74
137
|
{
|
75
|
-
product:
|
76
|
-
option_values: [
|
77
|
-
sku: "
|
138
|
+
product: solidus_girly,
|
139
|
+
option_values: [small, white],
|
140
|
+
sku: "SOL-WM003",
|
78
141
|
cost_price: 17
|
79
142
|
},
|
80
143
|
{
|
81
|
-
product:
|
82
|
-
option_values: [
|
83
|
-
sku: "
|
144
|
+
product: solidus_girly,
|
145
|
+
option_values: [medium, blue],
|
146
|
+
sku: "SOL-WM004",
|
147
|
+
cost_price: 17
|
148
|
+
},
|
149
|
+
{
|
150
|
+
product: solidus_girly,
|
151
|
+
option_values: [medium, white],
|
152
|
+
sku: "SOL-WM005",
|
153
|
+
cost_price: 17
|
154
|
+
},
|
155
|
+
{
|
156
|
+
product: solidus_girly,
|
157
|
+
option_values: [medium, black],
|
158
|
+
sku: "SOL-WM006",
|
84
159
|
cost_price: 17
|
85
160
|
}
|
86
161
|
]
|
87
162
|
|
88
163
|
masters = {
|
89
|
-
|
90
|
-
sku: "
|
164
|
+
solidus_tote => {
|
165
|
+
sku: "SOL-TOT01",
|
91
166
|
cost_price: 17
|
92
167
|
},
|
93
|
-
|
94
|
-
sku: "
|
168
|
+
ruby_tote => {
|
169
|
+
sku: "RUB-TOT01",
|
95
170
|
cost_price: 17
|
96
171
|
},
|
97
|
-
|
98
|
-
sku: "
|
99
|
-
cost_price: 21
|
100
|
-
},
|
101
|
-
ror_jr_spaghetti => {
|
102
|
-
sku: "ROR-00013",
|
172
|
+
solidus_snapback_cap => {
|
173
|
+
sku: "SOL-SNC01",
|
103
174
|
cost_price: 17
|
104
175
|
},
|
105
|
-
|
106
|
-
sku: "
|
107
|
-
cost_price:
|
176
|
+
solidus_tshirt => {
|
177
|
+
sku: "SOL-00001",
|
178
|
+
cost_price: 17
|
108
179
|
},
|
109
|
-
|
110
|
-
sku: "
|
180
|
+
solidus_long => {
|
181
|
+
sku: "SOL-LS00",
|
111
182
|
cost_price: 17
|
112
183
|
},
|
113
|
-
|
114
|
-
sku: "
|
115
|
-
cost_price:
|
184
|
+
solidus_hoodie => {
|
185
|
+
sku: "SOL-HD00",
|
186
|
+
cost_price: 27
|
116
187
|
},
|
117
|
-
|
118
|
-
sku: "
|
119
|
-
cost_price:
|
188
|
+
ruby_hoodie => {
|
189
|
+
sku: "RUB-HD01",
|
190
|
+
cost_price: 27
|
191
|
+
},
|
192
|
+
ruby_hoodie_zip => {
|
193
|
+
sku: "RUB-HD00",
|
194
|
+
cost_price: 27
|
195
|
+
},
|
196
|
+
ruby_polo => {
|
197
|
+
sku: "RUB-PL01",
|
198
|
+
cost_price: 23
|
199
|
+
},
|
200
|
+
solidus_mug => {
|
201
|
+
sku: "SOL-MG01",
|
202
|
+
cost_price: 7
|
203
|
+
},
|
204
|
+
ruby_mug => {
|
205
|
+
sku: "RUB-MG01",
|
206
|
+
cost_price: 7
|
120
207
|
},
|
121
|
-
|
122
|
-
sku: "
|
208
|
+
solidus_girly => {
|
209
|
+
sku: "SOL-WM00",
|
123
210
|
cost_price: 17
|
124
211
|
}
|
125
212
|
}
|
@@ -127,5 +214,5 @@ masters = {
|
|
127
214
|
Spree::Variant.create!(variants)
|
128
215
|
|
129
216
|
masters.each do |product, variant_attrs|
|
130
|
-
product.master.
|
217
|
+
product.master.update!(variant_attrs)
|
131
218
|
end
|