unable to delete a coupon on an order
-
- Ensign (ENS)
- Posts: 16
- Joined: Wed Oct 02, 2013 5:48 am
unable to delete a coupon on an order
I found an issue in Ablecommerce r5.
unable to delete a coupon on an order. I put a test order through with a coupon code they have registered and this prompts shows when I click ok the screen does not refresh it just sits there. The system seems to be capable of removing a discount and replacing it with a different one but do you know what is causing the system to not respond?
https://www.dropbox.com/sh/mges9y7bjtmzje1/c_ykQhs1Ne
unable to delete a coupon on an order. I put a test order through with a coupon code they have registered and this prompts shows when I click ok the screen does not refresh it just sits there. The system seems to be capable of removing a discount and replacing it with a different one but do you know what is causing the system to not respond?
https://www.dropbox.com/sh/mges9y7bjtmzje1/c_ykQhs1Ne
Re: unable to delete a coupon on an order
Hi,
I was able to reproduce this myself. It's strange that there is no error. I even enabled script debugging in my browser, but nothing happens when you try to remove the coupon. I have reported this to the dev team, and will update here when I see a response.
Thanks for letting us know.
Katie
I was able to reproduce this myself. It's strange that there is no error. I even enabled script debugging in my browser, but nothing happens when you try to remove the coupon. I have reported this to the dev team, and will update here when I see a response.
Thanks for letting us know.
Katie
Thank you for choosing AbleCommerce!
http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support
http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support
-
- Ensign (ENS)
- Posts: 16
- Joined: Wed Oct 02, 2013 5:48 am
Re: unable to delete a coupon on an order
Hi,
Can i solve it i found that in which problem is occurred.?
Can i solve it i found that in which problem is occurred.?
Re: unable to delete a coupon on an order
This is happening due to combining the order coupons. When order coupon is applied we calculate discount for each product being bought and then create a respective coupon discount item for it. It means if your coupon is applying on two products then you will have tow coupon order items each with discount you are saving on respective product. This looked odd on retail side considreing if you have many items you will see many coupon discounts so in order to simplify we combined the coupons for display only. Somehow this made its way into Admin Edit Order items page as well so you see a display only entry in as coupon item which doesn't exist in database hence can't be deleted. In order to fix it you need to apply following change
Edit your Website/Admin/Orders/Edit/EditOrderItems.aspx.cs file and locate following method
and replace it with
save the change and try to edit/delete coupons items.
Edit your Website/Admin/Orders/Edit/EditOrderItems.aspx.cs file and locate following method
Code: Select all
protected IList<OrderItem> GetShipmentItems(int shipmentId)
{
return _Order.Items.GetDisplayItems(shipmentId);
}
Code: Select all
protected IList<OrderItem> GetShipmentItems(int shipmentId)
{
IList<OrderItem> newCollection = new List<OrderItem>();
foreach (OrderItem item in _Order.Items)
{
if (item.OrderShipmentId == shipmentId)
{
newCollection.Add(item);
}
}
newCollection.Sort(new OrderItemComparer());
return newCollection;
}
- Humannature
- Lieutenant, Jr. Grade (LT JG)
- Posts: 31
- Joined: Thu Mar 12, 2009 10:47 pm
Re: unable to delete a coupon on an order
I tried using this code and got this error.
CS1061: 'System.Collections.Generic.IList<CommerceBuilder.Orders.OrderItem>' does not contain a definition for 'Sort' and no extension method 'Sort' accepting a first argument of type 'System.Collections.Generic.IList<CommerceBuilder.Orders.OrderItem>' could be found (are you missing a using directive or an assembly reference?)
Thanks
CS1061: 'System.Collections.Generic.IList<CommerceBuilder.Orders.OrderItem>' does not contain a definition for 'Sort' and no extension method 'Sort' accepting a first argument of type 'System.Collections.Generic.IList<CommerceBuilder.Orders.OrderItem>' could be found (are you missing a using directive or an assembly reference?)
Thanks
Re: unable to delete a coupon on an order
My mistake I missed the using statement required. Please edit the code file and locate following code
and update it like
Code: Select all
using CommerceBuilder.Utility;
Code: Select all
using CommerceBuilder.Utility;
using CommerceBuilder.Common;
- Humannature
- Lieutenant, Jr. Grade (LT JG)
- Posts: 31
- Joined: Thu Mar 12, 2009 10:47 pm
Re: unable to delete a coupon on an order
Works fine now.
Thanks
Thanks
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: unable to delete a coupon on an order
Mazhar- that's good to know on the IList. I was using List in places where I needed to sort a list.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx