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

Thread: Adding multiple images of the same type

  1. #1
    jdudley is offline Member
    Join Date
    Oct 2007
    Posts
    54

    Default Adding multiple images of the same type

    How can I add multiple images of the same type... Medium as an example using the WSI.

  2. #2
    jdudley is offline Member
    Join Date
    Oct 2007
    Posts
    54

    Default

    Nevermind

    <Medium>
    <Img Index="1" Color="" Extension="gif|jpg|png|jpeg" Delete="boolean">base64 encoded image data here</Img>
    <Img Index="1" Color="" Extension="gif|jpg|png|jpeg" Delete="boolean">base64 encoded image data here</Img>
    <Img Index="1" Color="" Extension="gif|jpg|png|jpeg" Delete="boolean">base64 encoded image data here</Img>
    <Img Index="1" Color="" Extension="gif|jpg|png|jpeg" Delete="boolean">base64 encoded image data here</Img>
    <Img Index="2" Color="" Extension="gif|jpg|png|jpeg" Delete="boolean">base64 encoded image data here</Img>
    <Img Index="2" Color="" Extension="gif|jpg|png|jpeg" Delete="boolean">base64 encoded image data here</Img>
    <Img Index="2" Color="" Extension="gif|jpg|png|jpeg" Delete="boolean">base64 encoded image data here</Img>
    <Img Index="2" Color="" Extension="gif|jpg|png|jpeg" Delete="boolean">base64 encoded image data here</Img>
    <Img Index="3" Color="" Extension="gif|jpg|png|jpeg" Delete="boolean">base64 encoded image data here</Img>
    </Medium>

  3. #3
    toffo is offline Junior Member
    Join Date
    Feb 2009
    Posts
    12

    Default

    Hi! I can't make this work. Is this really the right xml format for multiple images for a product?

    Jani

  4. #4
    ASPDNSF Staff - Jon's Avatar
    ASPDNSF Staff - Jon is offline Senior Member
    Join Date
    Sep 2004
    Posts
    11,419

    Default

    Yes, but the < Medium > element must be contained within a < MultiImage > element. In other words, Images -> MultiImage -> Icon, Medium or Large.

    You can also include an SKU attribute if you SKU's for the product image name, and an ImageFilenameOverride if you want to use a different image name than the default.
    Jon Wolthuis

  5. #5
    toffo is offline Junior Member
    Join Date
    Feb 2009
    Posts
    12

    Default

    OK. Thanks. Now I'm able to upload multiple images. But now the LargeCreatesOthers stopped working..

    Jani

  6. #6
    toffo is offline Junior Member
    Join Date
    Feb 2009
    Posts
    12

    Default

    Anyone? Is someone uploading multiple images with WSI and LargeCreatesOthers is working?

    Quote Originally Posted by toffo View Post
    OK. Thanks. Now I'm able to upload multiple images. But now the LargeCreatesOthers stopped working..

    Jani

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

    Default

    Do you have UseImageResize set to true as well?

  8. #8
    toffo is offline Junior Member
    Join Date
    Feb 2009
    Posts
    12

    Default

    Yes I have. This works fine when uploading just one image. With multiple images, it does not resize and it does not create others. This would be a lot easier if there was a sample XML call that I could use to verify my code..

    Quote Originally Posted by ASPDNSF Staff - Alfred View Post
    Do you have UseImageResize set to true as well?
    Last edited by toffo; 05-04-2009 at 12:36 AM.

  9. #9
    Rob is offline Senior Member
    Join Date
    Aug 2004
    Posts
    3,037

    Default

    Asking G1 to chime in here.
    AspDotNetStorefront
    Shopping Cart

  10. #10
    George the Great is offline Senior Member
    Join Date
    Nov 2006
    Location
    Cleveland, OH
    Posts
    1,792

    Default

    The best way do this is to make sure that your appconfigs are set properly, and then set the UseAppConfigs attribute of the Images node to true (you don't have to do this, but then you'll have to set parameters on each of the images size nodes as well). The correct syntax when using appconfig parameters is as follows:
    Code:
    <Product Action="Update" ID="1">
      <Images UseResize="true" UseAppConfigs="true">
        <Large Extension="jpeg">...base64 encoded image data...</Large>
        <MultiImage>
          <Large>
            <Img Index="1" Extension="jpeg">...base 64 encoded image data...</Img>
            <Img Index="2" Extension="jpeg">...base 64 encoded image data...</Img>
            <Img Index="3" Extension="jpeg">...base 64 encoded image data...</Img>
            <Img Index="4" Extension="jpeg">...base 64 encoded image data...</Img>
          </Large>
        </MultiImage>
      </Images>
    </Product>
    If the appconfigs are configured to use image resizing and LargeCreatesOthers, the xml provided here would create 15 images; 5 each for large, medium, and icon. If micro images are configured it will also create an additional 5 images for micro.
    <a href="http://www.aspdotnetstorefront.com">Shopping Cart Software</a>