POC flask based middleware to break out bundle components post order placement via the Shopify order editing API.
Before installing, make sure that:
- You have
pip3
andpython3
PATH setup - Have the ngrok executable handy (https://ngrok.com/download)
- Have installed a private/custom Shopify app and have the keys ready to go!
- clone the project
- run
./bundlesapp.sh setup
- configure the
example_config.yaml
file with the bundle and API setup and rename toconfig.yaml
- run
./bundlesapp.sh configure_bundle
. NOTE: If you make a mistake here with the bundle configuration, run./bundlesapp.sh delete_bundle
to delete the metafields so you can start again. - start ngrok server pointing to 8080 via
ngrok http 8080
and retrieve the ngrok endpoint url, e.g. 'bfd4-151-231-84-15.ngrok.io' NOTE: the exposed endpoint only processes verified shopify webhooks by calculating a digital signature. - run
./bundlesapp.sh create_webhook <ngrok>
using the ngrok endpoint created in previous step - run
./bundlesapp.sh start_server
to begin listening for incoming orders. - Place an order with the product configured in the config.yaml file and watch it split!
NOTE: If lost, run ./bundlesapp.sh help
for options
- 'setup' - install virtual python environment
- 'configure_bundle' - configure bundle metafield to parent product based on config.py
- 'delete_bundle' - delete metafields from the parent product.
- 'create_webhook <endpoint>' - create orders webhook to point at given endpoint.
- 'start_server' - starts the server to listen for webhooks. (make sure ngrok is running first)