Closed boneskull closed 9 years ago
Perhaps third param to the OCTOPART_IMAGE
function which would simply be a swatch
, small
, medium
, large
value which would default to swatch.
Alternatively, the URL could simply point to the part instead of the large image.
I think OCTOPART_IMAGE should return an url and then you can use =IMAGE(OCTOPART_IMAGE(...))
IMAGE is buil-tin on Google Sheets and display the image for you. Not sure about how to handle the link. HYPERLNK functions seems to not accept an IMAGE as the label.
OK, neat.
I just published a new version including your function. I just renamed it to OCTOPART_IMAGE instead and added support for a size parameter (optional). Should be updated (version 6) on your spreadsheet soon. Thanks for the contribution.
Hi,
I'd like to view thumbnails with a link to a larger image.
I'm not experienced coding addons, so I'm not sure the best way to do it.
I'm thinking:
=OCTOPART_IMAGE('foo')
is used, ask the API forinclude[]=imagesets
ImageSet
result with a non-empty value. Use URLs fromswatch_image
andlarge_image
; insert following HTML fragment:html <a href="{large_image}"><img src="{swatch_image}" title="{mpn_or_sku}"/></a>
I'm sure this is pretty trivial, but I don't know about 1., which is why I didn't just do it.