Moin Leute,
Es wird für ein Template die index.tpl aus dem frontend/index Ordner abgeleitet. Der obere Aufbau der Datei ist wie folgt. Nun das eigentliche Problem. Für ein Plugin wird das JS nicht eingebunden/geladen. Benenne ich die abgeleitete index.tpl um, so funktioniert das Plugin astrein. Leider stehe ich auf dem Schlauch…
Jemand vielleicht eine Idee?
{extends file='parent:frontend/index/index.tpl'}
{block name='frontend_index_top_bar_container'}
{$smarty.block.parent}
{if {controllerName|lower} === 'index'}
<!--<div class="sm-countdown">
{block name="frontend_detail_sm_data_delivery"}{/block}
</div>-->
{/if}
{block name="frontend_index_sm_contact_sidebar_hook"}
{include file='frontend/sm/index/sm-sidebar.tpl'}
{/block}
{/block}
{block name="frontend_index_footer"}
<div class="sm-footer--top">
<img class="polar-bear" src="{link file='frontend/_public/src/img/polar-bear.png'}" />
<div class="container">
<img src="{link file='frontend/_public/src/img/logos/logo-bottom.png'}" />
</div>
</div>
<footer class="footer-main">
<div class="sm-footer-nav">
<div class="container">
{block name="frontend_index_footer_container"}
{include file='frontend/index/footer.tpl'}
{/block}
</div>
</div>
<div class="sm-footer--bottom">
{include file='frontend/sm/index/sm_footer_bottom.tpl'}
</div>
</footer>
{/block}
{block name="frontend_index_header_javascript"}
{$controllerData = [
'home' => {url controller="index" fullPath},
'vat_check_enabled' => {config name='vatcheckendabled'},
'vat_check_required' => {config name='vatcheckrequired'},
'register' => {url controller="register"},
'checkout' => {url controller="checkout"},
'ajax_search' => {url controller="ajax_search" _seo=false},
'ajax_cart' => {url controller='checkout' action='ajaxCart' _seo=false},
'ajax_validate' => {url controller="register" _seo=false},
'ajax_add_article' => {url controller="checkout" action="addArticle" _seo=false},
'ajax_listing' => {url module="widgets" controller="listing" action="listingCount" _seo=false},
'ajax_cart_refresh' => {url controller="checkout" action="ajaxAmount" _seo=false},
'ajax_address_selection' => {url controller="address" action="ajaxSelection" fullPath _seo=false},
'ajax_address_editor' => {url controller="address" action="ajaxEditor" fullPath _seo=false}
]}
{$themeConfig = [
'offcanvasOverlayPage' => $theme.offcanvasOverlayPage
]}
{$lastSeenProductsKeys = []}
{foreach $sLastArticlesConfig as $key => $value}
{$lastSeenProductsKeys[$key] = $value}
{/foreach}
{$lastSeenProductsConfig = [
'baseUrl' => $Shop->getBaseUrl(),
'shopId' => $Shop->getId(),
'noPicture' => {link file="frontend/_public/src/img/no-picture.jpg"},
'productLimit' => {"{config name=lastarticlestoshow}"|floor},
'currentArticle' => ""
]}
{if $sArticle}
{$lastSeenProductsConfig.currentArticle = $sLastArticlesConfig}
{$lastSeenProductsConfig.currentArticle.articleId = $sArticle.articleID}
{$lastSeenProductsConfig.currentArticle.linkDetailsRewritten = $sArticle.linkDetailsRewrited}
{$lastSeenProductsConfig.currentArticle.articleName = $sArticle.articleName}
{if $sArticle.additionaltext}
{$lastSeenProductsConfig.currentArticle.articleName = $lastSeenProductsConfig.currentArticle.articleName|cat:' ':$sArticle.additionaltext}
{/if}
{$lastSeenProductsConfig.currentArticle.imageTitle = $sArticle.image.description}
{$lastSeenProductsConfig.currentArticle.images = []}
{foreach $sArticle.image.thumbnails as $key => $image}
{if $sArticle.image.attribute.attributemotivwarenkorb}
{$lastSeenProductsConfig.currentArticle.images[] = [
'source' => $sArticle.image.attribute.attributemotivwarenkorb|mediaUrl,
'retinaSource' => $sArticle.image.attribute.attributemotivwarenkorb|mediaUrl,
'sourceSet' => $sArticle.image.attribute.attributemotivwarenkorb|mediaUrl
]}
{else}
{$lastSeenProductsConfig.currentArticle.images[$key] = [
'source' => $image.source,
'retinaSource' => $image.retinaSource,
'sourceSet' => $image.sourceSet
]}
{/if}
{/foreach}
{/if}
{$csrfConfig = [
'generateUrl' => {url controller="csrftoken" fullPath=false},
'basePath' => {$Shop->getBasePath()|cat:'/'},
'shopId' => $Shop->getId()
]}
{if {config name="shareSessionBetweenLanguageShops"} && $Shop->getMain()}
{$csrfConfig['shopId'] = $Shop->getMain()->getId()}
{/if}
{* let the user modify the data here *}
{block name="frontend_index_header_javascript_data"}{/block}
<script id="footer--js-inline">
{block name="frontend_index_header_javascript_inline"}
var timeNow = {time() nocache};
var secureShop = {if $Shop->getSecure() eq 1}true{else}false{/if};
var asyncCallbacks = [];
document.asyncReady = function (callback) {
asyncCallbacks.push(callback);
};
var controller = controller || {$controllerData|json_encode};
var snippets = snippets || { "noCookiesNotice": {s json="true" name='IndexNoCookiesNotice'}{/s} };
var themeConfig = themeConfig || {$themeConfig|json_encode};
var lastSeenProductsConfig = lastSeenProductsConfig || {$lastSeenProductsConfig|json_encode};
var csrfConfig = csrfConfig || {$csrfConfig|json_encode};
var statisticDevices = [
{ device: 'mobile', enter: 0, exit: 767 },
{ device: 'tablet', enter: 768, exit: 1259 },
{ device: 'desktop', enter: 1260, exit: 5160 }
];
var cookieRemoval = cookieRemoval || {config name="cookie_note_mode"};
{/block}
</script>
{include file="frontend/index/datepicker-config.tpl"}
{if $theme.additionalJsLibraries}
{$theme.additionalJsLibraries}
{/if}
{/block}