Displaying Order Line Details in confirmation Emails
Hi I wonder if someone could assist....
Using the Avenue Clothing store demo I'm trying to display the list of what items have been purchased in the confirmation email but I'm unable to 'get into' the order line details. I'm not sure what properties are available to me and how to display them. Currently I've gotten this:
@using UCommerce.EntitiesV2
@{
var orderGuid = new Guid(umbraco.library.RequestQueryString("orderGuid"));
var purchaseOrder = PurchaseOrder.All().Single(x => x.OrderGuid == orderGuid);
foreach (OrderLine orderLine in purchaseOrder.OrderLines){
<div>@orderGuid</div>;
}
}
Which will repeat the orderGuid for each produst that has been purchased. But I'd like to display the purchasers details, product description, etc.
Could someone point me in the right direction please?
Take a look at the Cart.cshtml file (in macroScripts) that comes with Avenue Clothing. It renders the cart page and will give you a good idea of all the information you can access on an order line.
Also if you create a Visual Studio project and edit your macros there you should get some Intellisense support, which will make the properties more discoverable.
I need to link order numbers with order details, i try to match with those lines below:
but i think GetOrderProperty is not suitable here to get the order details in umbraco.. What method should I use, your fast help is very much appreciated
Displaying Order Line Details in confirmation Emails
Hi I wonder if someone could assist....
Using the Avenue Clothing store demo I'm trying to display the list of what items have been purchased in the confirmation email but I'm unable to 'get into' the order line details. I'm not sure what properties are available to me and how to display them. Currently I've gotten this:
@using UCommerce.EntitiesV2
@{
var orderGuid = new Guid(umbraco.library.RequestQueryString("orderGuid"));
var purchaseOrder = PurchaseOrder.All().Single(x => x.OrderGuid == orderGuid);
foreach (OrderLine orderLine in purchaseOrder.OrderLines){
<div>@orderGuid</div>;
}
}
Which will repeat the orderGuid for each produst that has been purchased. But I'd like to display the purchasers details, product description, etc.
Could someone point me in the right direction please?
Thanks,
Craig
Hi Craig,
Take a look at the Cart.cshtml file (in macroScripts) that comes with Avenue Clothing. It renders the cart page and will give you a good idea of all the information you can access on an order line.
Also if you create a Visual Studio project and edit your macros there you should get some Intellisense support, which will make the properties more discoverable.
Hope this helps.
Thanks Søren, I shall give this a whirl!
Hi,
I need to link order numbers with order details, i try to match with those lines below:
but i think GetOrderProperty is not suitable here to get the order details in umbraco.. What method should I use, your fast help is very much appreciated
<xsl:template match="/">
<!-- start writing XSLT -->
<xsl:variable name="orderLineId" select="umbraco.library:RequestQueryString('orderLineId')"/>
<!-- <xsl:if test="$id!= ''">-->
<xsl:variable name="orders" select="CommerceLibrary:GetOrderProperty($orderLineId)"/>
is working on a reply...