0

I want to extend the customer account creation template (register.phtml) of the Luma theme. I copied the register.phtml to my custom theme directory:

\app\design\frontend\my\theme\module-customer\view\frontend\templates\

and modified it. After flushing the cache and refreshing the browser I can't see my changes.

What is wrong?

Is it always necessary to copy the template in a custom theme folder or is it also possible to copy it to the view folder of my custom module?

Thanks.

Marco

  • app\design\frontend\vendor\theme_name\Magento_Customer\templates – Mage Solution Dec 23 '15 at 10:17
  • Try deleting the cache manually from var/cache and delete all folders, it might help. – Fayyaz Khattak Dec 23 '15 at 10:32
1

Solution: I tried the hints, but they didn't solve the problem. After searching for a while I figured out the following path which is working:

app/design/frontend/my/theme/Magento_Customer/templates/form

| improve this answer | |
0

your current path of template file is worng

\app\design\frontend\my\theme\module-customer\view\frontend\templates\

the correct path will be

\app\design\frontend\my\theme\module-customer\templates\
| improve this answer | |
  • I changed the path, but there is no effect! – ClassMP Dec 23 '15 at 10:07
  • disabled the cache then check – Qaisar Satti Dec 23 '15 at 10:11
0

Copy the layout file to your theme.

Copy the customer account creation layout XML file from below location

/vendor/magento/module-customer/view/frontend/layout/customer_account_create.xml

to your theme that you’re editing

/app/design/frontend/<Vendor>/<Theme>/Magento_Customer/layout/customer_account_create.xml

If the template folder does not exists then create a template folder in the given path

/app/design/frontend/<Vendor>/<Theme>/Magento_Customer/templates/form/register.phtml

replace the below line of code of layout file (which one is copy from core magneto)

<block class="Magento\Customer\Block\Form\Register" name="customer_form_register" template="form/register.phtml">

to

<block class="Magento\Customer\Block\Form\Register" name="customer_form_register" template="Magento_Customer::/form/register.phtml">

Copy the html code from below location and paste into register.phtml (which one is created in theme directory)

vendor/magento/module-customer/view/frontend/templates/form
| improve this answer | |

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.