{* storefront homepage *} {$_content_exist = true} {if $theme_settings.homepage_sidebar_layout != 'hidden'}
{if $theme_settings.homepage_sidebar_storeinfo}

{$wa->shop->settings('name')}

{$wa->shop->settings('phone')} {if !method_exists($wa->shop, 'schedule')} {if $wh = $wa->shop->settings('workhours')}
{$wh.days_from_to}{if $wh.hours_from && $wh.hours_to} {$wh.hours_from}—{$wh.hours_to}{/if} {/if} {/if}

{strip} {if !empty($theme_settings.use_shop_schedule) && method_exists($wa->shop, 'schedule')} {$_schedule = $wa->shop->schedule()}
[`Business hours`]
{foreach $_schedule.current_week as $_day}
{$_day.name|escape}
{if !empty($_day.work)}
{$_day.start_work|escape} — {$_day.end_work|escape}
{else}
[`day off`]
{/if}
{/foreach}
{elseif !empty($theme_settings.manual_schedule)}
{$theme_settings.manual_schedule|escape}
{/if} {/strip}
{/if} {if $theme_settings.homepage_sidebar_categories} {$categories = $wa->shop->categories(0, 0, true)} {if count($categories)} {/if} {/if}
{if !empty($theme_settings.homepage_bullet_title_1)}

{$theme_settings.homepage_bullet_title_1}

{$theme_settings.homepage_bullet_body_1}

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

{$theme_settings.homepage_bullet_title_2}

{$theme_settings.homepage_bullet_body_2}

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

{$theme_settings.homepage_bullet_title_3}

{$theme_settings.homepage_bullet_body_3}

{/if}
{/if}
{$promocards = $wa->shop->promos('link', '900')} {$bestsellers = null} {if !empty($theme_settings.homepage_productset_bestsellers)} {$bestsellers = $wa->shop->productSet( $theme_settings.homepage_productset_bestsellers )} {/if} {if !empty($theme_settings.homepage_productset_promo) && $theme_settings.homepage_bxslider_mode !== 'promos' && $theme_settings.homepage_bxslider_mode !== 'hidden'} {$promoproducts = $wa->shop->productSet( $theme_settings.homepage_productset_promo )} {/if} {if empty($promocards) && empty($promoproducts) && empty($bestsellers)} {$_content_exist = false}

[`Welcome to your online store!`]

{sprintf('[`To display useful content on the home page, add some products to product sets listed in the design settings, or set up banners for your marketing promos.`]', $wa_backend_url|cat:'shop/?action=products', $wa_backend_url|cat:'shop/?action=storefronts', $wa_backend_url|cat:'shop/marketing/')}

{else} {if $theme_settings.homepage_bxslider_mode !== 'hidden'} {* PROMO CARDS SLIDER *} {if $theme_settings.homepage_bxslider_mode === 'promos'} {if !empty($promocards)} {include file="./home.slider.html" inline} {else}

{sprintf('[`To display a slider, set up promos with the “Banner” tool in “Marketing“ section.`]', $wa_backend_url|cat:'shop/marketing/')}

{/if} {* PROMO PRODUCTS SLIDER *} {else} {if !empty($promoproducts)} {include file="./home.slider.html" inline} {else}


{sprintf('[`Product set with the ID %s either does not exist or does not contain any product. Add some products into a product set with the specified ID to make these products featured here.`]', $theme_settings.homepage_productset_promo|escape|default:'()' )}

{/if} {/if} {/if} {* PROMO CARDS *} {if !empty($theme_settings.homepage_promocards_below_the_slider)} {if !empty($promocards)} {* PROMOS *}
{else}

{sprintf('[`To display promo cards, set up promos with the “Banner” tool in “Marketing“ section.`]', $wa_backend_url|cat:'shop/marketing/')}

{/if} {/if} {* BESTSELLERS *} {if !empty($theme_settings.homepage_productset_bestsellers) || !empty($theme_settings.homepage_bestsellers_title)}
{if !empty($theme_settings.homepage_bestsellers_title)}
{str_replace('{$date}', $smarty.now|wa_datetime:"humandate", $theme_settings.homepage_bestsellers_title)}
{/if} {if !empty($theme_settings.homepage_productset_bestsellers)} {if !empty($bestsellers)} {include file="list-thumbs.html" products=$bestsellers} {else}


{sprintf('[`Drag&drop some products to set with id “%s” in your online store’s backend.`]', $theme_settings.homepage_productset_bestsellers)}

{/if} {/if}
{/if} {/if} {* @event frontend_homepage.%plugin_id% *} {foreach $frontend_homepage as $_}{$_}{/foreach}
{if !empty($_content_exist)} {if !empty($theme_settings.homepage_welcome_note)}
{$theme_settings.homepage_welcome_note}
{/if} {if !empty($theme_settings.homepage_productset_onsale)} {$onsale = $wa->shop->productSet( $theme_settings.homepage_productset_onsale )} {/if} {if $theme_settings.homepage_blogposts && $wa->blog} {$blog_posts = $wa->blog->posts(null,4)} {if count($blog_posts)}

[`Latest blog updates`]

{/if} {/if} {/if}