JNdev Posted October 13, 2016 Report Posted October 13, 2016 How to get fullname of country, state? eg State: Norborg Country: Singapore <?php echo (!empty($contact->city) ? $this->Html->_($contact->city, true). "":""); ?> <?php echo (!empty($contact->state) ? $this->Html->_($contact->state, true). "":""); ?> I try but not work <?php echo (!empty($contact->country->alpha3) ? $this->Html->_($contact->country->alpha3, true). "":""); ?> Tanks very much for help me Quote
Michael Posted October 13, 2016 Report Posted October 13, 2016 <?php echo (!empty($contact->country->name) ? $this->Html->_($contact->country->name, true). "":""); ?> Does that work mate? Quote
Tyson Posted October 13, 2016 Report Posted October 13, 2016 The data available depends on the controller and what it retrieves. For individual contacts, only the 2-character state and country are available (i.e. what is stored with the contact). If you need more information, such as additional information on the state/country based on those 2-character state/country codes, then you would need to fetch them separately from the States and Countries models. Quote
JNdev Posted October 13, 2016 Author Report Posted October 13, 2016 Sorry @Tyson i not expert on blesta function, can you write little sample here to get data full name country ? ariq01 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.