Bugfix: 'stock' counted 1 after using 'repeat'
The 'stock' plugin uses the 'product_id' field in the cart item, but this was not copied by the 'repeat' plugin. The confusion is caused by a mismatch between the API for RevBank::Cart->add and the internal representation.
This commit is contained in:
parent
3ce1874d3a
commit
b31b95ca37
2 changed files with 8 additions and 3 deletions
|
@ -15,6 +15,10 @@ sub new {
|
|||
|
||||
sub add {
|
||||
my ($self, $user, $amount, $description, $data) = @_;
|
||||
|
||||
# Note: 'repeat' plugin is currently dependent on this specific
|
||||
# implementation!
|
||||
|
||||
$data ||= {};
|
||||
my $item = {
|
||||
%$data, # Internal stuff, not logged or printed.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue