1

I'm new to Magento 2 and still trying to get my head around the folder hierarchy.

If I want a file from my theme to replace a file in a module I am doing the following.

  1. For css, original file that I want to override is here.

    vendor\supplier\module-search-autocomplete\src\SearchAutocomplete\view\frontend\web\css\source\module_cssfile.less

I have copied it to the below location for edit.

app\design\frontend\themesupplier\my_theme\module-search-autocomplete\src\SearchAutocomplete\view\frontend\web\css\source\module\_cssfile.less
  1. php file.

Original is:-

src\vendor\supplier\module-search-autocomplete\src\SearchAutocomplete\Index\Magento\Catalog\Product.php

Copied to:-

app\design\frontend\themesupplier\my_theme\module-search-autocomplete\src\SearchAutocomplete\Index\Magento\Catalog\Product.php

Where did I go wrong ?

I am flushing the cache and also have tried client side compile mode, but changes do not show up.

Clearly I have got the pathing wrong for the copied file, but where ?

  • If it's 3rd party module, why don't you modify the file directly? – PY Yick Nov 1 '17 at 3:00
  • I think the Design section does not contains the .php file – Abhishek Tripathi Nov 1 '17 at 3:35

Your Answer

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

Browse other questions tagged or ask your own question.