i want so when i press this button it takes the user down in a quick motion to the cta dynamic button
Hello @shop22dash !
We can easily solve this issue by using a simple event listener and the scrollTo() method. Please refer to the steps below to achieve this end-to-end.
- Open the Code Editor for the theme where you would like to apply the modifications as directed in the screenshot below.
- Let’s create a new snippet to add these modifications. We suggest using a snippet so you can easily add or remove it as needed. The screenshot below shows how to create a new snippet.
- Now, inside this file, paste in the code below:
Note: You would need to update the ids, or selectors for your store’s buttons/elements. In the example code shared above, the targetButton is the element I am taking the user to when the redirectButton is clicked.
- Finally, let’s render this file inside your theme layout file just before the closing tag. Screenshot below for reference.
Once saved, let’s go to the storefront. This is what it should now behave like:

If my response helped you, please consider giving it a like (
) and marking it as an accepted solution if it resolved your issue. Your feedback helps other community members with similar questions.
Thank you!
Regards,
Aaryan from Swym
Hey @shop22dash
What @swym gave is actually a really good solution. Once you add this it should implement the button.
Let me know if I can help you in any way.
Best,
KaalTechGeeks


