Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Sean Dooley 289 posts 528 karma points
    Sep 05, 2013 @ 15:34
    Sean Dooley
    0

    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.

    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)
  • Morten Skjoldager 440 posts 1499 karma points
    Sep 09, 2013 @ 09:20
    Morten Skjoldager
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft