But the this is it gives me this errror"Error loading MacroEngine script"
but if i dont use TeaCommerce.FormatPrice and just use @page.productPriceDKK it shows the correct value... I have tried everything but seems not to work... It also gives med an error on decimal.Parse(@page.productPriceDKK.ToString()) or decimal.Parse(@page.productPriceDKK)
What i am doing wrong, i have almost tried everything but cannot get it work...
I believe the FormatPrice method takes a string as parameter instead of a decimal. Try running the page with ?umbDebugShowTrace=true, then you should see the error in red somewhere in the debug log on the page.
Error loading MacroEngine script
Hi there,
I have a very annoying issue...
My code below here shows specific product with related property
@using umbraco.MacroEngines
@using umbraco.cms.businesslogic.media
@using uComponents.Core
@using uComponents.Core.uQueryExtensions
@using System;
@using System.Xml.XPath;
@using System.Linq;
@using System.Xml.Linq;
@using System.Linq.Expressions;
@using TeaCommerce.Razor;
@using TeaCommerce.Data;
@inherits umbraco.MacroEngines.DynamicNodeContext;
<head>
<link href="../css/ecommerce.css" rel="Stylesheet" type="text/css" />
</head>
@{
@foreach (var page in @Model.AncestorOrSelf().Descendants("Product"))
{
var tilbud = @page.GetProperty("ugensTilbud").Value;
var mediaId = @page.GetProperty("productImage").Value;
var currentCurrency = TeaCommerce.GetCurrentCurrency();
var price = TeaCommerce.FormatPrice(decimal.Parse(@page.productPriceDKK));
<span itemprop="price" style="font-size:16px; color:#fff">@price</span>
}
}
But the this is it gives me this errror"Error loading MacroEngine script"
but if i dont use TeaCommerce.FormatPrice and just use @page.productPriceDKK it shows the correct value... I have tried everything but seems not to work... It also gives med an error on decimal.Parse(@page.productPriceDKK.ToString()) or decimal.Parse(@page.productPriceDKK)
What i am doing wrong, i have almost tried everything but cannot get it work...
Hi Rehan,
I believe the FormatPrice method takes a string as parameter instead of a decimal. Try running the page with ?umbDebugShowTrace=true, then you should see the error in red somewhere in the debug log on the page.
/Rune
is working on a reply...