Jump to content

State and Country Columns on CubeCart_Order_Summary table


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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...