Ecom:LastAddedProduct.Name

Version: - string  

Summary

Returns the name of the product that is last added to the shopping cart.

Settings

The value is based on the Name input field under the General tab for a product.

(Ecommerce > Product Catalog > Product group/product > General tab > General panel - Name)

Examples

Outputting the template tag

@GetString("Ecom:LastAddedProduct.Name")

Check if tag has a value

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

Assign tag to a value for later use

@{ string storedTag = GetString("Ecom:LastAddedProduct.Name"); }

Outputting the template tag

<!--@Ecom:LastAddedProduct.Name-->

Check if string has a value

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