e_plat 1.1.0.pre.rc.7 → 1.1.0.pre.rc.8

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: 833b26a5921eefe442db62b9fe641e6f5e46867f8cc0f48ceb2408445620d336
4
- data.tar.gz: 52d27808a6b87c2cd0cb665ee2cf8f69762a016e049fedee6e7be6f6d173734a
3
+ metadata.gz: 46fbc594c104c4beedff0ba465d323dee4dc3dec07487506d697f74b2f5cf93c
4
+ data.tar.gz: e76bfe7bc0033f416833c720d759467dc02fb16e49b69c10c092e19f23ef9f63
5
5
  SHA512:
6
- metadata.gz: '09ce505d88e5606f687c36df5eb7598410dff69a5c414ca294bf518d8538c14dd38e0fac49f3982c1ca707e89a84dca05e4275549ae247c8166188bc966bc7c8'
7
- data.tar.gz: d9e38fd5731e7dfac6dc723acf5946832017cbc3ab14f8835dcbbd83e5bbcaa69435550e62e0446ec33c16030727347b8a4a8a6e924cd3b7419641941eea5816
6
+ metadata.gz: af5a27b232c51e295b8e7fa4ff1b7ddaa29b5671e412ca3847a851c28b347b9ed1807d323419619185b6ae42a030a442525d927f71da3cd8027faef9e79f9620
7
+ data.tar.gz: 6a3f66b61023373ec10546ad49ab452c349afca9e58034d0625299d3620f94605ba3c591d6db0ade2468a4f7fc35139db7562634167919c94733851e18eb2418
@@ -20,12 +20,14 @@ module EPlat::Woocommerce
20
20
  def initialize(attributes = {}, persisted = false)
21
21
  super
22
22
 
23
- # Ensure option_values have stable IDs based on name
23
+ # Ensure option_values have stable IDs based on name and option value combined
24
24
  if self.option_values.present?
25
25
  self.option_values.each do |option_value|
26
26
  if (option_value.attributes["id"].nil? || option_value.attributes["id"] == 0) && option_value.name.present?
27
- # Use the same deterministic ID generation method as product options
28
- option_value.attributes["id"] = string_to_consistent_id(option_value.name)
27
+ # Generate a unique ID based on both name and option value
28
+ # This ensures options with the same name but different values get different IDs
29
+ name_option_key = "#{option_value.name}_#{option_value.option}"
30
+ option_value.attributes["id"] = string_to_consistent_id(name_option_key)
29
31
  end
30
32
  end
31
33
  end
@@ -1,3 +1,3 @@
1
1
  module EPlat
2
- VERSION = "1.1.0-rc.7"
2
+ VERSION = "1.1.0-rc.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: e_plat
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0.pre.rc.7
4
+ version: 1.1.0.pre.rc.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - oliwoodsuk