Dynamicweb.eCommerce.Orders Namespace : CustomerOrderCollection Class |
'Declaration
<SerializableAttribute()> Public Class CustomerOrderCollection Inherits OrderCollection
[SerializableAttribute()] public class CustomerOrderCollection : OrderCollection
public void RenderCustomerOrders( Rendering.Template t, String customerID, Dynamicweb.Frontend.PageView pageView, int paragraphID) { if (t.LoopExists(Tags.LoopStartOrders)) { CustomerOrderCollection co = new CustomerOrderCollection(); co.Load(customerID); // Add filtering Orders.CustomerOrderCollectionFilter filter = new Orders.CustomerOrderCollectionFilter(co); filter.ApplyFromQueryString(paragraphID); Orders.OrderCollection ordersToRender = filter.Output; t.SetTag(Tags.OrderCount, ordersToRender.Count); if (ordersToRender.Count == 0) { t.SetTag(Tags.EmptyOrderList, "true"); } else { Dynamicweb.Rendering.Template orderTemplate = t.GetLoop(Tags.LoopOrders); Dynamicweb.eCommerce.Frontend.Renderer r = new Dynamicweb.eCommerce.Frontend.Renderer(); r.PageView = PageView; // Create querystrings common to add all products in the order to the cart command string rawQString = Base.StrippedQueryString("CC" + _paragraphID.ToString() + ",ReorderID" + _paragraphID.ToString() + ",ResendOrderID" + _paragraphID.ToString() + ",Addresses" + _paragraphID.ToString() + ",CCAddToFavorites" + _paragraphID.ToString() + "*,CCRemoveFromFavorites" + _paragraphID.ToString() + "*"); string reorderQString = Base.AddToQueryString(rawQString, "CC" + _paragraphID.ToString() + "=Orders"); string ordersPrintTemplate = Settings.MyOrderDetailsTemplate; foreach (Dynamicweb.eCommerce.Orders.Order order in ordersToRender) { // Adds all products in the order to the cart orderTemplate.SetTag(Tags.Reorder, Base.AddToQueryString(reorderQString, "ReorderID=" + order.ID.ToString())); r.RenderOrder(order, orderTemplate); orderTemplate.CommitLoop(); } } } }
System.Object
System.Collections.ObjectModel.Collection<T>
Dynamicweb.eCommerce.Orders.OrderCollection
Dynamicweb.eCommerce.Orders.CustomerOrderCollection
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2