Don't repeat same description for statiegeld-only products
This commit is contained in:
parent
147bfe7045
commit
44d0cb9b69
1 changed files with 3 additions and 1 deletions
|
@ -62,7 +62,9 @@ sub command ($invocant, $cart, $command, @) {
|
|||
my $addons = $sg->{statiegeld_addons};
|
||||
|
||||
for my $addon (@$addons) {
|
||||
my $d = "$addon->{description} ($product->{description})";
|
||||
my $d = $addon->{id} eq $product->{id}
|
||||
? "$addon->{description}"
|
||||
: "$addon->{description} ($product->{description})";
|
||||
|
||||
$cart
|
||||
->add(+$addon->{price}, $d, { plugin => $invocant->id, addon_id => $addon->{id} })
|
||||
|
|
Loading…
Add table
Reference in a new issue