This email section is default one from shopify admin.
This is not email pop-up. I have already contacted service team from Vital, where i use email pop-up app and they say it is not related with them. It is true though.
I want to be it like when someone type in their email and subscribe, I want the disocount code to show up.
I have already created discount code for this.
If it is impossible, is there any alternate way to do it?
To show the discount code immediately after someone subscribes using the default Shopify email signup form, you’ll need to customize the form a bit with some code. Here’s a way to do it:
Edit the theme code: Go to your Shopify admin, click on “Online Store,” then “Themes.” Click “Actions” next to your current theme and select “Edit code.”
Find the form: Look for the file that contains your email signup form. It could be in a file like footer.liquid or a section file related to the footer.
Add JavaScript for the discount: You’ll need to add some JavaScript to display the discount code upon form submission. Here’s an example of what the code could look like:
Insert the script: Place this script at the bottom of your form’s file, just before the closing tag or within a script block in the HTML.
Add JavaScript for the discount: You’ll need to add some JavaScript to display the discount code upon form submission. Here’s an example of what the code could look like:
It is not working.
the place where i put is in section> email sign up banner liquid
I do not k now what adjust the selector to match my form mean so i just put h2 which i saw on a youtube.