diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 342874b0073070bf3711f0e328cb4d39b0ac6b17..c0351639f9326d0330aa46932e5504e6478a11f4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ image: docker:20.10.9 variables: DOCKER_TLS_CERTDIR: "/certs" - IMAGE_VER: 0.11.2 + IMAGE_VER: 0.11.3 services: - docker:20.10.9-dind diff --git a/lib/CF2022/Controller/Orders.pm b/lib/CF2022/Controller/Orders.pm index 6217f3aae2ecd3f4e440feb16476f04d05e43076..199f1566dd1c0cad6b2006ccc5028d4319e73851 100644 --- a/lib/CF2022/Controller/Orders.pm +++ b/lib/CF2022/Controller/Orders.pm @@ -133,7 +133,7 @@ sub create ($c ) { my $item = { item => $c->mapped_product_id($product->{id}), - variation => $product->{variation}, + variation => $c->mapped_variation_id($product->{variation}), attendee_name => $args->{name}, price => $product->{price}, company => $args->{company}, diff --git a/lib/CF2022/Helpers/Core.pm b/lib/CF2022/Helpers/Core.pm index 2ac5d367662e3beea1c49f1507179e88544e850f..a32773f93a9b33b942732e0494d618e2ea292ff3 100644 --- a/lib/CF2022/Helpers/Core.pm +++ b/lib/CF2022/Helpers/Core.pm @@ -72,7 +72,11 @@ sub register ($class, $self, $conf) { $self->helper(mapped_product_id => sub ($c, $id) { my %map = (split /\D+/, $c->cfg->{pretix_products_map}); - $c->trace(\%map); + return (exists $map{$id}) ? $map{$id} : $id; + }); + + $self->helper(mapped_variation_id => sub ($c, $id) { + my %map = (split /\D+/, $c->cfg->{pretix_variations_map}); return (exists $map{$id}) ? $map{$id} : $id; }); }