Created
December 14, 2016 15:07
-
-
Save bakura10/afa21c88d05c25c36d67ffb85630b836 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
Pipeline events: | |
* add_product.pre | |
* add_product.post | |
Theme could add messages to the pipeline: | |
ShopifyApi.Pipeline.addProduct(1234, 1).then(function(pipelineStatus, cart) { | |
// do things | |
}); | |
Apps could hook to events: | |
var priority = 2; | |
ShopifyApi.Pipeline.listen('add_product.pre', priority, function(requestedId, requestedQuantity) { | |
// An app could implement its own logic to prevent the element to be added, for instance | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment