Jump to content

Déployer le Bloc Nouveau Produit en home page


Recommended Posts

Bonjour,

J'ai au centre de ma page d'accueil un bloc "Nouveau" qui correspond aux nouveaux produits.

Il faut cliquer dessus pour qu'il se déploie et je souhaiterai qu'il soit toujours déployé.

Pouvez-vous m'aider ?

Mon site : https://folle-idee.com

Merci !

 

Link to comment
Share on other sites

Non, ça semble ok donc cela doit venir de votre thème

Dans le tpl de votre module, dans le répertoire /themes, remplacez:

<div id="blocknewproducts" class="product_list grid row blocknewproducts tab-pane">

Par:

<div id="blocknewproducts" class="product_list grid row blocknewproducts tab-pane active">

Puis videz vos caches.

Link to comment
Share on other sites

J'ai trouvé le fichier blocknewproducts_home.tpl

et dedans cette mention :

{include file="$tpl_dir./product-list.tpl" products=$new_products class='blocknewproducts tab-pane' id='blocknewproducts'}

j'ai essayé de mettre ce code :

{include file="$tpl_dir./product-list.tpl" products=$new_products class='blocknewproducts tab-pane active' id='blocknewproducts'}

mais ca me génère une erreur.

 

Une idée ?

Merci beaucoup en tous cas pour votre aide.

Edited by Delf74 (see edit history)
Link to comment
Share on other sites

Je modifie sous mac avec Text Edit

Voici l'erreur :
Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "/home/folleidefi/www/themes/cosmetics/modules/blocknewproducts/views/templates/hook/blocknewproducts_home.tpl" on line 26 "{include file="$tpl_dir./product-list.tpl" products=$new_products class='blocknewproducts tab-pane active’ id='blocknewproducts'}" - Unexpected "blocknewproducts", expected one of: "}" <-- thrown in /home/folleidefi/www/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 26

 

Je mets le fichier en PJ 

 

blocknewproducts_home.tpl

Link to comment
Share on other sites

Text Edit.... beuark^^

class='blocknewproducts tab-pane active’ 

la seconde quote n'est pas une quote mais une apostrophe !

c/c collez ça ou prenez le fichier corrigé ci-joint

{if isset($new_products) && $new_products}
	{include file="$tpl_dir./product-list.tpl" products=$new_products class='blocknewproducts tab-pane active' id='blocknewproducts'}
{else}
<ul id="blocknewproducts" class="blocknewproducts tab-pane">
	<li class="alert alert-info">{l s='No new products at this time.' mod='blocknewproducts'}</li>
</ul>
{/if}

 

blocknewproducts_home.tpl

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...