{* get products from predefined product set 'promo' and 'bestsellers'; feel free to replace these with any other product set IDs *} {$promos = $wa->shop->productSet('promo')} {if $theme_settings.homepage_bxslider_mode != 'photos'} {$bestsellers = $wa->shop->productSet('bestsellers')} {/if} {if ($theme_settings.homepage_bxslider_mode != 'photos' && empty($promos) && empty($bestsellers))}

[`Welcome to your new online store!`]

{sprintf('[`Start by creating a product in your store backend.`]', $wa_backend_url|cat:'shop/?action=products#/welcome/')}

{else}
{if $theme_settings.homepage_bxslider_mode == 'photos'} {* latest PHOTOS from Photos app *} {if $wa->photos} {* change search $criteria = '' to any you like, e.g. 'tag/shop', 'album/1'; $size sets photo size in pixels; see Photos app manual for details *} {$criteria = ''} {$size = '970'} {$offset = null} {$limit = 10} {if $slider_photos = $wa->photos->photos($criteria, $size, $offset, $limit)} {else}


[`Photos app returned no photos, so there is nothing to show in your storefront homepage promo slider.`]

{/if} {else}


[`Install Photos app to make your storefront homepage promo slider display last uploaded photos.`]

{/if} {else} {* best selling PRODUCTS *} {if $theme_settings.homepage_bxslider_mode == 'products_last_photo_as_background'} {if $wa->shop->config('enable_2x')} {$size = '970@2x'} {else} {$size = '970'} {/if} {$slider_photos = $wa->shop->images( array_keys($bestsellers), $size )} {* leave only last photos for each product *} {foreach $slider_photos as $product_id => $_photos} {$slider_photos[$product_id] = end($_photos)} {/foreach} {/if} {if $bestsellers && count($bestsellers)} {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.`]','bestsellers')}

{/if} {/if}
{/if} {* @event frontend_homepage.%plugin_id% *} {foreach $frontend_homepage as $_}{$_}{/foreach}

{$theme_settings.homepage_bullet_title_1}

{$theme_settings.homepage_bullet_body_1}

{$theme_settings.homepage_bullet_title_2}

{$theme_settings.homepage_bullet_body_2}

{$theme_settings.homepage_bullet_title_3}

{$theme_settings.homepage_bullet_body_3}

{if $promos} {include file="list-thumbs.html" products=$promos disable_compare=true} {else}

{sprintf('[`In your store backend, drag some products into %s product list (which is in the left sidebar of the Products screen), and these products will be automatically published here — right on your storefront homepage.`]','promo')}

{/if}