8/3/2015 - 5:21 PM

searchspring images to a customfield (BRP,Lotus)

searchspring images to a customfield (BRP,Lotus)

<mvt:comment> customfield code: ss_image </mvt:comment>
<mvt:foreach iterator="product" array="products">
<mvt:assign name="l.settings:generated_image:image" value="''" />
<mvt:comment> == Auto Update the SearchSpring images == </mvt:comment>
<mvt:item name="toolkit" param="customimagec|main|l.all_settings:product:code|main|||1" />
<mvt:comment> == set your height and width here </mvt:comment>
<mvt:assign name="l.width" value="255" />
<mvt:assign name="l.height" value="333" />
<mvt:do file="g.Module_Library_DB" name="l.image_loaded" value="Image_Load_File( g.main, l.image )" />
<mvt:if expr="l.image_loaded">
    <mvt:do file="g.Module_Library_DB" name="l.generated_image_loaded" value="GeneratedImage_FindOrInsert_Image_Dimensions( l.image, l.width, l.height, l.settings:generated_image )" />
<mvt:item name="customfields" param="Write_Product_Code( l.settings:product:code, 'ss_image', l.settings:generated_image:image )" />
&mvt:product:code;: &mvt:generated_image:image;<br />
<mvt:comment> == End == </mvt:comment>
Customfield: ss_image (or whatever you want to name it)

Assign Customfields to the page
Assign sitemap to the page
Assign toolkit to the page

Visit page to run it -- tell your client to visit this page when they update/ add any images.

It uses the "main" image.. so if they have something different please change accordingly.