Version: - string  


Returns the input field for the custom order field.

Custom order fields can be used to be filled in by customers during checkout. For instance, you can create an order field where customers can enter coupon codes to receive discounts or you can create a checkbox where customers can specify wheter or not they want additional services, such as a product catalog, along with their order.


Order fields are created in Management Center > eCommerce settings > Orders > Order fields).


Custom order fields can be used together with the Sales Discount module, where you can create an Order field discount. This means that you can create a Voucher field as order field and then create an order field discount that e.g. gives the customer a 10% discount, if he enters a predefined voucher code to the order.


Outputting the template tag


Check if tag has a value

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

Assign tag to a value for later use

@{ string storedTag = GetString("CustomOrderFields"); }

Outputting the template tag


Check if string has a value

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