OTC-Produktreihenfolge angleichen
This commit is contained in:
@@ -35,7 +35,15 @@ function get_otc_order_form_products(PDO $pdo): array
|
|||||||
WHERE p.status = 'active'
|
WHERE p.status = 'active'
|
||||||
GROUP BY p.id, p.name
|
GROUP BY p.id, p.name
|
||||||
HAVING COALESCE(SUM(v.qty_net), 0) > 0
|
HAVING COALESCE(SUM(v.qty_net), 0) > 0
|
||||||
ORDER BY p.name ASC, p.id ASC"
|
ORDER BY
|
||||||
|
CASE
|
||||||
|
WHEN p.name ILIKE '%shiitake%' THEN 1
|
||||||
|
WHEN p.name ILIKE '%reishi%' THEN 2
|
||||||
|
WHEN p.name ILIKE '%lion''s mane%' THEN 3
|
||||||
|
WHEN p.name ILIKE '%chaga%' THEN 4
|
||||||
|
ELSE 99
|
||||||
|
END,
|
||||||
|
p.id ASC"
|
||||||
);
|
);
|
||||||
|
|
||||||
$products = [];
|
$products = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user