Just needed to double-check that I'm doing the right thing. All I need is to get all products that have been added to a basket but the order was never completed.
Is this as straight-forward joining uCommerce_OrderLine and uCommerce_PurchaseOrder where OrderStatusId equals 1?
Below is the script I am using.
SELECT dbo.uCommerce_ProductCatalogGroup.Name, dbo.uCommerce_OrderLine.Sku, dbo.uCommerce_OrderLine.VariantSku, dbo.uCommerce_OrderLine.ProductName, dbo.uCommerce_Currency.ISOCode Currency FROM dbo.uCommerce_OrderLine JOIN dbo.uCommerce_PurchaseOrder ON dbo.uCommerce_PurchaseOrder.OrderId = dbo.uCommerce_OrderLine.OrderId JOIN dbo.uCommerce_Currency ON dbo.uCommerce_Currency.CurrencyId = dbo.uCommerce_PurchaseOrder.CurrencyId LEFT JOIN dbo.uCommerce_ProductCatalogGroup ON dbo.uCommerce_ProductCatalogGroup.ProductCatalogGroupId = dbo.uCommerce_PurchaseOrder.ProductCatalogGroupId WHERE dbo.uCommerce_ProductCatalogGroup.ProductCatalogGroupId = 13 AND dbo.uCommerce_PurchaseOrder.OrderStatusId in (1)
Get all products with 'Basket' order status
Just needed to double-check that I'm doing the right thing. All I need is to get all products that have been added to a basket but the order was never completed.
Is this as straight-forward joining uCommerce_OrderLine and uCommerce_PurchaseOrder where OrderStatusId equals 1?
Below is the script I am using.
Hi Sean,
Yes, those id should never change, so that is a decent way to do it.
Alternativly you could do it with where name == 'basket'
Regards
Morten
is working on a reply...