slycknick
-
2/10/2009 8:33:39 AM
Uploading image to Sku
I am trying to integrate the Ecommerce module with our existing back office system. Specifically to push our product catalogue up to Kentico and pull new orders down for processing.
I have written some code to push our products up however I seem to be having some problems uploading the SKU image.
I currently have tried this Dim s As New IO.StreamReader("C:\Temp\SilMid Assets\ASG1D00003.jpg") Dim imgString As String = CMS.FileManager.AttachmentManager.SaveFileToDisk(“mySite”, skuGUID.ToString, "ASG1D00003", "jpg", s, True, False) s.Close()
I was then going to update the SKUImagePath with the imgString value.
My code is outside of the CMS project. I have called CMS.CMSHelper.CMSContext.Init() but I get an error ;
{"[SettingsKeyProvider.WebApplicationPhysicalPath]: Web application physical path is not initialized. You must call CMSContext.Init() before running any of your actions."}
Any ideas? Do I need something in my app.config? Am I using the best approach?
Many Thanks
|