My cart block isn't being updated when a product is added to the cart via ajax. I suspect this is because the module is only effecting the block display with id views_form_commerce_cart_block_default. It would be good if somehow we could get it to also update other cart blocks.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 1374992-dc_cart_ajax-block-6.patch | 589 bytes | luksak |
| #1 | 1374992-dc_cart_ajax-block-1.patch | 587 bytes | mrfelton |
Comments
Comment #1
mrfelton commentedI need this for my drush make file, so here is my temporary hack.
Comment #2
thehong commentedFixed: http://drupalcode.org/project/dc_cart_ajax.git/commit/edcb6b6
Thanks you.
Comment #4
acidpotato commentedThis code above doesn't work in a view block when trying delete a line item and get the following error messages -
EntityMetadataWrapperException: Invalid data value given. Be sure it matches the required data type and format. in EntityDrupalWrapper->set() (line 735 of C:\....\all\modules\entity\includes\entity.wrapper.inc).
Notice: Trying to get property of non-object in commerce_line_item_handler_field_edit_delete->views_form_submit() (line 56 of C:\....\all\modules\commerce\modules\line_item\includes\views\handlers\commerce_line_item_handler_field_edit_delete.inc).
Notice: Undefined index: order in commerce_line_item_handler_field_edit_delete->views_form_submit() (line 56 of C:\....\sites\all\modules\commerce\modules\line_item\includes\views\handlers\commerce_line_item_handler_field_edit_delete.inc).
Here is a dump of my view -
Comment #5
luksakThis is not fixed for me either. Did you solve it?
Comment #6
luksakI realized that this line
strpos($form_id, 'views_form_commerce_cart_block_') === 0;Is too specific. I am not using blocks.
The attached patch fixes the issue for me.
Comment #7
acidpotato commentedYes it worked for me too by tinkering with the view names.
Comment #8
drasgardian commentedpatch in #6 fixed this for me. Thanks.