RESOLVED: Pull Sheet to have Model Number
RESOLVED: Pull Sheet to have Model Number
I need to have ModelNumber as a column on the pull sheet because for products without variants, that's where I store my UPC.
How do I do this? I've played around with PullSheet.aspx and PullSheet.aspx.cs with no success.
So in logic I need: IF the product does not have a variant, DISPLAY ModelNumber(or Manufacturer's Part Number).
Thanks!
How do I do this? I've played around with PullSheet.aspx and PullSheet.aspx.cs with no success.
So in logic I need: IF the product does not have a variant, DISPLAY ModelNumber(or Manufacturer's Part Number).
Thanks!
Last edited by vhemlani on Fri Aug 12, 2011 4:08 pm, edited 1 time in total.
Re: Pull Sheet to have Model Number
Any ideas?
I'm happy to get this working without the if then logic too.
I just need ModelNumber to appear on the pull sheet.
SQL wise, it's quite simple, but i have no idea how to add it into the pullsheet.aspx(.cs)
I'm happy to get this working without the if then logic too.
I just need ModelNumber to appear on the pull sheet.
SQL wise, it's quite simple, but i have no idea how to add it into the pullsheet.aspx(.cs)
Re: Pull Sheet to have Model Number
Have a look at following thread viewtopic.php?f=42&t=15140
Something similar is happening in that post where pull sheet is modified to show thumbnail. In your case you need modal number. So first rename GetImage method to GetModelNumber then make it look like this
Something similar is happening in that post where pull sheet is modified to show thumbnail. In your case you need modal number. So first rename GetImage method to GetModelNumber then make it look like this
Code: Select all
public string GetModelNumber(Object dataItem)
{
OrderPullItem item = (OrderPullItem)dataItem;
string sku = item.Sku;
if (string.IsNullOrEmpty(sku))
return string.Empty;
ProductCollection products = ProductDataSource.LoadForCriteria(string.Format("Sku = '{0}'", sku));
if (products == null && products.Count == 0)
return string.Empty;
Product product = products[0];
return product.ModelNumber;
}
Re: Pull Sheet to have Model Number
I have both my files attached. I'm not sure why it crashes for me.
I tried the image thumbnail implementation as well, but that didn't work for me either.
I dunno what I'm doing wrong.
Thanks,
Vishal
I tried the image thumbnail implementation as well, but that didn't work for me either.
I dunno what I'm doing wrong.
Thanks,
Vishal
Re: Pull Sheet to have Model Number
My attachments:
Re: Pull Sheet to have Model Number
Following files are working for me. Unzip and replace yours with them. See if it works. If it don't can you please post the error message then.
Re: Pull Sheet to have Model Number
Hi Mazhar, I'm working with Vhemlani to solve this problem.
seems it is crashing on the line
Product product = products[0];
below is the error message:
Server Error in '/' Application.
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Source Error:
Line 86: return string.Empty;
Line 87: Trace.Write("Inside GetUPCFrOmModelNumber", "sku");
Line 88: Product product = products[0];
Line 89: return product.ModelNumber;
Line 90: }
Source File: c:\inetpub\wwwroot\Admin\Orders\Print\PullSheet.aspx.cs Line: 88
Stack Trace:
[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
System.Collections.CollectionBase.System.Collections.IList.get_Item(Int32 index) +10228964
CommerceBuilder.Common.SortableCollection`1.get_Item(Int32 index) +43
Admin_Orders_Print_PullSheet.GetUPCFromModelNumber(Object dataItem) in c:\inetpub\wwwroot\Admin\Orders\Print\PullSheet.aspx.cs:88
ASP.admin_orders_print_pullsheet_aspx.__DataBind__control7(Object sender, EventArgs e) in c:\inetpub\wwwroot\Admin\Orders\Print\PullSheet.aspx:25
System.Web.UI.Control.OnDataBinding(EventArgs e) +132
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +170
System.Web.UI.Control.DataBindChildren() +11045679
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +182
System.Web.UI.Control.DataBindChildren() +11045679
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +182
System.Web.UI.WebControls.GridView.CreateRow(Int32 rowIndex, Int32 dataSourceIndex, DataControlRowType rowType, DataControlRowState rowState, Boolean dataBind, Object dataItem, DataControlField[] fields, TableRowCollection rows, PagedDataSource pagedDataSource) +267
System.Web.UI.WebControls.GridView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) +3340
System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +72
System.Web.UI.WebControls.GridView.PerformDataBinding(IEnumerable data) +18
System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +147
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +261
Admin_Orders_Print_PullSheet.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\Admin\Orders\Print\PullSheet.aspx.cs:59
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.Control.OnLoad(EventArgs e) +132
System.Web.UI.Control.LoadRecursive() +66
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428
seems it is crashing on the line
Product product = products[0];
below is the error message:
Server Error in '/' Application.
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Source Error:
Line 86: return string.Empty;
Line 87: Trace.Write("Inside GetUPCFrOmModelNumber", "sku");
Line 88: Product product = products[0];
Line 89: return product.ModelNumber;
Line 90: }
Source File: c:\inetpub\wwwroot\Admin\Orders\Print\PullSheet.aspx.cs Line: 88
Stack Trace:
[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
System.Collections.CollectionBase.System.Collections.IList.get_Item(Int32 index) +10228964
CommerceBuilder.Common.SortableCollection`1.get_Item(Int32 index) +43
Admin_Orders_Print_PullSheet.GetUPCFromModelNumber(Object dataItem) in c:\inetpub\wwwroot\Admin\Orders\Print\PullSheet.aspx.cs:88
ASP.admin_orders_print_pullsheet_aspx.__DataBind__control7(Object sender, EventArgs e) in c:\inetpub\wwwroot\Admin\Orders\Print\PullSheet.aspx:25
System.Web.UI.Control.OnDataBinding(EventArgs e) +132
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +170
System.Web.UI.Control.DataBindChildren() +11045679
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +182
System.Web.UI.Control.DataBindChildren() +11045679
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +182
System.Web.UI.WebControls.GridView.CreateRow(Int32 rowIndex, Int32 dataSourceIndex, DataControlRowType rowType, DataControlRowState rowState, Boolean dataBind, Object dataItem, DataControlField[] fields, TableRowCollection rows, PagedDataSource pagedDataSource) +267
System.Web.UI.WebControls.GridView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) +3340
System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +72
System.Web.UI.WebControls.GridView.PerformDataBinding(IEnumerable data) +18
System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +147
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +261
Admin_Orders_Print_PullSheet.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\Admin\Orders\Print\PullSheet.aspx.cs:59
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.Control.OnLoad(EventArgs e) +132
System.Web.UI.Control.LoadRecursive() +66
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428
Re: Pull Sheet to have Model Number
Let me know if you have any solutions Mazhar.
Thanks,
Vishal
Thanks,
Vishal
Re: Pull Sheet to have Model Number
Any suggestions from anybody?
Re: Pull Sheet to have Model Number
I guess there's no solution.
I am trying this as an alternative:
I created a view on the SQL end to display the orders with my preferred status. I'm currently in the process of printing that to some page. It's a work around I guess.
I am trying this as an alternative:
I created a view on the SQL end to display the orders with my preferred status. I'm currently in the process of printing that to some page. It's a work around I guess.
RESOLVED: Pull Sheet to have Model Number
This is somewhat resolved.
My custom view pulls all the order item information I need for orders within a specific status. My pullsheet displays everything within that view using the listview control.
My custom view pulls all the order item information I need for orders within a specific status. My pullsheet displays everything within that view using the listview control.
Re: RESOLVED: Pull Sheet to have Model Number
Hi Vhemlani,
Any chance you can post the resolution you worked out with the custom view here?
I'm trying to set up a custom view so that I can add model number to the pullsheet as well, but I'm getting a ton of runtime errors, so I have to be missing something.
Thanks,
~Mo
Any chance you can post the resolution you worked out with the custom view here?
I'm trying to set up a custom view so that I can add model number to the pullsheet as well, but I'm getting a ton of runtime errors, so I have to be missing something.
Thanks,
~Mo
~Mo
Maureen Albertson
Scott's Bait & Tackle / Mystic Reel Parts LLC
Contact Me Via Store Website
Ablecommerce Gold R11 Catalog LIVE
Maureen Albertson
Scott's Bait & Tackle / Mystic Reel Parts LLC
Contact Me Via Store Website
Ablecommerce Gold R11 Catalog LIVE
Re: RESOLVED: Pull Sheet to have Model Number
For anyone else looking at this thread, see solution in another thread.
It's posted for packing list but it works on the pullsheet as well.
viewtopic.php?f=44&t=16307&p=69670
It's posted for packing list but it works on the pullsheet as well.
viewtopic.php?f=44&t=16307&p=69670
~Mo
Maureen Albertson
Scott's Bait & Tackle / Mystic Reel Parts LLC
Contact Me Via Store Website
Ablecommerce Gold R11 Catalog LIVE
Maureen Albertson
Scott's Bait & Tackle / Mystic Reel Parts LLC
Contact Me Via Store Website
Ablecommerce Gold R11 Catalog LIVE