Adding products to cart works fine with ajax, but when deleting the last item in cart block, nothing happens, last item will stay in block. After refreshing the page the last item will disappear. Tested with commerce_kickstar-7.x-1.2 and dc_cart_ajax-7.x-1.0

Comments

bladwin’s picture

I can verify that this is happening. When there is only one item in the cart, or if it is the last in a list, after clicking "delete", it remains until the page is refreshed. I am not using commerce_kickstart. The site and "products" were already built before the addition of Drupal Commerce.

thehong’s picture

thehong’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

gdana’s picture

Version: 7.x-1.x-dev » 7.x-1.0
Status: Closed (fixed) » Active

Hi, this happens to me with the regular release as well. I tried replacing the line:
$wrapper = $wrapper || $('#' + response['form-id']).parents('.view.view-commerce-cart-form:eq(0)').parent();
with
$wrapper = $wrapper || $('#' + response['form-id']).parents('.view:eq(0)').parent();
like in your patch for the dev version but this is only a partial solution - it fixes the case where there's one item in the cart but if there are two or more and I try to delete them one after the other, the final delete doesn't work again.
Any suggestions? thanks, Dana.

mrsad’s picture

replace $wrapper = ... line with
$wrapper = $wrapper || $('[id^=' + response['form-id'] +']').parents('.view:eq(0)').parent();

tterranigma’s picture

Issue summary: View changes
Status: Active » Closed (fixed)

Fixed per #3.
@gdana The concept of fixing bugs is that once enough or critical once have been fixed, a new release will be made, in this case 1.1. The problem of course persists in 1.0 since there is no change happening over there.