Can't remove layout blocks. (Magento 2) The 2019 Stack Overflow Developer Survey Results Are InHow can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlAfter assign custom home page layout getting blank page in Magento2main.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Layout blocks inside blocksMagento 2 overrides not showingMoving elements in current theme/layoutMagento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom Options
What is the steepest angle that a canal can be traversable without locks?
What are my rights when I have a Sparpreis ticket but can't board an overcrowded train?
Patience, young "Padovan"
Is "plugging out" electronic devices an American expression?
Why isn't airport relocation done gradually?
Access elements in std::string where positon of string is greater than its size
A poker game description that does not feel gimmicky
Does duplicating a spell with Wish count as casting that spell?
Why do UK politicians seemingly ignore opinion polls on Brexit?
Where does the "burst of radiance" from Holy Weapon originate?
How to answer pointed "are you quitting" questioning when I don't want them to suspect
Does light intensity oscillate really fast since it is a wave?
Idiomatic way to prevent slicing?
Output the Arecibo Message
Spanish for "widget"
Why is my p-value correlated to difference between means in two sample tests?
"Riffle" two strings
Why is it "Tumoren" and not "Tumore"?
What is the best strategy for white in this position?
Is this food a bread or a loaf?
Landlord wants to switch my lease to a "Land contract" to "get back at the city"
CiviEvent: Public link for events of a specific type
Inline version of a function returns different value than non-inline version
Does it makes sense to buy a new cycle to learn riding?
Can't remove layout blocks. (Magento 2)
The 2019 Stack Overflow Developer Survey Results Are InHow can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlAfter assign custom home page layout getting blank page in Magento2main.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Layout blocks inside blocksMagento 2 overrides not showingMoving elements in current theme/layoutMagento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom Options
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
Information: I'm using Magento 2.1 on CentOS Linux, my theme is a child of the built-in Luma theme.
When the theme I made is active, I want some blocks to be removed. Let's say I want to remove the SKU number from the product page.
What I do is:
In my theme folder, I add a file called
Magento_Catalog/layout/catalog_product_view.xml
, with the following content<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="product.info.sku" remove="true" />
</body>
</page>I change the
version
incomposer.json
from100.x.0
to100.(x+1).0
(so for example if the current version is100.2.0
I change it to100.3.0
). To be honest, don't really know if this is necessary.I delete the
<theme-name>
folders frompub/static/frontend/<theme-vendor>
andvar/view_preprocessed/css/frontend/<theme-vendor>
.I run the following commands from the Magento root:
sudo php bin/magento cache:clean
sudo chown -R <user-of-Magento>:<group-of-that-user> *
sudo php bin/magento setup:static-content:deploy nl_NL en_US
sudo chown -R <user-of-Magento>:<group-of-that-user> *
But the block is still there! Unchanged. I tried other blocks, like the add to cart button, but also without success.
What should I do? Thanks in advance.
magento2 layout blocks xml magento-2.1
add a comment |
Information: I'm using Magento 2.1 on CentOS Linux, my theme is a child of the built-in Luma theme.
When the theme I made is active, I want some blocks to be removed. Let's say I want to remove the SKU number from the product page.
What I do is:
In my theme folder, I add a file called
Magento_Catalog/layout/catalog_product_view.xml
, with the following content<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="product.info.sku" remove="true" />
</body>
</page>I change the
version
incomposer.json
from100.x.0
to100.(x+1).0
(so for example if the current version is100.2.0
I change it to100.3.0
). To be honest, don't really know if this is necessary.I delete the
<theme-name>
folders frompub/static/frontend/<theme-vendor>
andvar/view_preprocessed/css/frontend/<theme-vendor>
.I run the following commands from the Magento root:
sudo php bin/magento cache:clean
sudo chown -R <user-of-Magento>:<group-of-that-user> *
sudo php bin/magento setup:static-content:deploy nl_NL en_US
sudo chown -R <user-of-Magento>:<group-of-that-user> *
But the block is still there! Unchanged. I tried other blocks, like the add to cart button, but also without success.
What should I do? Thanks in advance.
magento2 layout blocks xml magento-2.1
add a comment |
Information: I'm using Magento 2.1 on CentOS Linux, my theme is a child of the built-in Luma theme.
When the theme I made is active, I want some blocks to be removed. Let's say I want to remove the SKU number from the product page.
What I do is:
In my theme folder, I add a file called
Magento_Catalog/layout/catalog_product_view.xml
, with the following content<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="product.info.sku" remove="true" />
</body>
</page>I change the
version
incomposer.json
from100.x.0
to100.(x+1).0
(so for example if the current version is100.2.0
I change it to100.3.0
). To be honest, don't really know if this is necessary.I delete the
<theme-name>
folders frompub/static/frontend/<theme-vendor>
andvar/view_preprocessed/css/frontend/<theme-vendor>
.I run the following commands from the Magento root:
sudo php bin/magento cache:clean
sudo chown -R <user-of-Magento>:<group-of-that-user> *
sudo php bin/magento setup:static-content:deploy nl_NL en_US
sudo chown -R <user-of-Magento>:<group-of-that-user> *
But the block is still there! Unchanged. I tried other blocks, like the add to cart button, but also without success.
What should I do? Thanks in advance.
magento2 layout blocks xml magento-2.1
Information: I'm using Magento 2.1 on CentOS Linux, my theme is a child of the built-in Luma theme.
When the theme I made is active, I want some blocks to be removed. Let's say I want to remove the SKU number from the product page.
What I do is:
In my theme folder, I add a file called
Magento_Catalog/layout/catalog_product_view.xml
, with the following content<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="product.info.sku" remove="true" />
</body>
</page>I change the
version
incomposer.json
from100.x.0
to100.(x+1).0
(so for example if the current version is100.2.0
I change it to100.3.0
). To be honest, don't really know if this is necessary.I delete the
<theme-name>
folders frompub/static/frontend/<theme-vendor>
andvar/view_preprocessed/css/frontend/<theme-vendor>
.I run the following commands from the Magento root:
sudo php bin/magento cache:clean
sudo chown -R <user-of-Magento>:<group-of-that-user> *
sudo php bin/magento setup:static-content:deploy nl_NL en_US
sudo chown -R <user-of-Magento>:<group-of-that-user> *
But the block is still there! Unchanged. I tried other blocks, like the add to cart button, but also without success.
What should I do? Thanks in advance.
magento2 layout blocks xml magento-2.1
magento2 layout blocks xml magento-2.1
edited Sep 14 '17 at 5:05
Prince Patel
14.5k65481
14.5k65481
asked Sep 14 '16 at 12:36
KevinKevin
159110
159110
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
Try following code
<referenceContainer name="content">
<referenceBlock name="product.info.sku" display="false" />
</referenceContainer>
Thanks, but still nothing. :(
– Kevin
Sep 14 '16 at 13:05
add a comment |
Delete the var directory and then run bin/magento setup:di:compile
add a comment |
Your name of that block is wrong :)
You should use this correct name:
<referenceBlock name="product.info.stock.sku" remove="true"/>
Then run:
php bin/magento setup:upgrade && php bin/magento cache:flush
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f136305%2fcant-remove-layout-blocks-magento-2%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try following code
<referenceContainer name="content">
<referenceBlock name="product.info.sku" display="false" />
</referenceContainer>
Thanks, but still nothing. :(
– Kevin
Sep 14 '16 at 13:05
add a comment |
Try following code
<referenceContainer name="content">
<referenceBlock name="product.info.sku" display="false" />
</referenceContainer>
Thanks, but still nothing. :(
– Kevin
Sep 14 '16 at 13:05
add a comment |
Try following code
<referenceContainer name="content">
<referenceBlock name="product.info.sku" display="false" />
</referenceContainer>
Try following code
<referenceContainer name="content">
<referenceBlock name="product.info.sku" display="false" />
</referenceContainer>
answered Sep 14 '16 at 12:41
Kaushal SutharKaushal Suthar
1,75211235
1,75211235
Thanks, but still nothing. :(
– Kevin
Sep 14 '16 at 13:05
add a comment |
Thanks, but still nothing. :(
– Kevin
Sep 14 '16 at 13:05
Thanks, but still nothing. :(
– Kevin
Sep 14 '16 at 13:05
Thanks, but still nothing. :(
– Kevin
Sep 14 '16 at 13:05
add a comment |
Delete the var directory and then run bin/magento setup:di:compile
add a comment |
Delete the var directory and then run bin/magento setup:di:compile
add a comment |
Delete the var directory and then run bin/magento setup:di:compile
Delete the var directory and then run bin/magento setup:di:compile
answered Sep 15 '16 at 1:31
Shawn AbramsonShawn Abramson
2,4971915
2,4971915
add a comment |
add a comment |
Your name of that block is wrong :)
You should use this correct name:
<referenceBlock name="product.info.stock.sku" remove="true"/>
Then run:
php bin/magento setup:upgrade && php bin/magento cache:flush
add a comment |
Your name of that block is wrong :)
You should use this correct name:
<referenceBlock name="product.info.stock.sku" remove="true"/>
Then run:
php bin/magento setup:upgrade && php bin/magento cache:flush
add a comment |
Your name of that block is wrong :)
You should use this correct name:
<referenceBlock name="product.info.stock.sku" remove="true"/>
Then run:
php bin/magento setup:upgrade && php bin/magento cache:flush
Your name of that block is wrong :)
You should use this correct name:
<referenceBlock name="product.info.stock.sku" remove="true"/>
Then run:
php bin/magento setup:upgrade && php bin/magento cache:flush
answered Sep 15 '16 at 9:49
David NguyenDavid Nguyen
1819
1819
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f136305%2fcant-remove-layout-blocks-magento-2%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown