From 0b42edbb5f8fafc5c9bce7f39d9c4a11825f08de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrej=20Rama=C5=A1euski?= <andrej@x2.cz> Date: Wed, 13 Dec 2023 11:23:18 +0100 Subject: [PATCH] Podpora cs --- lib/CF2022/Controller/Products.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/CF2022/Controller/Products.pm b/lib/CF2022/Controller/Products.pm index 88f46e8..36293d6 100644 --- a/lib/CF2022/Controller/Products.pm +++ b/lib/CF2022/Controller/Products.pm @@ -59,7 +59,7 @@ $c->trace($q); push @options, { id => $record->{id}, - name => $record->{name}{en}, + name => ($record->{name}{cs} // $record->{name}{en}), price => $record->{default_price} + 0, free_price => $record->{free_price}, category_id => $record->{category}, @@ -67,7 +67,7 @@ $c->trace($q); variations => [ map {{ id => $_->{id}, - value => $_->{value}{en}, + value => ($_->{value}{cs} // $_->{value}{en}), price => $_->{price} + 0, quotes => $q->{$record->{id}}{$_->{id} }, }} @{ $record->{variations} } -- GitLab