I am new to Magento 2 and theming and I'm having trouble overriding a particular template. I am running in developer mode.
I have successfully installed my theme and applied it globally in the admin, using Luma as a parent.
<vender> = SampleStore
<theme> = sampletheme
I can tell it is working because I have added _theme.less
to <vender>/<theme>/web/css/source
and changed the background color of the body to red, which after a cache clear is reflected on the store in my browser.
My issue is when I try to override a template not just a style change my changes are ignored and the parent Luma template is served.
I am trying to add some text after QTY on the product page, just as a test.
I went into vender/magento/
and copied module-catalog and all it's sub folders (as that is where the template for this particular change is) and paste them in my own vendor directory (not inside the <theme>
directory, but right inside <vender>
): <vender>/**module-catalog**
I deleted all the folders I didn't need, leaving me with view/frontend/templates/*all files*
Have I misunderstood where to place this module-catalog
folder, have I missed out a step or something else? Why is my new template ignored and Luma being used?
I am using this guide. Specifically this section:
Template customization walkthrough
To customize or override a template:
- Locate the template which is associated with the page or block you want to change, using template hints in developer tools. For example, these would be located at:
app/design/<vendor_name>/<module_name>/view/frontend/templates/
- Copy the template to your theme folder according to the template storing convention.
- Make the required changes.
setup:static-content:deploy
andcache:flush
command after all ?