Skip to content

Instantly share code, notes, and snippets.

@jackfranklin
Created April 24, 2018 14:53
Embed
What would you like to do?
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