Custom theme using Magento 2.2.1 in developer mode, inheriting from the Magento/blank
theme.
When selecting an item from a sizing dropdown on a product page, created using a configurable product, an element appears, which I believe is the 'tier price'.
The element in question is<div class="price-box price-tier_price" data-role="priceBox"></div>
.
I have tried adding <referenceBlock name="price-tier_price" remove="true" />
and <referenceBlock name="price-box" remove="true" />
to default.xml, but neither have worked.
Please can someone advise me how to hide this element?
Thanks.
EDIT:
Found this link.
Looks like this might be the root of the problem, which is marked 'Done' ready for Magento 2.3.
Best Answer
Did a little reading up on Khoa TruongDinh's answer and discovered this issue posted on Magento's github:
Looks like this is a known bug that has been fixed for v2.3.
I've managed to work around the bug in my custom theme using three different methods.
Method One:
Added the line
to
and it seems to be working.
Method Two:
First, I copied the file
to
.
Then, I removed the following code from the new file:
Method 3 (from Khoa TruongDinh's answer):
See how tier price is rendered:
Configurable product JS comes from here:
Create
requirejs-config.js
file here:Create the following mixin inside the file
requirejs-config.js
:Then create
configurable-mixin.js
here:configurable-mixin.js
should contain the following code:Method 4 (from goodlook's answer):
Copy the file
to
and remove the following line: