Dynamicweb.eCommerce.Orders Namespace > Order Class : GetCartFormName Method |
class MyPage : System.Web.UI.Page { public void RenderOrder(Order order, Template template, Dynamicweb.Frontend.PageView pageView) { // New form to replace the quantity form to also include orderline fields if (order.StepNum < 2) { if (pageView != null) { int pageID = pageView.Page.ID; template.SetTag("Ecom:Order:CartForm.Start", string.Format("<form action=\"/Default.aspx\" name=\"{0}\" method=\"POST\">", order.GetCartFormName())); template.SetTag("Ecom:Order:CartForm.End", "</form>"); template.SetTag("Ecom:Order:CartForm.Name", order.GetCartFormName()); template.SetTag("Ecom:Order:CartForm.SubmitUpdate", string.Format("javascript:document.{0}.action = '/Default.aspx?ID={1}&step=1'; document.{0}.submit();", order.GetCartFormName(), pageView.Page.ID)); template.SetTag("Ecom:Order:CartForm.SubmitOrder", string.Format("javascript:document.{0}.action = '/Default.aspx?ID={1}&step=2'; document.{0}.submit();", order.GetCartFormName(), pageView.Page.ID)); } } } }
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