Closed (fixed)
Project:
Salsa Commerce
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Mar 2016 at 10:55 UTC
Updated:
1 Apr 2016 at 09:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
s_leu commentedHere's a first patch
Comment #3
berdirWe need more context here. If you visit another donation page, then this shouldn't persist. Even more so with p2p donations and so on. Get it from form_state or pass a context to the method so that yo ucan define a unique key in the session instead of order_id.
why do we need it for the line item exactly? can't we just delete the one that's currently in the order?
this needs to get more flexible too then and needs to look for the order ID in the list of keys and unset just that.
Comment #4
s_leu commentedAlright here the requested changes.
Comment #5
s_leu commentedLast patch seemed to cause problem on certain config/version of PHP. Adding improved version
Comment #7
berdirJust one final thing, looks good otherwise.
I think just looping over the list and deleting the one with the current order ID whould be simpler.
then you can also move it out of the line item loop.
Comment #8
s_leu commentedDone.
Comment #10
berdirThanks, committed.