Thanks for being awesome and posting the reply in the forum.
A simpler way to instantiate it is the following:
var purchaseOrderRenderer = ObjectFactory.Instance.Resolve<IXmlRenderer<PurhcaseOrder>>();
The change was made to make the XML rendering layer fully pluggable. With uCommerce 3 you can swap out any XML renderer and generate the exact XML you want.
How to instantiate PurchaseOrderRenderer?
There used to be previously a static method called Create():
http://www.ucommerce.dk/docs/html/M_UCommerce_Xslt_Rendering_PurchaseOrderRenderer_Create.htm
But it appears to have been removed from uCommerce v3.
There's a constructor in this class, but what should use in there?
The answer to the question is the following:
var renderer = new PurchaseOrderRenderer(
new OrderLineRenderer(new OrderPropertyRenderer(), new DiscountRenderer()),
new CustomerRenderer(new AddressRenderer()),
new AddressRenderer(),
new ShipmentRenderer(new AddressRenderer()),
new PaymentRenderer(),
new OrderPropertyRenderer(),
new DiscountRenderer());
Found out the implementation of the IXmlRenderers types by searching in this file: \umbraco\ucommerce\Configuration\XmlRenderings.config.
Hi Fabio,
Thanks for being awesome and posting the reply in the forum.
A simpler way to instantiate it is the following:
The change was made to make the XML rendering layer fully pluggable. With uCommerce 3 you can swap out any XML renderer and generate the exact XML you want.
Hope this helps.
Thanks for getting back to us with a simpler and more modern way of instantiating that!
Cheers for that!
Fabio
is working on a reply...