Remy FRK Corp Posted October 11, 2020 Share Posted October 11, 2020 Bonjour à tous. Quelqu'un aurait il le bout de smarty qui permettrait d'afficher le code postal de la première adresse du client loggé (le but étant de faire une condition d'affichage selon le CP du client)? Je connais bien celle ci mais il faut renseigner un id qui du coup change. comment fixe on ca ? Rémy Link to comment Share on other sites More sharing options...
Eolia Posted October 11, 2020 Share Posted October 11, 2020 Vous donne l'id de la première adresse: {(int)Address::getFirstCustomerAddressId(Context::getContext()->customer->id)} Link to comment Share on other sites More sharing options...
Remy FRK Corp Posted October 11, 2020 Author Share Posted October 11, 2020 Merci Eolia Donc là cette variable m'affiche effectivement l'id de la première adresse du client, comment obtenir le Code postal à partir de là ? Link to comment Share on other sites More sharing options...
Remy FRK Corp Posted October 11, 2020 Author Share Posted October 11, 2020 Heu... {$customer.addresses[{(int)Address::getFirstCustomerAddressId(Context::getContext()->customer->id)}].postcode} OK j'avoue c'était là... MERCIIIIIIIII Eolia 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