Last active
March 29, 2024 12:03
-
-
Save NazarenkoDenis/d1db9139c83efcbf4e475fd3a805e42e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VAR l_from_variant_name = convert(regexp_match(order_items.variant_name, '\d{2,4}'), INT) | |
VAR l_from_props = convert(case( | |
not(is_empty(json_path(order_items.properties, "#(name=""Custom Length"").value"))), json_path(order_items.properties, "#(name=""Custom Length"").value"), | |
not(is_empty(json_path(order_items.properties, "#(name=""Wunschlänge"").value"))), json_path(order_items.properties, "#(name=""Wunschlänge"").value"), | |
not(is_empty(json_path(order_items.properties, "#(name=""Longueur sur mesure"").value"))), json_path(order_items.properties, "#(name=""Longueur sur mesure"").value"), | |
not(is_empty(json_path(order_items.properties, "#(name=""Aangepaste lengte"").value"))), json_path(order_items.properties, "#(name=""Aangepaste lengte"").value"), | |
not(is_empty(json_path(order_items.properties, "#(name=""Expédié après"").value"))), json_path(order_items.properties, "#(name=""Expédié après"").value"), | |
not(is_empty(json_path(order_items.properties, "#(name=""Anpassad längd"").value"))), json_path(order_items.properties, "#(name=""Anpassad längd"").value"), | |
not(is_empty(json_path(order_items.properties, "#(name=""Lunghezza personalizzato"").value"))), json_path(order_items.properties, "#(name=""Lunghezza personalizzato"").value"), | |
not(is_empty(json_path(order_items.properties, "#(name=""Wunschlänge in cm"").value"))), json_path(order_items.properties, "#(name=""Wunschlänge in cm"").value"), | |
0 | |
), INT) | |
RETURN if(l_from_variant_name > 0, l_from_variant_name, l_from_props) |
zentmipler
commented
Mar 29, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment