Version: - price  


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


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)


Outputting the template tag


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


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)-->