Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable Products special Price appear for all options #4442

Closed
gayankt opened this issue May 10, 2016 · 14 comments
Closed

Configurable Products special Price appear for all options #4442

gayankt opened this issue May 10, 2016 · 14 comments
Labels
bug report Component: Tax Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@gayankt
Copy link

gayankt commented May 10, 2016

I have added special price only for one simple product of the configurable product.
Other simple products associated with it do not have special prices.
But on fronted special price appears for all options
specialprice

Steps to reproduce

  1. Create a configurable product with different (size) options
  2. assign special price for only one size option (simple product)
  3. View on front end

Expected result

Special Price should appear only for selected (size) option

@antboiko antboiko added the MX label May 10, 2016
@antboiko
Copy link

Hi @gayankt , what Magento version do you use?

Could you please clarify if you have the price A$18 appearing along with "was A$22.00" for all possible configurations (i.e. Blue/L, Pink/L, Orange/S, Orange/M, etc.)?

Thanks,
Anton.

@gayankt
Copy link
Author

gayankt commented May 18, 2016

Special price is added only to one simple product (SKU - WS12-S-Blue)
but it appearing on all other configurations as well

@antboiko
Copy link

Hi @gayankt , I couldn't reproduce this issue on current mainline.

What version do you use?
Let me clarify one more time. do you see A$18 price appearing for any specified pair Color/Size of values? Could you please attach screenshots with few other combinations of values?

Thanks,
Anton.

@christianlakits
Copy link

christianlakits commented Jun 20, 2016

i have the same problem.

the first product has a special price.
bildschirmfoto vom 2016-06-20 09 27 20

the second one has no a special price
bildschirmfoto vom 2016-06-20 09 27 04

i use version 2.0.7

@antboiko
Copy link

@gayankt @christianlakits thanks for reporting. Internal ticket MAGETWO-52925 was created.

@antboiko antboiko added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report and removed Progress: needs update labels Jun 21, 2016
@micheese
Copy link

Same problem here.

Will there be a patch soon?

Thank you very much.

@vkorotun vkorotun removed the CS label Aug 4, 2016
@heldchen
Copy link
Contributor

seeing this as well in 2.1.1

@ktruehl
Copy link

ktruehl commented Sep 1, 2016

Here's a patch that might at least serve temporarily. I tried to figure out how to do this properly, but seriously, can you make these things even more (unnecessarily) complicated? So I put together a hacky patch until Magento gets its act together.

fix-switching-of-old-prices-for-configurable-products-vendor_magento_module-catalog_view_base_web_js_price-box.diff.zip

Note: You will probably have to remove the /www directory prefixes from the paths of the files in the patch.

mmansoor-magento pushed a commit that referenced this issue Sep 13, 2016
mmansoor-magento pushed a commit that referenced this issue Sep 13, 2016
mmansoor-magento pushed a commit that referenced this issue Sep 13, 2016
mmansoor-magento pushed a commit that referenced this issue Sep 13, 2016
mmansoor-magento pushed a commit that referenced this issue Sep 13, 2016
[South] Bugfixes

- MAGETWO-52925 Simple child product without a special price still shown as "was (original price)" #4442 #5097
- MAGETWO-55327 [FT] Filter not applied on current page in test.
- MAGETWO-56584 [FT] Custom options are not created for product in test
- MAGETWO-57535 L2 Plan fails on mainline develop branch- Build B2B-DEV-TPFX3,3 #186
- MAGETWO-56341 Maximum error count when importing because issue URL key for specified store already exists
- MAGETWO-56077 [GitHub] Unable to add more than 1 product to a cart from Wishlist #5282
- MAGETWO-55975 [FT] Cannot set date of birth in customer form
- MAGETWO-56753 [FT] Cannot click on action-select button in customers grid block
- MAGETWO-55782 [FT] Threre is no "schedule update" section in "New Category" form
- MAGETWO-57205 Attribute for Send Welcome Email From shows wrong store ID
@slavvka
Copy link
Member

slavvka commented Sep 13, 2016

The issue has been fixed and delivered to the mainline. It is also ported for 2.0 and 2.1 and will be delivered as a part of nearest patch releases.

@slavvka slavvka closed this as completed Sep 13, 2016
@ktruehl
Copy link

ktruehl commented Sep 13, 2016

I wish it were so.

However, if the product, which determines the initial price shown on the detail page of a configurable product, does not have a special price itself, then my previous patch is still needed. Tested it and it makes logical sense, since the provided commits don't touch the problem handled by my patch.

In addition, the above commits do not completely fix the issue when swatches are used. The file vendor/magento/module-configurable-product/view/frontend/web/js/configurable.js is not loaded then and the method _displayRegularPriceBlock() is therefore of no use. So I ported the method to the Magento_Swatches module:
port_patch_magetwo-52925_to_also_work_for_configurable_swatches-vendor_magento_module-swatches_view_frontend_web_js_swatch-renderer.diff.zip

Furthermore, the old-price container should not have display: none; if the cheapest associated product of the configurable product actually has a special price. So here's another patch taking care of that:
show_old_price_if_different_from_special_price-vendor_magento_module-configurable-product_view_base_templates_product_price_final_price.diff.zip

okorshenko pushed a commit that referenced this issue Dec 14, 2016
…e still shown as "was (original price)" #4442 #5097 - for 2.0
okorshenko pushed a commit that referenced this issue Dec 14, 2016
[South] Bugfixes backports to 2.0.11

- MAGETWO-57000 [Backport] Simple child product without a special price still shown as "was (original price)" #4442 #5097 - for 2.0
- MAGETWO-58058 [Backport] - [GitHub] Unable to add more than 1 product to a cart from Wishlist #5282 - for 2.0
- MAGETWO-57491 [Backport] - Maximum error count when importing because issue URL key for specified store already exists - for 2.0
- MAGETWO-57004 [Backport] - Scope selector on product page does not display all related websites for restricted user - for 2.0
- MAGETWO-58192 [Backport] - [GITHUB] Prices of related products on PDP changes according to product custom options. #4588 - for 2.0
- MAGETWO-57331 [Backport] - Changing Swatch attribute's property doesn't affect storefront - for 2.0
- MAGETWO-56859 [Backport] Attribute for Send Welcome Email From shows wrong store ID - for 2.0
okorshenko pushed a commit that referenced this issue Dec 14, 2016
…e still shown as "was (original price)" #4442 #5097 - for 2.1
okorshenko pushed a commit that referenced this issue Dec 14, 2016
…e still shown as "was (original price)" #4442 #5097 - for 2.1
okorshenko pushed a commit that referenced this issue Dec 14, 2016
[South] Bugfixes backports to 2.1.3
- MAGETWO-56998 [Backport] Simple child product without a special price still shown as "was (original price)" #4442 #5097 - for 2.1
- MAGETWO-58057 [Backport] - [GitHub] Unable to add more than 1 product to a cart from Wishlist #5282 - for 2.1
- MAGETWO-57490 [Backport] - Maximum error count when importing because issue URL key for specified store already exists - for 2.1
- MAGETWO-57044 [Backport] - [GITHUB] Prices of related products on PDP changes according to product custom options. #4588 - for 2.1
- MAGETWO-57204 [Backport] - Attribute for Send Welcome Email From shows wrong store ID - for 2.1
okorshenko pushed a commit that referenced this issue Dec 14, 2016
…e still shown as "was (original price)" #4442 #5097 #6645 - for 2.1
okorshenko pushed a commit that referenced this issue Dec 14, 2016
[South] Bugs 2.1:
- MAGETWO-56998 [Backport] Simple child product without a special price still shown as "was (original price)" #4442 #5097 #6645 - for 2.1
@elenleonova
Copy link

This issue has been delivered to 2.1.3 and 2.0.11 today.

mmansoor-magento pushed a commit that referenced this issue Dec 26, 2016
mmansoor-magento pushed a commit that referenced this issue Dec 26, 2016
mmansoor-magento pushed a commit that referenced this issue Dec 26, 2016
[SOUTH] Bugs:
- MAGETWO-52925 Simple child product without a special price still shown as "was (original price)" #4442 #5097 #6645 - for mainline
- MAGETWO-60098 Configurable product option price is displayed incorrectly per website
- MAGETWO-56793 [GITHUB][PR] Fix Magento\Review\Model\ResourceModel\Rating\Option not instantiable in setup scripts #5465
- MAGETWO-58078 [FT] CreateProductAttributeEntityFromProductPageTest fails
- MAGETWO-61725 [GITHUB] Improve address save flow to allow to use custom validators #7552
@ktruehl
Copy link

ktruehl commented Feb 22, 2017

So. Most of it is fixed in 2.1.4. Except for a teensy little bit:

Select a configuration via the swatches, so that a specific simple product has been uniquely determined, i.e. so that for each attribute a swatch has been selected. Then deselect one of the selected swatches, so that a simple child product is no longer uniquely determined. Et voilà. Javascript error: TypeError: result is undefined (Firefox).

The problem lies in vendor/magento/module-swatches/view/frontend/web/js/swatch-renderer.js on line 714 in the check if (result.oldPrice.amount !== result.finalPrice.amount). If no simple product is uniquely determined result will be undefined. Find attached a patch that solves this problem.

configurable_swatches-dont_explode_on_deselect.diff.zip

@NerminPh
Copy link

Still my configurable products read special price and main price(with the same amount hover I didn't add special price in some of the Childs) when another child products has special price, please advice

@potticus
Copy link

I wish it were so.

However, if the product, which determines the initial price shown on the detail page of a configurable product, does not have a special price itself, then my previous patch is still needed. Tested it and it makes logical sense, since the provided commits don't touch the problem handled by my patch.

In addition, the above commits do not completely fix the issue when swatches are used. The file vendor/magento/module-configurable-product/view/frontend/web/js/configurable.js is not loaded then and the method _displayRegularPriceBlock() is therefore of no use. So I ported the method to the Magento_Swatches module:
port_patch_magetwo-52925_to_also_work_for_configurable_swatches-vendor_magento_module-swatches_view_frontend_web_js_swatch-renderer.diff.zip

Furthermore, the old-price container should not have display: none; if the cheapest associated product of the configurable product actually has a special price. So here's another patch taking care of that:
show_old_price_if_different_from_special_price-vendor_magento_module-configurable-product_view_base_templates_product_price_final_price.diff.zip

These changes, particularly the swatch renderer js code change, stopped all payment gateways from completing the purchase of configurable items that used swatches. It was hard to spot this error until it was reported to us by a customer weeks later. The customer gets sent back to the site with a 'cant place the order' error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Component: Tax Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests