spree_skroutz 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f659c881a6d87e8baf537da89935fc68488846f1300654e1678f0a1d835dda58
4
- data.tar.gz: 29b7bab46ebac06f6fabf31ba104c323758813325e6e636545494995eb23c758
3
+ metadata.gz: f30eeebfa435352569d376c5d3514953143e1a63fdec33b3340836d874dc08e4
4
+ data.tar.gz: cef6c7a6be8731fadc33d45116757ab62afce3d6c659f16d628bbe87abd5295b
5
5
  SHA512:
6
- metadata.gz: cd831849c752b273e8ab96feec3052260413f333399555bcc2873403515af047f116b4aa49ff7f2fe7bf51195586443eca399cd0bfed40e870fc5f2f1f26d8e4
7
- data.tar.gz: 00b740d7e5e23b04fe4d9d3698b103cb5bb8c083e66432a73fd6be40893c8536ee77bc12553e1ef49fdf9df2cebdaaeb0da0617fb2222031e18dc24ec7d9aaf7
6
+ metadata.gz: e524e70de7f420e827caa7b2b1dfd82762a5ab50bec4118778929000db67a96782768e8c13530f2af83c060321d4575a67e7e1987f019d63d1a192dc715b81eb
7
+ data.tar.gz: 3f3ff232f7cd98f8d3c9e4bf50cba311df4927f451d5257c33ba3be31787eb5d7b210e880aaa176e362b2aff82b1dd70688c9184d2aeacc67f507747461e11da
@@ -74,9 +74,13 @@ xml.mywebstore do
74
74
 
75
75
  xml.tag! "quantity", product.total_on_hand
76
76
 
77
- if product.has_variants?
77
+ size_variants = product.variants.select { |v|
78
+ v.option_values.any? { |ov| ov.option_type.name.downcase == 'size' }
79
+ }
80
+
81
+ if size_variants.any?
78
82
  xml.variations do
79
- product.variants.each do |variant|
83
+ size_variants.each do |variant|
80
84
  xml.variation do
81
85
  xml.tag! "variationid", variant.id
82
86
  xml.tag! "availability", variant.in_stock? ? "In stock" : "Out of stock"
@@ -86,7 +90,7 @@ xml.mywebstore do
86
90
  size = variant.option_values.select{|ov| ov.option_type.name.downcase == 'size' }
87
91
  .map(&:presentation)
88
92
  .uniq
89
- xml.tag! "size", size.join(',') if size.any?
93
+ xml.tag! "size", size.join(',')
90
94
 
91
95
  xml.tag! "quantity", variant.total_on_hand
92
96
  end
@@ -1,5 +1,5 @@
1
1
  module SpreeSkroutz
2
- VERSION = '1.1.2'.freeze
2
+ VERSION = '1.1.3'.freeze
3
3
 
4
4
  def gem_version
5
5
  Gem::Version.new(VERSION)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_skroutz
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - OlympusOne
@@ -107,10 +107,10 @@ licenses:
107
107
  - MIT
108
108
  metadata:
109
109
  bug_tracker_uri: https://github.com/olympusone/spree_skroutz/issues
110
- changelog_uri: https://github.com/olympusone/spree_skroutz/releases/tag/v1.1.2
110
+ changelog_uri: https://github.com/olympusone/spree_skroutz/releases/tag/v1.1.3
111
111
  documentation_uri: https://github.com/olympusone/spree_skroutz
112
112
  homepage_uri: https://github.com/olympusone/spree_skroutz
113
- source_code_uri: https://github.com/olympusone/spree_skroutz/tree/v1.1.2
113
+ source_code_uri: https://github.com/olympusone/spree_skroutz/tree/v1.1.3
114
114
  rdoc_options: []
115
115
  require_paths:
116
116
  - lib
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
126
  version: '0'
127
127
  requirements:
128
128
  - none
129
- rubygems_version: 3.6.9
129
+ rubygems_version: 4.0.3
130
130
  specification_version: 4
131
131
  summary: Spree Commerce Skroutz Extension
132
132
  test_files: []