HOMEeee

{$wa->globals(«isShopHome», true)}
{function name=»pluralform» n=1 f1=» f2=» f3=»}
{$n = abs($n)}
{$n1 = $n % 10}
{$n2 = $n % 100}
{$n}
{if $n1 == 1 && $n2 != 11}{$f1}
{elseif $n1 >= 2 && $n1 <= 4 && ($n2 < 10 || $n2 >= 20)}{$f2}
{else}{$f3}{/if}
{/function}

{strip}
{if $wa->photos}
{if $wa->isMobile()}
{$slider_photo = $wa->photos->photos($theme_settings.slider_photo_mobile)}
{else}
{$slider_photo = $wa->photos->photos($theme_settings.slider_photo)}
{/if}
{if $slider_photo}

{if $slider_photo}
{foreach $slider_photo as $photo}

{* {$wa->photos->getImgHtml($photo, «1370», false, false)} *}

{if $photo.name}

{$photo.name}
{if $photo.description}

{$photo.description}

{/if}

{else}
{if $photo.description}{/if}
{/if}

{/foreach}
{/if}


{$theme_settings.home_banners_text_1}

{if $theme_settings.home_banners_text_1}

{$theme_settings.home_banners_text_1}

{/if}


{$theme_settings.home_banners_text_2}

{if $theme_settings.home_banners_text_2}

{$theme_settings.home_banners_text_2}

{/if}

{/if}
{/if}

{* Promo icons *}

{if $theme_settings.promo_link_1}
{/if}

{$theme_settings.promo_icon_1}
{$theme_settings.promo_header_1}

{$theme_settings.promo_text_1}

{if $theme_settings.promo_link_2}
{/if}

{$theme_settings.promo_icon_2}
{$theme_settings.promo_header_2}

{$theme_settings.promo_text_2}

{if $theme_settings.promo_link_3}
{/if}

{$theme_settings.promo_icon_3}
{$theme_settings.promo_header_3}

{$theme_settings.promo_text_3}

{if $theme_settings.promo_link_4}
{/if}

{$theme_settings.promo_icon_4}
{$theme_settings.promo_header_4}

{$theme_settings.promo_text_4}

{* Promo products *}
{if $theme_settings.homepage_productset_promo}
{$promos = $wa->shop->productSet( $theme_settings.homepage_productset_promo )}
{/if}

{if $promos && count($promos)}

{if $theme_settings.homepage_title}{str_replace(‘{$date}’, $smarty.now|wa_datetime:»humandate», $theme_settings.homepage_title)}{/if}
Акции и предложения
{foreach $promocards as $a => $k}

{if !empty($k.countdown_datetime) && time() <= strtotime($k.countdown_datetime)}
[`Time left`]:

{/if}

{$k.title}
{if empty($theme_settings.promoss_text)}

{$k.title}
{$k.body}

{/if}
{if !empty($theme_settings.promoss_button)}

{/if}

{/foreach}

{/if}

{* Popular categoires *}
{if $theme_settings.home_popular}
{if $categories_shop = $wa->shop->categories(0, null, true, true)}

{/if}
{/if}

{* Bestsellers products *}
{if $theme_settings.homepage_productset_bestsellers}
{$bestsellers = $wa->shop->productSet( $theme_settings.homepage_productset_bestsellers )}
{/if}
{if $bestsellers && count($bestsellers)}

{if $theme_settings.homepage_bestseller_title}{str_replace(‘{$date}’, $smarty.now|wa_datetime:»humandate», $theme_settings.homepage_bestseller_title)}{/if}
{if $theme_settings.homepage_timer_title}{$theme_settings.homepage_timer_title}{/if}
{if $theme_settings.homepage_timer_description}{$theme_settings.homepage_timer_description}{/if}

{if $theme_settings.top_product_timer != ‘off’}

{/if}

{/if}
{/if}

{* Brands logotypes *}
{if $wa->photos}
{$slider_brands = $wa->photos->photos($theme_settings.slider_brands)}
{if $slider_brands}

{$theme_settings.brands_block_name}
{foreach $slider_brands as $brands}

{if $brands.description}
{$wa->photos->getImgHtml($brands, «200×0», false)}
{else}
{$wa->photos->getImgHtml($brands, «200×0», false)}
{/if}

{/foreach}

{/if}
{/if}

{* Shop description *}
{if $wa->block(«main_block»)}

{$wa->block(«main_block»)}
{* Last news *}
{if $wa->blog}
{$latest_posts = $wa->blog->posts(null, 2)}
{if $latest_posts}

{foreach $latest_posts as $post}


{if !empty($post.img)}

{/if}

{$post.datetime|wa_date:»humandate»} / {$post.datetime|date_format:»%H:%M»}
{$post.title|strip_tags|truncate:100}
{$post.text|strip_tags|truncate:100}

{/foreach}

{/if}
{/if}

{/if}

{* plugin hook: ‘frontend_homepage’ *}
{foreach $frontend_homepage as $_}{$_}{/foreach}

{/strip}