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

Thread: Image Resize on Product Import

  1. #1
    bstapylton is offline Junior Member
    Join Date
    Oct 2009
    Posts
    1

    Talking Image Resize on Product Import

    G'day!

    I'm building a .NET application to retrieve products and images from a ERP system, build an XML document and call the WSI to import this information. The XML is a simple Product Action="Add" command adding a ProductVariant per Product, and doing some entity mapping.


    I also wish to add a single image (which I have converted to the 64-bit encoded string) three times, once each for Icon, Medium and Large.


    My problem is there is a bit of a difference between pages in the WSI manual; namely the Product template and the Image Resize pages.

    The Image Resize page says I can do something like this:

    <Images>
    <Icon Extension="jpeg" UseAppConfigs="true">base 64 encoded image data here</Large>
    <Medium Extension="jpeg" UseAppConfigs="true">base 64 encoded image data here</Large>
    <Large Extension="jpeg" UseAppConfigs="true">base 64 encoded image data here</Large>
    </Images>

    However the Product xml template only mentions the Extension and Delete attributes for these Product->Images->Icon/Medium/Large tags.


    I've been playing around with it and all I ever get is three images of the same size for my products.


    Can someone please tell me what I need to do to resize my images, either from the AppConfig or from my own Params (with Resize="true") within a Product import xml?
    Last edited by Rob; 12-10-2009 at 10:15 PM.

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

    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. Have a look at this thread.

  3. #3
    bstapylton is offline Junior Member
    Join Date
    Oct 2009
    Posts
    1

    Default

    Hi Alfred,


    Thanks for the reply.


    If I changed my XML from

    Code:
    <Images>
       <Icon Extension="jpg" UseResize="true" UseAppConfigs="true"> encoded data here... </Icon>
       <Medium Extension="jpg" UseResize="true" UseAppConfigs="true"> encoded data here... </Medium>
       <Large Extension="jpg" UseResize="true" UseAppConfigs="true"> encoded data here... </Large>
    </Images>

    to this:

    Code:
    <Images UseResize="true" UseAppConfigs="true">
       <Icon Extension="jpg"> encoded data here... </Icon>
       <Medium Extension="jpg"> encoded data here... </Medium>
       <Large Extension="jpg"> encoded data here... </Large>
    </Images>

    Everything works out fine.

    Thanks again!

  4. #4
    glenfoxman is offline Junior Member
    Join Date
    Oct 2009
    Location
    Canada
    Posts
    3

    Default Image Resize on Product Import

    I am trying to help get around a image varifaction by running the program in silent mode and then on the macro for the CAPTCHA to display just what the image looks like in my program so it does not confuse the member to what image they need to look at. Any help here?
    _______________________________________
    Website I designed for quick cash advance company.