Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Check for bundle selection scoped price per website #239

Merged

Conversation

rain2o
Copy link
Contributor

@rain2o rain2o commented Mar 17, 2020

This is an anticipatory fix to account for a Magento 2 bug fix that is currently being reviewed. See magento/magento2#27315.

The original issue with Magento was that when you set the configuration of Price Scope to be "WEBSITE", the bundle option item prices are not saved properly per website. Once the linked PR is approved and merged, this PR will account for the scoped prices when indexing the bundle products.

As a note, this modification shouldn't make any difference before the Magento bug is fixed, as it performs a check to see if there are any scoped prices and falls back to the global price if not. With that said, if you want to test and merge this before the Magento PR, it should mean this module will be compatible with the update if/when it goes through.

For reference, I took the code from source/vendor/magento/module-bundle/Model/ResourceModel/Selection/Collection.php::joinPrices() to use the same logic Magento core uses when pulling Bundle products with prices.

@afirlejczyk
Copy link
Contributor

Hi @rain2o
I left small remarks.

@afirlejczyk afirlejczyk changed the base branch from develop to master April 24, 2020 20:02
@afirlejczyk afirlejczyk marked this pull request as ready for review June 19, 2020 20:46
@rain2o
Copy link
Contributor Author

rain2o commented Aug 21, 2020

@afirlejczyk Updated from your remarks.

@afirlejczyk afirlejczyk merged commit f97826e into vuestorefront:master Sep 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants