Advertisement
Guest User

Untitled

a guest
Aug 24th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. <mvt:comment>
  2. Null the current status value
  3. </mvt:comment>
  4. <mvt:assign name="l.final_outputted_value" value="''" />
  5.  
  6. <mvt:comment>
  7. Substring placeholder
  8. </mvt:comment>
  9. <mvt:assign name="l.substring" value="'placeholder'" />
  10.  
  11. <mvt:comment>
  12. Current token position
  13. </mvt:comment>
  14. <mvt:assign name="l.position" value="1" />
  15.  
  16. <mvt:comment>
  17. While get token is returning a substring continue
  18. </mvt:comment>
  19. <mvt:while expr="NOT ISNULL l.substring">
  20. <mvt:comment>
  21. Return substring
  22. </mvt:comment>
  23. <mvt:assign name="l.substring" value="gettoken( l.delimited_string, '_', l.position)" />
  24.  
  25. <mvt:comment>
  26. Concat custom order status. Each custom order status will be snake case
  27. and will be formatted to be title case. For example, "order_processing" -> "Order Processing"
  28. </mvt:comment>
  29. <mvt:assign name="l.final_outputted_value" value="l.final_outputted_value $ toupper(substring( l.substring, 1, 1 )) $ substring( l.substring, 2, len_var(l.substring)) $ ' '" />
  30.  
  31. <mvt:comment>
  32. Increment position index
  33. </mvt:comment>
  34. <mvt:assign name="l.position" value="l.position + 1" />
  35. </mvt:while>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement