Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Here are the classes and ids available to enable dynamic variations (note, the actual code does not have line breaks or spaces in the names.:

FormatVelocity Code*Example OutputHTML ElementsComments
.uc-variation
-form
-<ITEMID>
class="uc-variation
-form
-${item.getMerchantItemID()}"
class="uc-variation-form-SHIRT"
form

this can be inside your #if($hasVariations) or outside. It's just a class name, and won't hurt anything if it's not used.

If present, the form submit will be bound to a validation routine that will alert the user of empty fields and cancel the submit.

uc-variation
-label
-<VARIATION_INDEX>
-<ITEMID>
uc-variation
-label
-${velocityCount}
-${item.getMerchantItemID()}
class="uc-variation-label-0-SHIRT"any element used for a label, such as td or spanYou might wonder why the variation index is used instead of the variation name, because the name would reach better. The answer is because the index is safe. It's just a number. Some UltraCart merchant have strange variation names containing unsafe characters in them. So, we use the index to reduce the risk of breaking a page.
     
     
     
     

...