{strip} {if !empty($product.skus)} {if !empty($rule_name)} {$_rule_name = $rule_name} {elseif !empty($options["rule_name"])} {$_rule_name = $options["rule_name"]} {/if} {$_locales = [ "disabled_product" => _w("Not included in the promo") ]} {function name="_render_product" _sku=[] _type="product-with-sku"} {$_price = ""} {$_compare_price = ""} {$_currency = null} {$_sku_enabled = true} {$_render_sku_id = true} {$_render_images = true} {$_render_name = true} {$_render_details = true} {$_render_prices = true} {$_render_fields = true} {$_render_delete_actions = true} {if $_type === "product"} {$_render_sku_id = false} {$_render_details = false} {$_render_prices = false} {$_render_fields = false} {elseif $_type === "sku"} {$_render_images = false} {$_render_name = false} {$_render_delete_actions = false} {/if} {if !empty($rule_product_data)} {$_currency = $rule_product_data.currency} {if !isset($rule_product_data.skus[$_sku.id])} {$_sku_enabled = false} {/if} {if !empty($rule_product_data.skus[$_sku.id])} {$_rule_sku_data = $rule_product_data.skus[$_sku.id]} {$__price = $_rule_sku_data.price} {$__compare_price = $_rule_sku_data.compare_price} {if !empty($__price) && $__price >= 0} {$_price = shop_currency($__price, $_currency, $product.currency, false)} {/if} {if !empty($__compare_price) && $__compare_price >= 0} {$_compare_price = shop_currency($__compare_price, $_currency, $product.currency, false)} {/if} {/if} {/if} {$_product_uri = "{$wa_app_url}{shopHelper::getBackendEditorUrl($product.id, 'prices')}"} {* IMAGE *} {if !empty($_render_images) && !empty($product.images)} {$_product_images = $product.images|array_values} {$_product_image = $_product_images.0} {if !empty($_product_image.url_crop)}
{/if} {/if} {* NAME *}
{if !empty($_render_name)} {$product.name|escape} {/if} {if !empty($_render_details)} {$_sku.name|escape} {$_sku.sku|escape} {/if}
{* PRICES *} {if !empty($_render_prices)}
{shop_currency_html($_sku.price, $product.currency, $product.currency)}
{if $_sku.compare_price > 0} {shop_currency_html($_sku.compare_price, $product.currency, $product.currency)} {else} — {/if}
{/if} {* PROMO PRICES *} {if !empty($_render_fields)} {/if}
{if !empty($_render_delete_actions)} {else} {/if}
{/function} {if $product.skus|count > 1} {$_first_sku = $product.skus|reset} {_render_product _sku=$_first_sku _type="product"} {foreach $product.skus as $_sku} {_render_product _sku=$_sku _type="sku"} {/foreach} {else} {$_first_sku = $product.skus|reset} {_render_product _sku=$_first_sku _type="product-with-sku"} {/if} {/if} {/strip}