Problem
Discount Ninja requires control over the checkout button to ensure that, when the button is clicked, the visitor can be directed to a discounted Shopify checkout, prepared by Discount Ninja.
Other third-party solutions (typically shipping, pick-up, pre-order apps) may need to add logic before Discount Ninja takes over and handles the redirect to the checkout.
Solution
To resolve this, third-party solutions can use the following approach:
Add a class
limoniapps-discountninja-ignore
to the checkout button when your app needs control over the button.Handle the checkout button
When ready, click the checkout button again after removing the ignore class
Alternatively, trigger the checkout programmatically (cf. https://support.discountninja.io/en/articles/3579852-client-side-api#h_b138fcd954)
Note that Discount Ninja automatically takes into account all parameters put in place by third-party apps that influence the checkout, including:
hidden input fields in the checkout form to prepopulate (typically shipping address) fields at checkout
a discount code applied in the checkout form
the selected currency
the selected locale
the note field