You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Our client created a TopProductType widget
and is confused because of the empty line. This is because we have purchasables that are not variants. The query
SELECT pt.id AS id, pt.name, SUM(li.qty) as qty, SUM(li.total) as revenue
FROM commerce_ordersorders
INNER JOIN elementselements ON elements.id = orders.id
LEFT JOIN commerce_lineitemsli ON li.orderId = orders.id
LEFT JOIN commerce_purchasablesp ON p.id = li.purchasableId
LEFT JOIN commerce_variantsv ON v.id = p.id
LEFT JOIN commerce_productspr ON pr.id = v.productId
LEFT JOIN commerce_producttypespt ON pt.id = pr.typeId
LEFT JOIN contentcontent ON (content.elementId = v.productId) AND (content.siteId=1)
WHERE (dateOrdered >= '2020-09-06 22:00:00') AND (dateOrdered <= '2020-09-13 21:59:59') AND (isCompleted=1) AND (elements.dateDeleted IS NULL)
GROUP BY pt.id
ORDER BY SUM(li.qty) DESC
LIMIT 5
currently has the following result
Could you eventually strip those out or write at least something like "Not a product type" please?
The text was updated successfully, but these errors were encountered:
Description
Our client created a TopProductType widget
and is confused because of the empty line. This is because we have purchasables that are not variants. The query
currently has the following result
Could you eventually strip those out or write at least something like "Not a product type" please?
The text was updated successfully, but these errors were encountered: