Jump to content

State and Country Columns on CubeCart_Order_Summary table


glynwilliams

Recommended Posts

HI there

I'm pulling data out of the Order_Summary table and the State and Country Columns both contain numeric codes rather than character strings.

Does anyone know where I can get the cross reference data from to convert these numbers into country and state names  please ?

I've had a look in the DB Schema and I can't seem to find anything.

Any help really appreciated.

Kind Regards

Glyn.

Link to comment
Share on other sites

If it is code that runs under CubeCart control, you can use the common functions getCountryFormat() and getStateFormat().

The input parameters for both are:

$input : the value of whatever it is that you have
$match : the name of whatever it is that you have (default 'numcode' for country, or 'id' for state)
$fetch : the name of what you want (default 'name')

For example: getCountryFormat(840, 'numcode', 'name') returns "United States".

The countries are listed in the database table CubeCart_geo_country, and the states are listed in the database table CubeCart_geo_zone.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...