an ASP.NET Open Source CMS & eCommerce platform
Search:
Last Post 2/2/2010 8:30:40 AM By lukezy. 3 replies.
2/1/2010 6:27:28 AM
Applied
Posts: 93
Joined: 9/18/2009
Bulk Import Method
In the OrderPipeLine BulkImportTaskProvider class, in the text or xml bulk import methods, when updating an existing product, the values passed to the stored procedure for columns statusId, productTypeId, shipTypeId, shipEstimateId, taxTypeId are defaulted (to '1'), and columns weight, weightMeasureId, length, height, width, dimensionMeasureId and others are set to null, and sortOrder is set to '0', meaning that existing values will be overwritten?
 
2/1/2010 2:00:08 PM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Bulk Import Method
Yes, that's correct. If you wish to have the exact control, please try the new XML format in V4.
DotShoppingCart Staff
2/2/2010 4:21:11 AM
Applied
Posts: 93
Joined: 9/18/2009
Re: Bulk Import Method
The XML import still sets some values by default:
 
Product.Update(host, product.ProductId, element2.Element("ProductName").get_Value(), sku, this.GetStringFromXml(element2.Element("ShortDescription")), this.GetNullableFromXml<int>(element2.Element("Quantity")), decimal.Parse(element2.Element("Price").get_Value()), this.GetNullableFromXml<decimal>(element2.Element("RetailPrice")), this.GetNullableFromXml<decimal>(element2.Element("SalePrice")), this.GetNullableFromXml<decimal>(element2.Element("Cost")), this.GetOrCreateManufacturerId(host, element2.Element("Manufacturer").get_Value()), null, 1, 1, 1, 1, 1, this.GetNullableFromXml<decimal>(element2.Element("Weight")), nullable10, this.GetNullableFromXml<decimal>(element2.Element("Length")), this.GetNullableFromXml<decimal>(element2.Element("Height")), this.GetNullableFromXml<decimal>(element2.Element("Width")), nullable11, 0, nullable12, nullable13, this.GetOrCreateCategories(host, element2.Element("Categories")), new ProductImageCollection(list2), new ProductDescriptorCollection(pds), new ProductAttributeCollection(list3), nullable14, nullable15, null, null, this.GetStringFromXml(element2.Element("Title")), this.GetStringFromXml(element2.Element("Keywords")), null, this.GetCustomFieldsFromXml(element2), false, nullable16, RateUnit.Amount, null);
 
2/2/2010 8:30:40 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Bulk Import Method
Feel free to extend it.
DotShoppingCart Staff