Проблема со Smarty
Ошибка:
Fatal error: Uncaught --> Smarty: Unable to load template file 'product.tpl' in 'store_front.tpl' <-- thrown in C:tshirtshoplibssmartysyspluginssmarty_internal_templatebase.php on line 129
кусок кода возле 129 строчки:
// must reset merge template date
$_template->smarty->merged_templates_func = array();
// get rendered template
// disable caching for evaluated code
if ($_template->source->recompiled) {
$_template->caching = false;
}
// checks if template exists
if (!$_template->source->exists) {
if ($_template->parent instanceof Smarty_Internal_Template) {
$parent_resource = " in '{$_template->parent->template_resource}'";
} else {
$parent_resource = '';
}
throw new SmartyException("Unable to load template {$_template->source->type} '{$_template->source->name}'{$parent_resource}");(129ая)
}
// read from cache or render
if (!($_template->caching == Smarty::CACHING_LIFETIME_CURRENT || $_template->caching == Smarty::CACHING_LIFETIME_SAVED) || !$_template->cached->valid) {
// render template (not loaded and not in cache)
if (!$_template->source->uncompiled) {
/** @var Smarty_Internal_Template $_smarty_tpl
* used in evaluated code
*/
$_template->smarty->merged_templates_func = array();
// get rendered template
// disable caching for evaluated code
if ($_template->source->recompiled) {
$_template->caching = false;
}
// checks if template exists
if (!$_template->source->exists) {
if ($_template->parent instanceof Smarty_Internal_Template) {
$parent_resource = " in '{$_template->parent->template_resource}'";
} else {
$parent_resource = '';
}
throw new SmartyException("Unable to load template {$_template->source->type} '{$_template->source->name}'{$parent_resource}");(129ая)
}
// read from cache or render
if (!($_template->caching == Smarty::CACHING_LIFETIME_CURRENT || $_template->caching == Smarty::CACHING_LIFETIME_SAVED) || !$_template->cached->valid) {
// render template (not loaded and not in cache)
if (!$_template->source->uncompiled) {
/** @var Smarty_Internal_Template $_smarty_tpl
* used in evaluated code
*/
код product.tpl
{load_presentation_object filename="product" assign="obj"}
<h1 class="title">{$obj->mProduct.name}</h1>
{if $obj->mProduct.image}
<img class="product-image" src="{$obj->mProduct.image}"
alt="{$obj->mProduct.name} image" />
{/if}
{if $obj->mProduct.image_2}
<img class="product-image" src="{$obj->mProduct.image_2}"
alt="{$obj->mProduct.name} image 2" />
{/if}
<p class="description">{$obj->mProduct.description}</p>
<p class="section">
Price:
{if $obj->mProduct.discounted_price != 0}
<span class="old-price">{$obj->mProduct.price}</span>
<span class="price">{$obj->mProduct.discounted_price}</span>
{else}
<span class="price">{$obj->mProduct.price}</span>
{/if}
</p>
{if $obj->mLinkToContinueShopping}
<a href="{$obj->mLinkToContinueShopping}">Continue Shopping</a>
{/if}
<h2>Find similar products in our catalog:</h2>
<ol>
{section name=i loop=$obj->mLocations}
<li class="navigation">
{strip}
<a href="{$obj->mLocations.link_to_department}">
{$obj->mLocations.department_name}
</a>
{/strip}
»
{strip}
<a href="{$obj->mLocations.link_to_category}">
{$obj->mLocations.category_name}
</a>
{/strip}
</li>
{/section}
</ol>
<h1 class="title">{$obj->mProduct.name}</h1>
{if $obj->mProduct.image}
<img class="product-image" src="{$obj->mProduct.image}"
alt="{$obj->mProduct.name} image" />
{/if}
{if $obj->mProduct.image_2}
<img class="product-image" src="{$obj->mProduct.image_2}"
alt="{$obj->mProduct.name} image 2" />
{/if}
<p class="description">{$obj->mProduct.description}</p>
<p class="section">
Price:
{if $obj->mProduct.discounted_price != 0}
<span class="old-price">{$obj->mProduct.price}</span>
<span class="price">{$obj->mProduct.discounted_price}</span>
{else}
<span class="price">{$obj->mProduct.price}</span>
{/if}
</p>
{if $obj->mLinkToContinueShopping}
<a href="{$obj->mLinkToContinueShopping}">Continue Shopping</a>
{/if}
<h2>Find similar products in our catalog:</h2>
<ol>
{section name=i loop=$obj->mLocations}
<li class="navigation">
{strip}
<a href="{$obj->mLocations.link_to_department}">
{$obj->mLocations.department_name}
</a>
{/strip}
»
{strip}
<a href="{$obj->mLocations.link_to_category}">
{$obj->mLocations.category_name}
</a>
{/strip}
</li>
{/section}
</ol>
Спасибо заранее.