...
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.:
Format | Velocity Code* | Example Output | HTML Elements | Comments |
---|---|---|---|---|
.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 span | You 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. |
...