0

I want to override file from module. vendor/mageworx/module-storelocator/view/frontend/web/js/locations-modal.js

I create file app/design/frontend/Mgs/claue_child/MageWorx_StoreLocator/web/js/locations-modal.js

That wont work for me so i add file app/design/frontend/Mgs/claue_child/MageWorx_StoreLocator/web/js/requirejs-config.js

    map: {
        '*': {
            'locations-modal': 'js/locations-modal.js',
        }
    }
};

I try move require-config.js in serveral locations still not working.

orginal requirejs config vendor/mageworx/module-storelocator/view/frontend/requirejs-config.js

    map: {
        '*': {
            'locations-modal': 'MageWorx_StoreLocator/js/locations-modal',
1

requirejs-config.js no need to override this but still if you want override path should be this

app/design/frontend/Mgs/claue_child/MageWorx_StoreLocator/requirejs-config.js

map: {
        '*': {
            'locations-modal': 'MageWorx_StoreLocator/js/locations-modal',
    }
    }

Just Need to upgrade/deploy and check

5
  • this is not working i did c:c c:f static content deploy. Feb 27 at 11:55
  • Did You Do Upgrade? Feb 27 at 11:59
  • No, don`t think so. Any additional command ? Feb 27 at 12:12
  • This is required command php bin/magento setup:upgrade,php bin/magento setup:static-content:deploy -f after check Feb 27 at 12:14
  • 1
    Worked. It seams i did that config You say before(had different history configs) just not to give setup:upgrade thx Feb 27 at 12:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.