Refresh theme problem

Refresh theme problem

johnny0137
Visitor
2 0 0

Hello!

 

I have a problem with my refresh theme (version 15.0.1).

 

When i switch variant for my product, page scrolls up automatically. This is very annoying, especially when using ''sticky add to cart'' button. Can someone help me with this?

Replies 5 (5)

rajimulislamjoy
Shopify Partner
348 36 61

@johnny0137  

Hi! The issue you're experiencing is likely due to a JavaScript conflict in the theme. You can fix this by updating the theme's JavaScript to prevent the page from scrolling when switching variants. If you're comfortable with code, you can look into the theme's theme.js file and check the variant change function.

Please don't forget to Like & Mark Solution to the post that helped you. Thanks!
If you'd like to support me, you can Buy Me a Coffee
Need a Shopify Designer or Dropshipping Expert ?
Hire us at WhatsApp! For Shopify Design | Shopify Customize | Dropshipping
johnny0137
Visitor
2 0 0

Where is this folder located and what should i change there? Thanks in advance!

rajimulislamjoy
Shopify Partner
348 36 61

 

  • Go to Shopify Admin:

    • Navigate to Online Store > Themes.
    • Click Actions > Edit code.
  • Locate the File:

    • In the Assets folder, find and open theme.js (or similar, like global.js).
  • Fix the Issue:

    • Look for JavaScript handling variant changes and check for scroll commands like window.scrollTo(). Modify or remove this code as needed.
  • Save and Test

 

Please don't forget to Like & Mark Solution to the post that helped you. Thanks!
If you'd like to support me, you can Buy Me a Coffee
Need a Shopify Designer or Dropshipping Expert ?
Hire us at WhatsApp! For Shopify Design | Shopify Customize | Dropshipping

ashalice
New Member
4 0 0
This issue may be due to JavaScript behavior in your theme when switching variants. Try updating the theme to the latest version or check for settings that control scrolling. If the problem persists consider modifying the theme code

sakeden
Visitor
1 0 0

Thank you for also solving my problem.