Create New Order Problem 7.0.3
-
- Lieutenant Commander (LCDR)
- Posts: 92
- Joined: Thu Jul 10, 2008 11:43 am
- Location: Lancaster PA
- Contact:
Create New Order Problem 7.0.3
When taking a telelphone order through my newly update website I was surprised to notice that it is allowing me to order out of stock products. Is there some setting I need to change, that if a customer gives me a product number and I enter it and it happens to be out of stock that it does not let the order take place?
Re: Create New Order Problem 7.0.3
Thanks, I am to reproduce the problem. you can track progress on this issue here
http://bugs.ablecommerce.com/show_bug.cgi?id=8127
http://bugs.ablecommerce.com/show_bug.cgi?id=8127
-
- Lieutenant Commander (LCDR)
- Posts: 92
- Joined: Thu Jul 10, 2008 11:43 am
- Location: Lancaster PA
- Contact:
Re: Create New Order Problem 7.0.4
Any progress on this? Even if there was a pop-up to notify me that an item is out of stock taking the order. As it is now, I am not notified until the final step and after taking a person's name and address and payment information I do not like telling them I cannot fulfill their order.
Re: Create New Order Problem 7.0.3
Here is fix for this, Edit you Website/Admin/Orders/Create/CreateOrder2.aspx file and locate following code
then update it as below
Save it and then edit Website/Admin/Orders/Create/CreateOrder2.aspx.cs file and add following method to it
Now try placing order for some product with low instock value, it will show you a confirm dialog to proceed with product purchase.
Code: Select all
<asp:GridView ID="FindProductSearchResults" runat="server" AutoGenerateColumns="false"
DataSourceID="AddProductDs" AllowPaging="true" PageSize="10" AllowSorting="true"
Visible="false" OnRowCommand="FindProductSearchResults_RowCommand"
SkinID="PagedList" Width="100%" >
Code: Select all
<asp:GridView ID="FindProductSearchResults" runat="server" AutoGenerateColumns="false"
DataSourceID="AddProductDs" AllowPaging="true" PageSize="10" AllowSorting="true"
Visible="false" OnRowCommand="FindProductSearchResults_RowCommand"
SkinID="PagedList" Width="100%"
onrowcreated="FindProductSearchResults_RowCreated">
Code: Select all
protected void FindProductSearchResults_RowCreated(object sender, GridViewRowEventArgs e)
{
if(e.Row.RowType == DataControlRowType.DataRow)
{
ImageButton imageButton = (ImageButton)e.Row.FindControl("AddButton");
Product product = (Product)e.Row.DataItem;
if (product == null || imageButton == null)
return;
string outofstockWarnningScript = "return confirm('{0}')";
if (product.AllowBackorder)
return;
if (product.InStock == 0)
outofstockWarnningScript = string.Format(outofstockWarnningScript, product.Name + " is out of stock. Are you sure you want to add it to current basket");
else
if (product.InStockWarningLevel >= product.InStock)
outofstockWarnningScript = string.Format(outofstockWarnningScript, product.Name + " In Stock level is lower then warnning level.");
imageButton.OnClientClick = outofstockWarnningScript;
}
}