Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 5 of 5

Thread: GetProduct - Include Images not working

  1. #1
    cc9537 is offline Member
    Join Date
    May 2009
    Posts
    40

    Default GetProduct - Include Images not working

    When I use the sample WSI test client and run something like

    <AspDotNetStorefrontImport Verbose="false">
    <GetProduct ID="382" IncludeVariants="true" IncludeImages="true"/>
    </AspDotNetStorefrontImport>

    I get an error

    <?xml version="1.0" encoding="utf-16"?>
    <AspDotNetStorefrontImportResult Version="" DateTime="11/15/2010 2:18:30 PM"><GetProduct ID="382" GUID=""><Error Message="Exception, Message=Could not find a part of the path 'c:\images\Product\icon\DW364.jpg'." /></AspDotNetStorefrontImportResult>

    I thought this was supposed to export the image as a BASE64 text to the xml output?

    Really need to get this working.

    Please let me know if there is anything I can do for you.

    Always here to help,

    Clint.
    NationwideTool.com
    210 651 1551

  2. #2
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    If you have a source, please do the following changes below and recompile the AspDotNetStorefrontWSI project. Otherwise, send a ticket to support.

    file: WSi.cs
    method: GetImageData

    from:
    Code:
    if (ImageUrl.Length != 0)
    {
    FN = CommonLogic.SafeMapPath(ImageUrl);
    to:
    Code:
    if (FN == ImageUrl) 
    {
    FN = CommonLogic.SafeMapPath("~" + ImageUrl);
    } 
    }

  3. #3
    cc9537 is offline Member
    Join Date
    May 2009
    Posts
    40

    Default

    Alfred,

    Thank you very much. I assume you only meant 1 } at the end of your code.

    I made those changes (with only 1 } as it would not compile otherwise) and rebuilt ASPNDSFWSI. I then uploaded the file in SOURCE\ASPDNSFWSI\bin\Release\AspDotNetStorefrontW SI.dll to the BIN folder in the root of the website. Is there any other files I need to upload?

    Now I get

    <Error Message="Exception, Message=Empty path name is not legal." />

    with the same call above.

    Did I miss another file that is changed with the rebuild of WSI?

    Please let me know if there is anything I can do for you.

    Always here to help,

    Clint.
    NationwideTool.com
    210 651 1551

  4. #4
    cc9537 is offline Member
    Join Date
    May 2009
    Posts
    40

    Default

    I left the if statement alone (I left if (ImageUrl.Length != 0)) and changed the


    FN = CommonLogic.SafeMapPath(ImageUrl);

    to

    FN = CommonLogic.SafeMapPath("~" + ImageUrl);


    everything seems to be working now.

    Thanks a million.

    Please let me know if there is anything I can do for you.

    Always here to help,

    Clint.
    NationwideTool.com
    210 651 1551

  5. #5
    JustBen is offline Junior Member
    Join Date
    Nov 2008
    Posts
    17

    Default corret code

    Here's the correct code for anyone else having this problem.
    You just add "~" +

    if (ImageUrl.Length != 0)
    {
    FN = CommonLogic.SafeMapPath("~" + ImageUrl);
    }