Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

Commit

Permalink
0.1.1 Add ACT (oops!) and bring releases.json into this repo
Browse files Browse the repository at this point in the history
  • Loading branch information
bossanova808 committed May 18, 2016
1 parent f84fed1 commit 01f88c3
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Makes it easier to set up a field that the user can fill in with either their po

**Currently uses hardcoded values for the states names so you MUST set up your states to match mine** - I will possible change this to either look up values in your database (or accept a pull request!), but I'm holding off on this for now as I presume Commerce will actually auto-populate this data on release.

The order must match this (check your market_states table):
The order must match this (check your commerce_states table):

```
$statesNameMap = array(
Expand All @@ -22,6 +22,7 @@ The order must match this (check your market_states table):
"NSW" => "New South Wales",
"QLD" => "Queensland",
"TAS" => "Tasmania",
"ACT" => "Australian Captial Territory",
);
Expand All @@ -33,6 +34,7 @@ The order must match this (check your market_states table):
"NSW" => 5,
"QLD" => 6,
"TAS" => 7,
"ACT" => 8
);
Expand Down
4 changes: 2 additions & 2 deletions commerceauspostlookup/CommerceAusPostLookupPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function getName()

function getVersion()
{
return '0.1.0';
return '0.1.1';
}

function getDeveloper()
Expand All @@ -44,7 +44,7 @@ function hasSettings(){
}

function getReleaseFeedUrl(){
return 'https://raw.githubusercontent.com/bossanova808/craft-plugin-updates/master/updates-commerceauspostlookup.json';
return 'https://raw.githubusercontent.com/bossanova808/CommerceAusPostLookup/master/releases.json';
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public function actionLookup()
"NSW" => "New South Wales",
"QLD" => "Queensland",
"TAS" => "Tasmania",
"ACT" => "Australian Captial Territory",
);

$statesIDMap = array(
Expand All @@ -85,6 +86,7 @@ public function actionLookup()
"NSW" => 5,
"QLD" => 6,
"TAS" => 7,
"ACT" => 8
);

//Process the results and put into a suggestions array - we just return this empty if there are no results
Expand Down
23 changes: 23 additions & 0 deletions releases.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Time is generated by using php interactively php -a
// $time = new DateTime; echo $time->format(DateTime::ATOM);

[

{
"version": "0.1.1",
"date": "2016-05-19T09:31:28+10:00",
"downloadUrl": "https://github.com/bossanova808/CommerceAusPostLookup/archive/0.1.1.zip",
"notes": [
"[Fixed] Updated states table to include ACT (oops!)",
]
}

{
"version": "0.1.0",
"date": "2015-11-05T12:20:36+11:00",
"downloadUrl": "https://github.com/bossanova808/CommerceAusPostLookup/archive/0.1.0.zip",
"notes": [
"[Fixed] Updated for Craft 2.5",
]
}
]

0 comments on commit 01f88c3

Please sign in to comment.