spree_core 3.6.1 → 3.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/spree/core/version.rb +1 -1
- metadata +2 -3
- data/db/default/spree/promotions.rb +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c57e8d3eab73d4b366d0990c186cc3fe5955c88297a859056794ff7b2f9dc8a2
|
4
|
+
data.tar.gz: a1405c60d3d19bba3f72d970e1824d68d7821e5aa9ecea70375c4cda40e70e97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c38001b39cffe00f5264c3105dade4a9beba3e3a0744057b551e91e4c75e3921b87619a7aeb0397733cb8d8ede56eb0871d9e01812d125ecc11c308f61e934f3
|
7
|
+
data.tar.gz: '050654309f811dd6cc9c409964a85b57a3dfb6eb87ed1962fa70c46de8cf9ce61659475b8f959a34299b56ba8b79b8ac508abb73e57215aedd359903692947d4'
|
data/lib/spree/core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.6.
|
4
|
+
version: 3.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemerchant
|
@@ -595,7 +595,6 @@ files:
|
|
595
595
|
- config/routes.rb
|
596
596
|
- db/default/spree/countries.rb
|
597
597
|
- db/default/spree/default_reimbursement_type.rb
|
598
|
-
- db/default/spree/promotions.rb
|
599
598
|
- db/default/spree/roles.rb
|
600
599
|
- db/default/spree/states.rb
|
601
600
|
- db/default/spree/stores.rb
|
@@ -1,23 +0,0 @@
|
|
1
|
-
Spree::Sample.load_sample('option_values')
|
2
|
-
Spree::Sample.load_sample('products')
|
3
|
-
|
4
|
-
product = Spree::Product.find_by(name: 'Ruby on Rails Baseball Jersey')
|
5
|
-
size = Spree::OptionValue.find_by(name: 'Small')
|
6
|
-
color = Spree::OptionValue.find_by(name: 'Red')
|
7
|
-
eligible_values = "#{size.id},#{color.id}"
|
8
|
-
|
9
|
-
promotion = Spree::Promotion.where(
|
10
|
-
name: 'free shipping',
|
11
|
-
usage_limit: nil,
|
12
|
-
path: nil,
|
13
|
-
match_policy: 'any',
|
14
|
-
description: ''
|
15
|
-
).first_or_create
|
16
|
-
|
17
|
-
Spree::PromotionRule.where(
|
18
|
-
promotion_id: promotion.id,
|
19
|
-
type: 'Spree::Promotion::Rules::OptionValue',
|
20
|
-
preferences: { match_policy: 'any', eligible_values: { product.id.to_s => eligible_values } }
|
21
|
-
).first_or_create
|
22
|
-
|
23
|
-
Spree::Promotion::Actions::FreeShipping.where(promotion_id: promotion.id).first_or_create
|