Ecom:Product.DefaultVariantComboID

Version: - string  

Summary

Returns the default variant ID for the product.

Settings

The value is based on the Default dropdown on the Variants tab for a product.

(Ecommerce > Product Catalog > Shop > Product group > Product > Variants tab > Variant groups - Default (primary) variant for main product)

Examples

Outputting the template tag

@GetString("Ecom:Product.DefaultVariantComboID")

Check if tag has a value

@if(!string.IsNullOrWhiteSpace(GetString("Ecom:Product.DefaultVariantComboID"))) { @* Tag has value, so let's do something useful here. *@ }

Assign tag to a value for later use

@{ string storedTag = GetString("Ecom:Product.DefaultVariantComboID"); }

Outputting the template tag

<!--@Ecom:Product.DefaultVariantComboID-->

Check if string has a value

<!--@If Defined(@Ecom:Product.DefaultVariantComboID)--> Let's output this tag here: <strong><!--@Ecom:Product.DefaultVariantComboID--></strong> <!--@EndIf(@Ecom:Product.DefaultVariantComboID)-->