Jump to content
prestashop17

Errors load template 'catalog/product-miniature.tpl' in prestashop 1.7

Recommended Posts

Hi,

I'm writting module feature products.  Everthing in backend is ok. but when i load frontend have errors  unable load template 'catalog/product-miniature.tpl'  as below 

 

Fatal error: Uncaught --> Smarty: Unable to load template file 'catalog/product-miniature.tpl' in 'E:\xampp7\htdocs\prestashop\demo7/themes/classic/modules/posfeaturedproducts/views/templates/hook/posfeaturedproducts.tpl' <-- thrown inE:\xampp7\htdocs\prestashop\demo7\vendor\prestashop\smarty\sysplugins\smarty_internal_templatebase.php on line 129

 

Anyone  know why  ?  Pls help me.  

 

I attached our module below

 

Thanks 

 

Regards

PT Team

posfeaturedproducts.zip

Share this post


Link to post
Share on other sites

You are including wrong tpl file of product-list and that is why you are getting this error.

 

You are including...

catalog/product-miniature.tpl

and this template is not exist in new beta version release of Prestashop. Prestashop team changed this to...

catalog/_partials/miniatures/product.tpl

Make use of following code snippet in file "modules\posfeaturedproducts\views\templates\hook\posfeaturedproducts.tpl"

<section class="pos-featured-products featured-products">
    <h1>{l s='Features Products' mod='posfeaturedproducts'}</h1>
    <div class="products">
        {foreach from=$products item="product"}
            {include file="catalog/_partials/miniatures/product.tpl" product=$product}
        {/foreach}
    </div>
    <a href="{$allProductsLink}">{l s='All products' mod='posfeaturedproducts'}</a>
</section>

This works at my end now. Hope this helps :)

Edited by Divyesh Prajapati (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

Hi I have a similar error after a server migration. Environment php version: 7.0.33, prestashop version: 1.7

However the tpl is exactly the same as shown above:

<section>
  <h1>{l s='Our Products' d='Modules.Featuredproducts.Shop'}</h1>
  <div class="products">
    {foreach from=$products item="product"}
      {include file="catalog/_partials/miniatures/product.tpl" product=$product}
    {/foreach}
  </div>
  <a href="{$allProductsLink}">{l s='All products' d='Modules.Featuredproducts.Shop'}</a>
</section>

 

Yet I still see these errors in the apache error log:

mod_fcgid: stderr: thrown in /var/www/vhosts/kidsspecialkinderkleding.nl/httpdocs/vendor/prestashop/smarty/sysplugins/smarty_internal_templatebase.php on line 129

mod_fcgid: stderr: PHP Fatal error: Uncaught --> Smarty: Unable to load template file 'catalog/_partials/product-add-to-cart1.tpl' in 'catalog/_partials/miniatures/product.tpl' <--

 

Any idea how to fix this error?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More