WordPress.org

Ready to get started?Download WordPress

Forums

WebLibrarian
[resolved] AWS Import Image (6 posts)

  1. dryice
    Member
    Posted 10 months ago #

    Is there a way to make the AWS AA160 image standard instead of the SL75 image? Or is that something that Amazon determines?

    Here is an example:

    http://ecx.images-amazon.com/images/I/511I2QVn0fL._AA160_.jpg (would like to switch to this)

    http://ecx.images-amazon.com/images/I/511I2QVn0fL._SL75_.jpg (comes over by default)

    http://wordpress.org/plugins/weblibrarian/

  2. Robert Heller
    Member
    Plugin Author

    Posted 10 months ago #

    Not sure -- I'd have to look at the product database API to see if there is a parameter controlling this.

  3. Robert Heller
    Member
    Plugin Author

    Posted 10 months ago #

    Ok, I've had a look. The 'medium' image is returned. The web librarian code is hard-coded to use the 'small' image for the thumbnail image. I suppose I can change the code to provide a choise of images to use.

  4. Robert Heller
    Member
    Plugin Author

    Posted 10 months ago #

    Ok, I made a new release with the JavaScript updated. If you do a Lookup Item, all three image sizes, small, medium, and large (if available) are displayed and any of the three can be inserted as the thumbnail.

  5. dryice
    Member
    Posted 10 months ago #

    Great! Thanks.

    I made an additional change to the admin.css to

    #aws-formframe {
    width: 100%;
    height: 750px;

    I made it bigger to see the entire image, just felt less cramped IMHO.

    Thanks again for the change.

  6. dryice
    Member
    Posted 10 months ago #

    Also for my own reference when an update is released and those always using any other size but small, I made a change at line 227 - 231 of AWSFunction.js

    var smallimage = item.getElementsByTagName('SmallImage')[0];
    	if (smallimage != null)
    	{
                var smallimageURL = smallimage.getElementsByTagName('URL')[0].childNodes[0].nodeValue;
                win.WEBLIB_InsertThumb(smallimageURL);

    changed to:

    var mediumimage = item.getElementsByTagName('MediumImage')[0];
    	if (mediumimage != null)
    	{
                var mediumimageURL = mediumimage.getElementsByTagName('URL')[0].childNodes[0].nodeValue;
                win.WEBLIB_InsertThumb(mediumimageURL);

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.