[Koha-bugs] [Bug 21479] Removing from cart removes 2 items

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Oct 3 04:19:26 CEST 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21479

M. Tompsett <mtompset at hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #79852|0                           |1
        is obsolete|                            |

--- Comment #2 from M. Tompsett <mtompset at hotmail.com> ---
Created attachment 79857
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=79857&action=edit
Bug 21479: Fix remove from cart - OPAC

This bug affects all stable releases and seems to have been there for a
long time.

To recreate:
- Launch a search at the OPAC
- Add 2 elements to the cart
- Remove one
=> Cart is empty

Note that it does not exist on the staff interface

The code in opac-bottom is only for the detail page, where
biblionumber is defined, but the event binding was done
on the result search page as they have the same selector
(.cartRemove) On the results page, the biblionumber is not
defined and triggers the deletion of all the items as a result.
Using a more specific selector (this solution is already used
for "add to shelf") fixes the problem

Test plan:
Add and remove elements to/from your cart
On both search and detail view

Signed-off-by: Mark Tompsett <mtompset at hotmail.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list