diff --git a/forms/ecomerce/catalog/ui.xml b/forms/ecomerce/catalog/ui.xml
index 26a80fda..a5bf966a 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
@@ -117,7 +116,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
@@ -126,19 +125,13 @@
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
LIMIT 5000;
- DROP TEMPORARY TABLE
- tmp.item,
- tmp.ticketCalculateItem,
- tmp.ticketComponentPrice,
- tmp.ticketComponent,
- tmp.ticketLot,
- tmp.zoneGetShipped;
+ DROP TEMPORARY TABLE tmp.item;
+ CALL vn.ticketCalculatePurge();