From 099f494101b73f3a19e606ea67d0b2e5343e66a3 Mon Sep 17 00:00:00 2001 From: guillermo Date: Thu, 11 Jul 2024 11:40:11 +0200 Subject: [PATCH 1/4] feat: refs #7704 Change minQuantity --- forms/ecomerce/catalog/ui.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forms/ecomerce/catalog/ui.xml b/forms/ecomerce/catalog/ui.xml index 26a80fda..1f3fae5c 100644 --- a/forms/ecomerce/catalog/ui.xml +++ b/forms/ecomerce/catalog/ui.xml @@ -117,7 +117,7 @@ SELECT i.id, i.longName item, i.subName, i.tag5, i.value5, i.tag6, i.value6, i.tag7, i.value7, i.tag8, i.value8, - i.relevancy, i.size, i.category, i.minQuantity, + i.relevancy, i.size, i.category, b.minQuantity, k.name ink, p.name producer, o.name origin, b.available, b.price, b.`grouping`, i.image, im.updated From 7f2c64568284d0f0af8b955cb33f9d748f8a1f6c Mon Sep 17 00:00:00 2001 From: guillermo Date: Thu, 11 Jul 2024 13:36:21 +0200 Subject: [PATCH 2/4] feat: refs #7704 Refactor --- forms/ecomerce/catalog/ui.xml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/forms/ecomerce/catalog/ui.xml b/forms/ecomerce/catalog/ui.xml index 1f3fae5c..6e8aa100 100644 --- a/forms/ecomerce/catalog/ui.xml +++ b/forms/ecomerce/catalog/ui.xml @@ -105,8 +105,7 @@ auto-load="false" result-index="3" on-status-changed="onItemsChange"> - DROP TEMPORARY TABLE IF EXISTS tmp.item; - CREATE TEMPORARY TABLE tmp.item + CREATE OR REPLACE TEMPORARY TABLE tmp.item (INDEX (itemFk)) ENGINE = MEMORY SELECT i.id itemFk @@ -132,13 +131,7 @@ WHERE b.available > 0 ORDER BY i.relevancy DESC, i.name, i.size LIMIT 5000; - DROP TEMPORARY TABLE - tmp.item, - tmp.ticketCalculateItem, - tmp.ticketComponentPrice, - tmp.ticketComponent, - tmp.ticketLot, - tmp.zoneGetShipped; + CALL vn.ticketCalculatePurge(); From 8929f8c55a415d8ca9889061b2b0b2ce3fff1c57 Mon Sep 17 00:00:00 2001 From: guillermo Date: Thu, 11 Jul 2024 14:32:56 +0200 Subject: [PATCH 3/4] feat: refs #7704 Refactor --- forms/ecomerce/catalog/ui.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/forms/ecomerce/catalog/ui.xml b/forms/ecomerce/catalog/ui.xml index 6e8aa100..731ef647 100644 --- a/forms/ecomerce/catalog/ui.xml +++ b/forms/ecomerce/catalog/ui.xml @@ -131,6 +131,7 @@ WHERE b.available > 0 ORDER BY i.relevancy DESC, i.name, i.size LIMIT 5000; + DROP TEMPORARY TABLE tmp.item; CALL vn.ticketCalculatePurge(); From 1c54922692bd55a97913f3d19664b8786962e79a Mon Sep 17 00:00:00 2001 From: guillermo Date: Thu, 11 Jul 2024 14:33:15 +0200 Subject: [PATCH 4/4] feat: refs #7704 Refactor --- forms/ecomerce/catalog/ui.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/forms/ecomerce/catalog/ui.xml b/forms/ecomerce/catalog/ui.xml index 731ef647..a5bf966a 100644 --- a/forms/ecomerce/catalog/ui.xml +++ b/forms/ecomerce/catalog/ui.xml @@ -125,8 +125,7 @@ LEFT JOIN vn.ink k ON k.id = i.inkFk LEFT JOIN vn.producer p ON p.id = i.producerFk LEFT JOIN vn.origin o ON o.id = i.originFk - LEFT JOIN image im - ON im.collectionFk = 'catalog' + LEFT JOIN image im ON im.collectionFk = 'catalog' AND im.name = i.image WHERE b.available > 0 ORDER BY i.relevancy DESC, i.name, i.size