Jump to content

Unable to update js files - theme.js or other js files


Recommended Posts

Posted (edited)

I'm trying to add additional tags to a button that controls the quantity of products in the cart. Specifically, I want to include "aria-label="Decrease value"". I achieved this by editing the file theme.js located in template/assets/js/theme.js and copied the entire file to my child theme's directory (child-theme/template/assets/js/theme.js). However, the change didn't take effect even after clearing the cache from the Performance tab and ensuring I performed a hard refresh (Ctrl+F5) and checked in an incognito window.

I've encountered a similar issue before when editing a JS file located in the library which was in a minified version, but I believe I handled everything correctly. Initially, I had the "CCC" function enabled in performance, but I disabled it later. I've tried various combinations, and I suspect I might be missing something or there could be some caching mechanism at play, maybe some form of bundling?

Here's the edited snippet:

<button class="'+s.buttondown_class+' bootstrap-touchspin-up" type="button" aria-label="Increase value"> <i class="'+s.verticalupclass+'"></i> <span class="sr-only">Increase value</span> </button> <button class="'+s.buttonup_class+' bootstrap-touchspin-down" type="button" aria-label="Decrease value"> <i class="'+s.verticaldownclass+'"></i><span class="sr-only">Decrease value</span> </button>

Does anyone have insights into what might be causing this issue or if there's something else I should check? Your help would be greatly appreciated!

Edited by kluku (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...