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 2 of 2

Thread: Removing Product Images via WSI

  1. #1
    campbelt101 is offline Member
    Join Date
    Dec 2010
    Posts
    72

    Default Removing Product Images via WSI

    Ok, so last week I ran into the issue of not being able to downloading a product image using WSI. I don't have the source code so I can fix the issue.

    Now, I've run into another issue.

    In writing my internal commands to remove a product from the store I found out that I can not delete product images, or product multiimages.

    Code:
    <AspDotNetStorefrontImport Version="9.0">
      <Product Action="Update" ID="1496">
        <Images>
          <Icon Delete="true" />
          <Medium Delete="true" />
          <Large Delete="true" />
          <MultiImage>
            <Icon>
              <Img Delete="true" Index="1" />
              <Img Delete="true" Index="2" />
              <Img Delete="true" Index="3" />
              <Img Delete="true" Index="4" />
              <Img Delete="true" Index="5" />
              <Img Delete="true" Index="6" />
              <Img Delete="true" Index="7" />
              <Img Delete="true" Index="8" />
              <Img Delete="true" Index="9" />
              <Img Delete="true" Index="10" />
            </Icon>
            <Medium>
              <Img Delete="true" Index="1" />
              <Img Delete="true" Index="2" />
              <Img Delete="true" Index="3" />
              <Img Delete="true" Index="4" />
              <Img Delete="true" Index="5" />
              <Img Delete="true" Index="6" />
              <Img Delete="true" Index="7" />
              <Img Delete="true" Index="8" />
              <Img Delete="true" Index="9" />
              <Img Delete="true" Index="10" />
            </Medium>
            <Large>
              <Img Delete="true" Index="1" />
              <Img Delete="true" Index="2" />
              <Img Delete="true" Index="3" />
              <Img Delete="true" Index="4" />
              <Img Delete="true" Index="5" />
              <Img Delete="true" Index="6" />
              <Img Delete="true" Index="7" />
              <Img Delete="true" Index="8" />
              <Img Delete="true" Index="9" />
              <Img Delete="true" Index="10" />
            </Large>
          </MultiImage>
        </Images>
      </Product>
    </AspDotNetStorefrontImport>
    returns

    Code:
    <AspDotNetStorefrontImportResult Version="9.0" DateTime="4/25/2011 1:18:12 PM">
      <Item NodeType="Product" Name="" GUID="" ID="1496" ActionTaken="Update" Status="OK" Message="" />
    </AspDotNetStorefrontImportResult>
    But the images are not removed.

    Funny thing is that you can delete an image for an Entity without any problems.

  2. #2
    Ben-LynxSI is offline Member
    Join Date
    Mar 2010
    Location
    Vancouver, BC, Canada
    Posts
    41

    Default

    I'm looking at the code here (the latest v9.2) and see one hardcoded limitation which is that the delete will only work with files of the types ".jpg", ".gif", ".png" which means if you are using .jpeg (notice 4 letters, not 3) the delete will fail, while it is perfectly acceptable (and supported in code) to upload images of type .jpeg.

    Could you please verify via FTP or RDP on your server the exact filenames you want to delete? Don't check from a web browser as we don't want any caching stuff playing with our heads. ;-)

    If we can confirm this is the issue, we can make a well-formed suggestion to ASPDNSF to improve this code.
    Ben Swayne - C#/ASP.net/jQuery/Ajax/SEO
    Lynx System Integrators Ltd.
    Lynx Live Agent - real-time analytics, live chat and sales software for ASPDotNetStorefront
    My Personal Website