As razor is getting more and more attention im looking for a way to expose our data in Tea Commerce to the razor people to work with. Today we have an xslt extension called GetCurrentOrderXml which gives the developer the possibility to use it in their xslt macro. But I want to make the same data available to the razor people. But how to do that?
We have a public method called GetCurrentOrder which returns an Order object. Could that be used in Razor and if yes - how?
Hi, I haven't used Tea Commerce (yet), but razor can be used just like an ascx with a cleaner syntax (and without codebehinds). So you should be able to do any c# like:
@using TeaCommerceNameSpace @{ var order = GetCurrentOrder(); } <p>@order.CustomerName</p>
Making data available to razor in templates
As razor is getting more and more attention im looking for a way to expose our data in Tea Commerce to the razor people to work with. Today we have an xslt extension called GetCurrentOrderXml which gives the developer the possibility to use it in their xslt macro. But I want to make the same data available to the razor people. But how to do that?
We have a public method called GetCurrentOrder which returns an Order object. Could that be used in Razor and if yes - how?
Hi, I haven't used Tea Commerce (yet), but razor can be used just like an ascx with a cleaner syntax (and without codebehinds). So you should be able to do any c# like:
Cool I will try that!
is working on a reply...