Kit Products checkout bug with large number of options, 28+

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
skhvatkov2010
Ensign (ENS)
Ensign (ENS)
Posts: 8
Joined: Mon Oct 11, 2010 4:12 pm

Kit Products checkout bug with large number of options, 28+

Post by skhvatkov2010 » Tue Oct 12, 2010 8:09 am

I have not tested it yet with smaller number of options, but that's how I discovered it initially, on Kit Products that have 28, 56, 84 and 112 options.

As you go through the checkout process, initially the BasketItems table holds the following records for that specific BasketId (X, Y, Z are Quantity for the individual ProductIDs that can are a part of the kit). Main Kit Product has multiple Kit Options, of which are all dropdowns containing Product A, Product B and Product C. So as users select individual options, they end up with this (shipping and taxes are removed for simpicity's sake).

This is the database state with one Main Kit Product in the basket, on Basket.aspx page, already logged in:

All 4 records have the same BasketShippingId, not NULL.
1. Main Kit Product
2. Product A (X)
3. Product B (Y)
4. Product C (Z)

When pressing continue to the next screen, Edit Billing Address, the database state is as follows:

First 4 records have the same BasketShippingId, items 5-... have NULL in that field.
1. Main Kit Product
2. Product A (1)
3. Product B (1)
4. Product C (1)
5. Product A (1)
6. Product B (1)
7. Product C (1)
...

Continue to the next screen, Edit Shipping Address:

All 4 records have the same BasketShippingId, not NULL.
1. Main Kit Product
2. Product A (X)
3. Product B (Y)
4. Product C (Z)

Continue to the next screen, Select Shipping Method:

First 4 records have the same BasketShippingId, items 5-... have NULL in that field.
1. Main Kit Product
2. Product A (1)
3. Product B (1)
4. Product C (1)
5. Product A (1)
6. Product B (1)
7. Product C (1)
...

Continue to the Payment Page, this is when those kit items that have NULL in BasketShippingId show up as non-shippable items, even though they are marked shippable in database and are parts of the kit:

First 4 records have the same BasketShippingId, items 5-... have NULL in that field.
1. Main Kit Product
2. Product A (1)
3. Product B (1)
4. Product C (1)
5. Product A (1)
6. Product B (1)
7. Product C (1)
...


Sergei Khvatkov

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Kit Products checkout bug with large number of options, 28+

Post by mazhar » Tue Oct 12, 2010 10:22 am

I was able to confirm your issue and it's currently being worked on.

skhvatkov2010
Ensign (ENS)
Ensign (ENS)
Posts: 8
Joined: Mon Oct 11, 2010 4:12 pm

Re: Kit Products checkout bug with large number of options, 28+

Post by skhvatkov2010 » Wed Oct 13, 2010 8:46 am

Update: it happens on any number of kit options, as long as they have duplicate products across different options selected.

As a temporary fix, adding this code to Page_Init() on PaymentPage.aspx.cs seems to update the table in the database and mark kit items properly as shippable by setting their BasketShippingId, but we only have have one shippable address and shipment so it will not work for everyone.

Code: Select all

protected void Page_Init(object sender, EventArgs e)
{
    ...
    // new code
    foreach (BasketItem bi in user.Basket.Items) {
        bi.BasketShipmentId = user.Basket.Shipments[0].BasketShipmentId;
        bi.Save();
    }
    // end new code
    BindPage();
}

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Kit Products checkout bug with large number of options, 28+

Post by mazhar » Thu Oct 14, 2010 10:22 am

Service Release for 7.0.5 is available, Download and Install the patch to fix this issue.
http://help.ablecommerce.com/upgrades/a ... ease_1.htm

Post Reply