If you don't want to use the automatic button detection for your Shopify store, you can manually add a code snippet to your theme to display the button only where you want it.
Please note: The steps provided are specific to version 1 of the app. If you are currently on version 2, it's not yet possible to manually add the "Have a discount code?" button.
If you are using version 1 of the app, you can manually add a discount code button to your Shopify theme by following these steps:
Step 1: Access the theme code
The first step is to access your theme's code. You can do this by going to your Shopify Admin and clicking on "Sales channels" then "Online Store" and then "Themes." On the theme you want to edit, click the three dots to open a dropdown and click "Edit Code."
Step 2: Locate the Theme File to Edit
The next step is to locate the theme file you want to edit. Usually, it's either cart.liquid or cart-template.liquid. In our example below, we are adding it to the main-cart-footer.liquid.
Step 3: Search for "Checkout" or "Subtotal"
Next, click CTRL + F (CMD + F on Mac) to search for "Checkout" or "Subtotal" in the theme file you want to edit. Ideally, the discount code button should be displayed underneath these sections.
Step 4: Add the "Discount Code" Button Code
Once you have located the appropriate section, add the following code:
<a href='#' data-tbnaction='SHOW_UI' data-tbnadhide='NEVER' style='display:none;'>Have a discount code?</a>
Make sure to add it exactly as shown, including the quotation marks and the semicolon. After adding the code, save the changes.
It's important to note that the discount code button will not work on cart sliders. Also, the "Have a discount code?" tool will only be displayed on the cart page since the checkout page is reserved for Shopify's coupon code box.
Manually adding a discount code button to your Shopify theme can be a great way to have more control over the appearance and functionality of your store. By following these simple steps, you can easily add the button exactly where you want it in your theme.