{"id":7504,"date":"2019-10-11T08:18:08","date_gmt":"2019-10-11T02:48:08","guid":{"rendered":"https:\/\/www.hiddentechies.com\/blog\/?p=7504"},"modified":"2020-10-09T18:43:56","modified_gmt":"2020-10-09T13:13:56","slug":"get-country-details-by-id-in-prestashop","status":"publish","type":"post","link":"https:\/\/www.hiddentechies.com\/blog\/prestashop\/get-country-details-by-id-in-prestashop\/","title":{"rendered":"How to get country details by id in PrestaShop 1.7"},"content":{"rendered":"<p>In this post I am going to explain how to get country details by id in PrestaShop 1.7.<\/p>\n<pre class=\"lang:default decode:true \">\/\/ Your Country Id\r\n$id_country = 21;\r\n\r\n\/\/ Load Country object\r\n$country = new Country((int) $id_country);\r\n\r\n\/\/ Validate Country object\r\nif (Validate::isLoadedObject($country)) {\r\n\r\n\t\/\/ Print Country Object\r\n\techo \"&lt;pre&gt;\";\r\n\tprint_r($country);\r\n\techo \"&lt;\/pre&gt;\";\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<div class=\"angwp_12010 _ning_cont _ning_hidden _ning_outer _align_center responsive\" data-size=\"custom\" data-bid=\"12010\" data-aid=\"0\" style=\"max-width:800px; width:100%;height:inherit;\"><div class=\"_ning_label _left\" style=\"\"><\/div><div class=\"_ning_inner\" style=\"\"><a href=\"https:\/\/www.hiddentechies.com\/blog?_dnlink=12010&t=1775887361\" class=\"strack_cli _ning_link\" target=\"_blank\">&nbsp;<\/a><div class=\"_ning_elmt\"><img decoding=\"async\" src=\"https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/angwp\/items\/12010\/Banner-2.png\" \/><\/div><\/div><\/div><div class=\"clear\"><\/div>","protected":false},"excerpt":{"rendered":"<p>In this post I am going to explain how to get country details by id in PrestaShop 1.7. \/\/ Your Country Id $id_country = 21; \/\/ Load Country object $country = new Country((int) $id_country); \/\/ Validate Country object if (Validate::isLoadedObject($country)) { \/\/ Print Country Object echo &#8220;&lt;pre&gt;&#8221;; print_r($country); echo &#8220;&lt;\/pre&gt;&#8221;; } &nbsp; &nbsp;<\/p>\n","protected":false},"author":1,"featured_media":7533,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[221,222,2139],"tags":[629,313,329,331],"_links":{"self":[{"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/posts\/7504"}],"collection":[{"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/comments?post=7504"}],"version-history":[{"count":1,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/posts\/7504\/revisions"}],"predecessor-version":[{"id":7505,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/posts\/7504\/revisions\/7505"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/media\/7533"}],"wp:attachment":[{"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/media?parent=7504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/categories?post=7504"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/tags?post=7504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}