spree_frontend 4.0.0.rc3 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d24ffaf2244c3ad2ab2000f12ac48d16ef6ee2185a08d78d72ea917e30b5462a
|
4
|
+
data.tar.gz: c1c80ceff9541c70f31b3a1fb570e9da89376c9b2c4e5fcb151a8af5dae5319f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55afcbf886799fcc0dcb3b992d1c27a6fd215f6f2bef1a84aec2518d9aebbb1db83e680103c442dc908b57668b62abe4cd410798ae467f2b39945673b584dbeb
|
7
|
+
data.tar.gz: 28082669c3774436535644bb90f2588707ed0ebc8090d7f9befd3f66167bf15a9dcda3d92b17f9db39e90c3ee71d6b8e9b1bf4a632660fa98dc7659cedc6a847
|
@@ -42,11 +42,11 @@ module Spree
|
|
42
42
|
if @order.bill_address_id != @order.ship_address_id && bill_address == ship_address
|
43
43
|
@order.update_column(:bill_address_id, ship_address.id)
|
44
44
|
bill_address.destroy
|
45
|
-
|
45
|
+
elsif params[:save_user_address]
|
46
46
|
bill_address.update_attribute(:user_id, try_spree_current_user&.id)
|
47
47
|
end
|
48
48
|
|
49
|
-
ship_address.update_attribute(:user_id, try_spree_current_user&.id)
|
49
|
+
ship_address.update_attribute(:user_id, try_spree_current_user&.id) if params[:save_user_address]
|
50
50
|
end
|
51
51
|
end
|
52
52
|
end
|
@@ -13,32 +13,34 @@ module Spree
|
|
13
13
|
private
|
14
14
|
|
15
15
|
def structured_product_hash(product)
|
16
|
-
{
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
name: product.name,
|
22
|
-
image: structured_images(product),
|
23
|
-
description: product.description,
|
24
|
-
sku: product.sku,
|
25
|
-
offers: {
|
26
|
-
'@type': 'Offer',
|
27
|
-
price: product.price,
|
28
|
-
priceCurrency: current_currency,
|
29
|
-
availability: product.in_stock? ? 'InStock' : 'OutOfStock',
|
16
|
+
Rails.cache.fetch("spree/structured-data/#{product.cache_key}") do
|
17
|
+
{
|
18
|
+
'@context': 'https://schema.org/',
|
19
|
+
'@type': 'Product',
|
20
|
+
'@id': "#{spree.root_url}product_#{product.id}",
|
30
21
|
url: spree.product_url(product),
|
31
|
-
|
22
|
+
name: product.name,
|
23
|
+
image: structured_images(product),
|
24
|
+
description: product.description,
|
25
|
+
sku: product.sku,
|
26
|
+
offers: {
|
27
|
+
'@type': 'Offer',
|
28
|
+
price: product.price,
|
29
|
+
priceCurrency: current_currency,
|
30
|
+
availability: product.in_stock? ? 'InStock' : 'OutOfStock',
|
31
|
+
url: spree.product_url(product),
|
32
|
+
availabilityEnds: product.discontinue_on ? product.discontinue_on.strftime('%F') : ''
|
33
|
+
}
|
32
34
|
}
|
33
|
-
|
35
|
+
end
|
34
36
|
end
|
35
37
|
|
36
38
|
def structured_images(product)
|
37
|
-
|
39
|
+
image = product.variant_images.first
|
38
40
|
|
39
|
-
return '' unless
|
41
|
+
return '' unless image
|
40
42
|
|
41
|
-
main_app.rails_blob_url(
|
43
|
+
main_app.rails_blob_url(image.attachment)
|
42
44
|
end
|
43
45
|
end
|
44
46
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_frontend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.0
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-09
|
11
|
+
date: 2019-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spree_api
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.0.0
|
19
|
+
version: 4.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 4.0.0
|
26
|
+
version: 4.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: spree_core
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 4.0.0
|
33
|
+
version: 4.0.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 4.0.0
|
40
|
+
version: 4.0.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bootstrap
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -262,9 +262,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
262
262
|
version: 2.5.0
|
263
263
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
264
264
|
requirements:
|
265
|
-
- - "
|
265
|
+
- - ">="
|
266
266
|
- !ruby/object:Gem::Version
|
267
|
-
version:
|
267
|
+
version: '0'
|
268
268
|
requirements:
|
269
269
|
- none
|
270
270
|
rubygems_version: 3.0.2
|