Manu-41 Posted July 19, 2018 Share Posted July 19, 2018 Bonjour, j'ai besoin d'ajouter la variable de la marque dans le module 'produit dans la même catégorie'. J'ai ajouté: {$product->manufacturer_name|escape:'htmlall':'UTF-8'} mais ca ne fonctionne pas. une piste? Link to comment Share on other sites More sharing options...
Eolia Posted July 19, 2018 Share Posted July 19, 2018 Ca ne fonctionne pas parce que cette variable n'existe pas^^ $product->id_manufacturer à la rigueur... Link to comment Share on other sites More sharing options...
doekia Posted July 19, 2018 Share Posted July 19, 2018 et probablement que le module productcategory ne ramène pas des objects, mais un tableau, donc pas -> mais . a voir dans le tpl du module Link to comment Share on other sites More sharing options...
Manu-41 Posted July 19, 2018 Author Share Posted July 19, 2018 2 hours ago, Eolia said: Ca ne fonctionne pas parce que cette variable n'existe pas^^ $product->id_manufacturer à la rigueur... J'ai ajouté cette variable dans le product list, après le nom du produit, et cela fonctionne. C'est pour cela que j'ai essayé de l'ajouté au module produit dans la même catégorie, mais là ca ne fonctionne pas. Link to comment Share on other sites More sharing options...
BeComWeb Posted July 20, 2018 Share Posted July 20, 2018 Peut-être parce que les items de la boucle sont nommés "categoryProduct" et pas "product"... Donc avec avec {$categoryProduct.manufacturer_name|escape:'htmlall':'UTF-8'} ça fonctionne. Un petit {if isset(...)} ne serait pas de trop quand même Link to comment Share on other sites More sharing options...
Manu-41 Posted July 20, 2018 Author Share Posted July 20, 2018 21 minutes ago, BeComWeb said: Peut-être parce que les items de la boucle sont nommés "categoryProduct" et pas "product"... Donc avec avec {$categoryProduct.manufacturer_name|escape:'htmlall':'UTF-8'} ça fonctionne. Un petit {if isset(...)} ne serait pas de trop quand même Ca fonctionne bien, un grand merci pour ton aide et solution. Link to comment Share on other sites More sharing options...
BeComWeb Posted July 20, 2018 Share Posted July 20, 2018 OK. Passe le topic sur "[Résolu]". Bon week-end Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now