Fitment related changes
This commit is contained in:
@@ -40,7 +40,11 @@ namespace PartSource.Automation.Jobs
|
||||
|
||||
try
|
||||
{
|
||||
products = await _shopifyClient.Products.Get(new Dictionary<string, object> { { "limit", 250 } });
|
||||
products = await _shopifyClient.Products.Get(new Dictionary<string, object> { { "limit", 250 }, { "product_type", "CA111-SC250-FL25049_Entry Ball Joints" } });
|
||||
//products = new List<Product>
|
||||
//{
|
||||
// await _shopifyClient.Products.GetById(4388919574575)
|
||||
//};
|
||||
}
|
||||
|
||||
catch (Exception ex)
|
||||
@@ -62,8 +66,8 @@ namespace PartSource.Automation.Jobs
|
||||
IEnumerable<Metafield> metafields = await _shopifyClient.Metafields.Get(new Dictionary<string, object> { { "metafield[owner_id]", product.Id }, { "metafield[owner_resource]", "product" } });
|
||||
importData = new ImportData
|
||||
{
|
||||
LineCode = metafields.FirstOrDefault(m => m.Key == "custom_label_0").Value ?? string.Empty,
|
||||
PartNumber = metafields.FirstOrDefault(m => m.Key == "custom_label_1").Value ?? string.Empty,
|
||||
LineCode = metafields.FirstOrDefault(m => m.Key == "custom_label_0")?.Value ?? string.Empty,
|
||||
PartNumber = metafields.FirstOrDefault(m => m.Key == "custom_label_1")?.Value ?? string.Empty,
|
||||
VariantSku = product.Variants[0].Sku // They know we can't do fitment for variants
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user