Skip to content
Snippets Groups Projects
Verified Commit d11582b9 authored by Andrej Ramašeuski's avatar Andrej Ramašeuski
Browse files

Mapovani variaci

parent ba70a627
No related branches found
No related tags found
No related merge requests found
Pipeline #11116 passed
......@@ -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
......
......@@ -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},
......
......@@ -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;
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment