I want to remove Price block from specific product. I tried to updated Layout Update XML but it is not working
I have tried this <referenceBlock name="product.info.price" remove="true"/>
but it do not work.
I read some where it will only accept the <referenceContainer>...
not <referenceBlock name="block.name" remove="true"/>
So I tried
<container name="trash.bin" htmlTag="div" />
<move element="product.info.price" destination="trash.bin" />
<referenceContainer name="trash.bin" remove="true" />
this did not work either.Any solution?
Best Answer
I tested it on the Magento CE 2.1.7 and the layout update works fine. I've added the layout for the custom product (by its id)
app/code/Vendor/Module/view/frontend/layout/catalog_product_view_id_2049.xml
with the lines:Here is product view page before the changes (having price block with a value 100$):
After implementing the changes there is no price block at this place:
PS: tested on the Magento blank theme.