Product Price parameter

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 Jahre weitere
Hello!
I have such code
<div class="buy_in_credit" artikul="221" razmer="78x21" cena="" nazva="@Model.Name" tovarpage="@Url.RouteUrl("Product", new { SeName = Model.SeName })"></div>  

on Product page.
I need to place the price of product to the cena="productprice".

Please help!
11 Jahre weitere
Hi,

var defaultProductVariant = Model.ProductVariantModels.Count > 0 ? Model.ProductVariantModels[0] : null;
var productPrice = defaultProductVariant.ProductVariantPrice.Price;

cena="@productPrice"
11 Jahre weitere
Thanks.
It is @defaultProductVariant.ProductVariantPrice.Price or @defaultProductVariant.ProductVariantPrice.PriceValue
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.