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 Answer 1

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. Commented Feb 27, 2021 at 11:55
  • Did You Do Upgrade? Commented Feb 27, 2021 at 11:59
  • No, don`t think so. Any additional command ? Commented Feb 27, 2021 at 12:12
  • This is required command php bin/magento setup:upgrade,php bin/magento setup:static-content:deploy -f after check Commented Feb 27, 2021 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 Commented Feb 27, 2021 at 12:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.