cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove "Address: Line 1" and Country on the form of the purchase tunnel ?

How to remove "Address: Line 1" and Country on the form of the purchase tunnel ?

14 REPLIES 14

Re: How to remove "Address: Line 1" and Country on the form of the purchase tunnel ?

Hi @thomas_rolland 

 

Please share the link of screenshot as this image is visible once approved by moderator.

 

Thanks!

Re: How to remove "Address: Line 1" and Country on the form of the purchase tunnel ?

Hello @thomas_rolland 

Check out this thread issue comment

https://github.com/magento/magento2/issues/13675#issuecomment-366188920

 

Was my answer helpful? You can accept it as a solution.
175+ Professional Extensions for M1 & M2
Need a developer?Just visit Contact Us Now

Re: How to remove "Address: Line 1" and Country on the form of the purchase tunnel ?

Hi @thomas_rolland 

 

You can override "/var/www/html/magento232/vendor/magento/module-customer/view/frontend/templates/form/register.phtml" this file in your module or in your theme and remove the fields which you don't want.

 

Thanks.

Re: How to remove "Address: Line 1" and Country on the form of the purchase tunnel ?

hi @Rahul Gupta 

 

I selected Luma theme and Blank theme, then edited the file:

/var/www/html/magento232/vendor/magento/module-customer/view/frontend/templates/form/register.phtml

 

but it does not change anything, I even deleted it completely and the form is always present !

 

hi @theMageComp 

I am not concerned by this problem (https://github.com/magento/magento2/issues/13675). The number of lines is good.

Re: How to remove "Address: Line 1" and Country on the form of the purchase tunnel ?

Hi @thomas_rolland 

 

You have to override this file in your custom theme and then have to run the following commands.

 

php bin/magento setup:static-content:delpoy
php bin/magento cache:flush

Thanks

Re: How to remove "Address: Line 1" and Country on the form of the purchase tunnel ?

On theme there is no overload :

 

Sans titre.png

 

I did several times:

 

php bin/magento setup:upgrade
php bin/magento cache:flush
php bin/magento setup:static-content:deploy fr_FR
php bin/magento indexer:reindex
php bin/magento setup:di:compile

And :

 

php bin/magento cache:clean
rm -r pub/static/*

But there is no change.

 

Re: How to remove "Address: Line 1" and Country on the form of the purchase tunnel ?

Hi @thomas_rolland 

 

Check in another browser where you have't open this website.

 

Thanks!

Re: How to remove "Address: Line 1" and Country on the form of the purchase tunnel ?

Hi@Rahul Gupta 

 

I just understood why editing the file:

/var/www/html/*********/vendor/magento/module-customer/view/frontend/templates/form/register.phtml does not work.

 

This file acts on the form of the page https://www.*********.fr/customer/account/create/

And I want to change the form of the page https://www.*********.fr/checkout/#shipping

Re: How to remove "Address: Line 1" and Country on the form of the purchase tunnel ?

I just found the solution to remove the country. I modified the file /vendor/magento/module-checkout/view/frontend/layout/checkout_index_index.xml

 

Insert :

 

<item name="config" xsi:type="array">
<item name="visible" xsi:type="boolean">false</item>

Line 226  :

...

<item name="country_id" xsi:type="array">
<item name="config" xsi:type="array">
<item name="visible" xsi:type="boolean">false</item>
</item>
</item>

...

 Now I have to find how to remove "Address: Line 1"