xml 根据变体创建色板图像
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了xml 根据变体创建色板图像相关的知识,希望对你有一定的参考价值。
<mvt:do file="g.Module_Library_DB" name="l.success" value="ImageType_Load_Code( 'main', l.imagetype:main )" />
<mvt:assign name="l.width" value="52" />
<mvt:assign name="l.height" value="52" />
<mvt:foreach iterator="attribute" array="attributes">
<mvt:if expr="l.settings:attribute:type EQ 'swatch-select'">
<mvt:foreach iterator="option" array="attribute:options">
<mvt:if expr="ISNULL l.settings:option:image">
<mvt:comment> NULL Out Variables </mvt:comment>
<mvt:assign name="l.settings:variants" value="NULL" />
<mvt:do file="g.Module_Library_DB" name="l.success" value="ProductVariantList_Load_Product_Option(l.settings:product:id, l.settings:option:attr_id, l.settings:option:id, l.settings:variants)"/>
<mvt:foreach iterator="variant" array="variants">
<mvt:comment> NULL Out Variables </mvt:comment>
<mvt:assign name="l.loaded_variants" value="NULL" />
<mvt:assign name="l.loaded_type" value="NULL" />
<mvt:assign name="l.imagedata" value="NULL" />
<mvt:assign name="l.image" value="NULL" />
<mvt:assign name="l.generated_image:image" value="NULL" />
<mvt:do file="g.Module_Library_DB" name="l.success" value="ProductList_Load_Variant(l.settings:product:id, l.settings:variant:variant_id, l.loaded_variants)" />
<mvt:if expr="l.loaded_variants[1]:id GT 0">
<mvt:do file="g.Module_Library_DB" name="l.success" value="ProductImage_Load_Type( l.loaded_variants[1]:id, l.imagetype:main:id, l.loaded_type )" />
<mvt:do file="g.Module_Library_DB" name="l.success" value="Image_Load_ID( l.loaded_type:image_id, l.imagedata )" />
<mvt:do file="g.Module_Library_DB" name="l.image_loaded_success" value="Image_Load_File( l.imagedata:image, l.image )" />
<mvt:if expr="l.image_loaded_success EQ 1">
<mvt:do file="g.Module_Library_DB" name="l.success" value="GeneratedImage_FindOrInsert_Image_Dimensions( l.image, l.width, l.height, l.generated_image )" />
<mvt:if expr="l.generated_image">
<mvt:assign name="l.settings:option:image" value="l.generated_image:image" />
<mvt:do file="g.Module_Library_DB" name="l.success" value="Option_Update( l.settings:option )" />
</mvt:if>
</mvt:if>
<mvt:foreachstop />
</mvt:if>
</mvt:foreach>
</mvt:if>
</mvt:foreach>
</mvt:if>
</mvt:foreach>
以上是关于xml 根据变体创建色板图像的主要内容,如果未能解决你的问题,请参考以下文章
xml 显示变体图像,取决于来自Powersearch的过滤器//仅在其选项代码和powersearch文件代码相同时才有效。
xml 显示变体图像,取决于来自Powersearch的过滤器//仅在其选项代码和powersearch文件代码相同时才有效。