{strip} {if empty($status)} {$_title = _w("Marketing")} {elseif $status === shopPromoModel::STATUS_ACTIVE} {$_title = _w("Active promos")} {elseif $status === shopPromoModel::STATUS_PLANNED} {$_title = _w("Scheduled promos")} {elseif $status === shopPromoModel::STATUS_COMPLETED} {$_title = _w("Completed promos")} {/if} {$wa->title($_title)} {$_active_sort = [ "field" => ifset($sort, "field", "start_datetime"), "direction" => ifset($sort, "direction", "desc"), "page" => ifset($page, 1) ]} {function name="_render_sort_uri" _data=[]} {$_is_active = ($_data["field"] === $_active_sort["field"])} {$_params = []} {$_params["status"] = "completed"} {$_page = 1} {$_params["page"] = $_page} {$_field = $_data["field"]} {$_params["sort[field]"] = $_field} {$_direction = "desc"} {if !empty($_is_active) && $_active_sort["direction"] === "desc"} {$_direction = "asc"} {/if} {$_params["sort[direction]"] = $_direction} {$marketing_url}?{$_params|http_build_query} {/function} {function name="_render_sort_icon" _data=[]} {$_is_active = ($_data["field"] === $_active_sort["field"])} {if !empty($_is_active)} {$_icon_class = "down"} {if $_active_sort["direction"] === "asc"} {$_icon_class = "up"} {/if} {/if} {/function} {/strip} {function name="_render_promo" _promo=[]} {$_promo_classes = []} {if !empty($_promo.enabled)} {$_promo_classes[] = "is-active"} {elseif !empty($_promo.is_planned)} {$_promo_classes[] = "is-planned"} {else} {$_promo_classes[] = "is-paused"} {/if} {if empty($_promo.image)} {$_promo_classes[] = "without-image"} {/if}
[`Change the sort order of active promos by using drag&drop.`]
{else}[`Select a storefront to change active promos’ sort order.`]
{/if} {if !empty($active_promos)}[`No active promos.`]
{/if}[`No scheduled promos.`]
{/if}"name"]}"> [`Promo name`]{_render_sort_icon _data=["field" => "name"]} | "start_datetime"]}"> [`Beginning`]{_render_sort_icon _data=["field" => "start_datetime"]} | "finish_datetime"]}"> [`End`]{_render_sort_icon _data=["field" => "finish_datetime"]} | "orders_count"]}"> [`Orders`]{_render_sort_icon _data=["field" => "orders_count"]} | [`Sales`] | [`ROI`] |
---|---|---|---|---|---|
{foreach ifset($promos_markers, $_promo.id, []) as $marker}
|
{if !empty($_promo.start_datetime)} {$_promo.start_datetime|wa_date} {elseif !empty($_promo.create_datetime)} {$_promo.create_datetime|wa_date} {else} — {/if} | {if !empty($_promo.finish_datetime)} {$_promo.finish_datetime|wa_date} {else} — {/if} | {ifset($promos_stats, $_promo.id, 'orders_count', 0)} | {shop_currency_html(ifset($promos_stats, $_promo.id, 'sales', 0))} | {$roi_value = ifset($promos_stats, $_promo.id, 'roi', null)} {if !empty($promos_stats[$_promo.id]['paid_for_itself'])} {$roi_class = 'green'} {else} {$roi_class = 'red'} {/if} {if $roi_value !== null} {$roi_value}% {else} — {/if} |
[`No completed promos.`]
{/if}[`Promo “%promo_name%” will be paused.`]
[`Operation of all tools enabled for this promo will be discontinued—special product prices will be replaced by their ordinary prices, UTM tags will no longer be used to register incoming customer traffic, orders will not be counted by applied coupons, etc.`]
[`Promo “%promo_name%” will be resumed.`]
[`Select a storefront to change active promos’ sort order.`]