Ecom:LastAddedProduct.Price
Version: - priceSummary
Returns the price of the product that is last added to the shopping cart.
Settings
The value is based on the Price input field under the General tab for a product.
(Ecommerce > Product Catalog > Product group/product > General tab > General panel - Price)
Examples
Outputting the template tag
@GetPrice("Ecom:LastAddedProduct.Price")
Check if tag has a value
@if(!double.IsNullOrWhiteSpace(GetPrice("Ecom:LastAddedProduct.Price"))) {
@* Tag has value, so let's do something useful here. *@
}
Assign tag to a value for later use
@{
double storedTag = GetPrice("Ecom:LastAddedProduct.Price");
}
Outputting the template tag
<!--@Ecom:LastAddedProduct.Price-->
Check if price has a value
<!--@If Defined(@Ecom:LastAddedProduct.Price)-->
Let's output this tag here: <strong><!--@Ecom:LastAddedProduct.Price--></strong>
<!--@EndIf(@Ecom:LastAddedProduct.Price)-->