Hello @devhelp37, thank you for your report.
We've acknowledged the issue and added to our backlog.
Is there any update on this @engcom-backlog-nickolas ? We are experiencing this issue on a current M2C 2.2.3 build and need it solved before launch.
Hello @PaulWMF, as configurable product price depends on price of it's children and configurable itself has no own price, it should not have it's own special price too.
So, currently there is a bug when you converting simple product with special price to configurable, Special price remains on configurable product, which leads to confusion on category page, where you see configurable special price instead of option price and on PDP, where you can see both: configurable special price and option price. Which, for instance, never happen in case you create configurable product from the beginning without conversion.
Therefore, when it will be fixed, there will be no ability to see both: special and option price on category page in vanilla magento. And it's correct behaviour.
If You want to see both prices on category page with configurable product, it would be better to implement custom solution, or try to find some 3d-party extensions which may provide such functionality.
Best regards!
@engcom-backlog-nickolas we fixed this by:
Overriding vendor/magento/module-configurable-product/view/base/templates/product/price/final_price.phtml
From:
<?php if (!$block->isProductList() && $block->hasSpecialPrice()): ?>
To:
<?php if ($block->hasSpecialPrice()): ?>
From:
<span class="old-price sly-old-price no-display">
<?php /* @escapeNotVerified */ echo $block->renderAmount($priceModel->getAmount(), [
'display_label' => __('Regular Price'),
'price_id' => $block->getPriceId('old-price-' . $idSuffix),
'price_type' => 'oldPrice',
'include_container' => true,
'skip_adjustments' => true
]); ?>
</span>
To:
<span class="old-price">
<?php /* @escapeNotVerified */ echo $block->renderAmount($priceModel->getAmount(), [
'display_label' => __('Regular Price'),
'price_id' => $block->getPriceId('old-price-' . $idSuffix),
'price_type' => 'oldPrice',
'include_container' => true,
'skip_adjustments' => true
]); ?>
</span>
@engcom-backlog-nickolas Can you please explain, why do we have to keep using third party extensions for every basic thing, if this is the case, better leave magento as is and tell people it all depends now on third party extensions to complete everything you need in magento. Also issue relating the special pricing in configurable products is important if you have Google product feed extension as special pricing has been set in the product feed extension to display that pricing in google.
@engcom-backlog-nickolas we fixed this by:
Overriding
vendor/magento/module-configurable-product/view/base/templates/product/price/final_price.phtml
- Removed the condition to check is product isn't in a list
From:
<?php if (!$block->isProductList() && $block->hasSpecialPrice()): ?>
To:
<?php if ($block->hasSpecialPrice()): ?>
- Removed 'no-display' class from regular price span
From:
<span class="old-price sly-old-price no-display"> <?php /* @escapeNotVerified */ echo $block->renderAmount($priceModel->getAmount(), [ 'display_label' => __('Regular Price'), 'price_id' => $block->getPriceId('old-price-' . $idSuffix), 'price_type' => 'oldPrice', 'include_container' => true, 'skip_adjustments' => true ]); ?> </span>
To:
<span class="old-price"> <?php /* @escapeNotVerified */ echo $block->renderAmount($priceModel->getAmount(), [ 'display_label' => __('Regular Price'), 'price_id' => $block->getPriceId('old-price-' . $idSuffix), 'price_type' => 'oldPrice', 'include_container' => true, 'skip_adjustments' => true ]); ?> </span>
After doing this, old and special prices are shown but on changing the attributes like size or color the price doesn't update.
How to do that?
@engcom-backlog-nickolas we fixed this by:
Overridingvendor/magento/module-configurable-product/view/base/templates/product/price/final_price.phtml
- Removed the condition to check is product isn't in a list
From:
<?php if (!$block->isProductList() && $block->hasSpecialPrice()): ?>
To:
<?php if ($block->hasSpecialPrice()): ?>
- Removed 'no-display' class from regular price span
From:
<span class="old-price sly-old-price no-display"> <?php /* @escapeNotVerified */ echo $block->renderAmount($priceModel->getAmount(), [ 'display_label' => __('Regular Price'), 'price_id' => $block->getPriceId('old-price-' . $idSuffix), 'price_type' => 'oldPrice', 'include_container' => true, 'skip_adjustments' => true ]); ?> </span>
To:
<span class="old-price"> <?php /* @escapeNotVerified */ echo $block->renderAmount($priceModel->getAmount(), [ 'display_label' => __('Regular Price'), 'price_id' => $block->getPriceId('old-price-' . $idSuffix), 'price_type' => 'oldPrice', 'include_container' => true, 'skip_adjustments' => true ]); ?> </span>
After doing this, old and special prices are shown but on changing the attributes like size or color the price doesn't update.
How to do that?
Did you find a solution?
Yes I had found the solution.
I had managed this by overriding the template in active theme.
app\design\frontend\
/**
will this get fixed?
product with special price to configurable, Special price remains on configurable product, which leads to confusion on category page, where you see configurable special price instead of option price and on PDP, where you can see both: configurable special price and option price. Which, for instance, never happen in case you create configurable product from the beginning without conversion.
Therefore, when it will be fixed, there will be no ability to see both: special and option price on category page in vanilla magento. And it's correct behaviour.
If You want to see both prices on category page with configurable product, it would be better to implement custom solution, or try to find some 3d-party extensions which may provide such functionality.Best regards!
Again so many Extensions! Surely this is a basic function! Configurative doesn't mean a price difference! In my case none of my products have a price difference but I want to show they are below RRP!!!!! come on! Frustrating!
@052b-dev thank you for joining. Please accept team invitation here and self-assign the issue.
Hello @devhelp37
Thank you for contribution and collaboration!
We are not able to reproduce this issue on the lates 2.3-develop
branch by provided steps.
We are closing this issue due to _branch 2.2-develop
was closed and Magento no longer accepts pull requests and issues to the v2.2 release lines to focus all development efforts on v2.3._
See Accepted pull requests and ported code for more details
If you still faced this issue on 2.3
please create a new Issue with all required details according to Issue reporting guidelines
@engcom-Charlie
This bug is 100% reproducible on 2.3.2, 2.3.3, and 2.3.3-p1:
When you have a special price set on a configurable with size variables (so all the simples are the same price), the PDP for the configurable does NOT show that there is a sale price until you select a configurable option.
Not only is it reproducible, but @052b-dev fixed this bug for you.
Read the commit up the thread a little bit here: https://github.com/magento/magento2/issues/15043#ref-commit-b7b4b23
I just applied that bug fix to my m2 repo and it fixed the bug- a configurable with a special price for sizes now shows the sale price before I select a configurable option/size. Here's the PDP working as intended, after applying 052b-dev's fix:
Please re-open this ticket and accept the commit that was made to fix this:
https://github.com/magento/magento2/issues/15043#ref-commit-b7b4b23
we fixed this by:
Overriding
vendor/magento/module-configurable-product/view/base/templates/product/price/final_price.phtml
- Removed the condition to check is product isn't in a list
I believe this has a huge performance impact,
\Magento\ConfigurableProduct\Pricing\Render\FinalPriceBox::hasSpecialPrice
loops through all simple products - there is a reason this is not being done on the product list.
The best solution we found so far is this approach: https://magento.stackexchange.com/a/322012/81
Most helpful comment
@engcom-backlog-nickolas Can you please explain, why do we have to keep using third party extensions for every basic thing, if this is the case, better leave magento as is and tell people it all depends now on third party extensions to complete everything you need in magento. Also issue relating the special pricing in configurable products is important if you have Google product feed extension as special pricing has been set in the product feed extension to display that pricing in google.