-
-
Save jackfranklin/e5ab55c3529bfea9b7cd88672b4eea70 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setup_click_and_collect() { | |
var api_key = $collect_plus_widget.data('api-key'); | |
// parcelpoint is the provided collect plus widget | |
parcelpoint.Store.init({ | |
apiKey: api_key, | |
country: { | |
name: 'United Kingdom', | |
code: 'uk', | |
}, | |
targetDiv: $collect_plus_widget, | |
// more options here, left out | |
}); | |
parcelpoint.Store.display(display_opts); | |
parcelpoint.Property.onChange(['storeDetails'], function(_, newDetails) { | |
// deal with the user picking a new store | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment