Gavimse Posted January 28, 2022 Share Posted January 28, 2022 Bonjour à tous, Je souhaite afficher le prix de mes produits que pour une catégorie. Et que pour le reste du site, les prix ne s'affichent pas sauf si les clients sont connectés. Presta 1.6.1.24 Quelqu’un pour m'aider? Link to comment Share on other sites More sharing options...
Gavimse Posted January 28, 2022 Author Share Posted January 28, 2022 Bonjour, J'ai réussi dans product.tpl avec : {if $product->show_price && !isset($restricted_country_mode) && !$PS_CATALOG_MODE && $category->id =='123'} mais pas dans product-list.tpl : {if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price && $product.id_category == '123' ) || (isset($product.available_for_order) && $product.available_for_order)))} Need help Link to comment Share on other sites More sharing options...
Baba deCode Posted January 28, 2022 Share Posted January 28, 2022 Salut essaye, $product.id_category_default cdt Link to comment Share on other sites More sharing options...
Gavimse Posted January 31, 2022 Author Share Posted January 31, 2022 ça marche pas Link to comment Share on other sites More sharing options...
Gavimse Posted January 31, 2022 Author Share Posted January 31, 2022 (edited) Non, dans la liste des produits, tous les prix s'affichent. Je souhaite que seuls les prix des produits de la catégorie 123 s'affichent. J'essaie donc de jouer avec les IF dans product-list.tpl. Edited January 31, 2022 by Gavimse (see edit history) Link to comment Share on other sites More sharing options...
Gavimse Posted January 31, 2022 Author Share Posted January 31, 2022 Oui Link to comment Share on other sites More sharing options...
Gavimse Posted February 1, 2022 Author Share Posted February 1, 2022 Quelqu'un a la solution? Link to comment Share on other sites More sharing options...
Mediacom87 Posted February 1, 2022 Share Posted February 1, 2022 {if $product.id_category_default == 123} {$PS_CATALOG_MODE = 1} {/if} à mettre dans la boucle foreach 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