Skip to main content
All CollectionsFrequently Asked QuestionsCheckout
Troubleshooting issues with the checkout button
Troubleshooting issues with the checkout button

Learn how to troubleshoot issues that arise when Discount Ninja is unable to redirect to the checkout with discounts applied

Bart Coppens avatar
Written by Bart Coppens
Updated over 2 years ago

Why does Discount Ninja need control over the checkout button?

Discount Ninja is designed to overcome a number of limitations in how Shopify's standard discount codes and automatic codes work.
These limitations are baked in to the standard checkout of Shopify. As a result, Discount Ninja needs to be able to send you to a checkout that applies your discount rules to overcome these limitations.

Does Discount Ninja use a custom checkout?

No. We use Shopify's standard checkout. That means you have access to the payment providers and shipping profiles you have configured.
However, we use advanced techniques to "prefill" the standard checkout with all the required discounts, based on your Discount Ninja promotions.
Both of the techniques we use have two downsides:

  • Your logo does not redirect to your home page.

  • There is no link to go back to the cart. Visitors have to use the back button to change the cart.

Depending on your settings a discount field may or may not be available in the checkout. See this article for more.

Does Discount Ninja interfere with all checkouts?

No. The app allows the normal checkout process to proceed as normal if detects that Discount Ninja promotions have not been applied to the cart.

How can I know if my checkout button works properly?

When clicking the checkout button you should see a small popup that indicates the checkout is loading. Next the text should change to "redirecting to secure checkout". This text can be customized (Settings > General > Localization).
It looks as follows:

What can I do if the popup does not appear?

There are two main reasons why this happens:

  • Atypical checkout button

  • Conflicting apps

Atypical checkout button

To check your button, right click it and select "Inspect". Check that the button is of one of the following two types:

  • Input

  • Button

Check that the button has:

  • type="submit"

  • name="checkout"

Conflicting apps

To detect a conflicting app, open the console of your browser and type the following line:

window.onbeforeunload = function(event) { debugger; }

Hit enter. This line will stop the browser (on your machine only), before a navigation can occur.
Go back to your cart (don't close the debugger) and click the checkout button.
Now, inspect the call stack to detect which script is redirecting to the checkout. Find out which app is registering that script to understand which app is causing the conflict.
Here's a list of apps we know can cause such conflicts.

Did this answer your question?