Closed dekzer007 closed 1 year ago
Hi @dekzer007. Thank you for your report. To speed up processing of this issue, make sure that you provided the following information:
Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release
For more details, review the Magento Contributor Assistant documentation.
Add a comment to assign the issue: @magento I am working on this
To learn more about issue processing workflow, refer to the Code Contributions.
Join Magento Community Engineering Slack and ask your questions in #github channel.
:warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
:clock10: You can find the schedule on the Magento Community Calendar page.
:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
Hi @engcom-Bravo. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If the issue has a valid description, the label Issue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid
appears.
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description
label to the issue by yourself.
[ ] 3. Add Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.4-develop
branchDetails
- Add the comment @magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
[ ] 5. Add label Issue: Confirmed
once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
Hi @dekzer007,
Thank you for reporting and collaboration. Verified the issue on Magento 2.4-develop instance and the issue is reproducible.Kindly refer the screenshots.
Steps to reproduce
1.Create 2 websites, 1 store for each website. 2.Create dropdown product attribute (scope : website), Add to an attribute set. 3.Create a simple product a.first store : set the attribute value to empty b.second store : set the attribute value to some value that match the product price rule condition. 4.Create a catalog price rule. Set condition where the dropdown attribute in step 2 match some option value. (in my case is "B") 5.Apply catalog price rules, re-index and flush cache.
As per catalog price rule Discount should be applied for this store, because attribute matching the catalog rule.Discount is not applying.
When we try to set the match value on the first store and set value to empty for the second store.
Discount is applying for both the stores.
Hence Confirming this issue.
Thanks.
:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-7740 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-Bravo. Thank you for verifying the issue.
Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
@magento I am working on this
@magento I am working on this
Hello @dekzer007.
We had a discussion on this flow internally and with PO as well, as per the outcome of the discussion, this is expected behavior and if customers want to cart price rule to be applied only for a specific website, they should set only this specific website as the rule scope.
Thanks
Hello @dekzer007.
We had a discussion on this flow internally and with PO as well, as per the outcome of the discussion, this is expected behavior and if customers want to cart price rule to be applied only for a specific website, they should set only this specific website as the rule scope.
Thanks
Hi @engcom-Hotel
I wanted to follow up on the issue. We have tried your suggestion, but it does not seem to be working correctly 100%.
When we set the USD store to empty (which does not have the discount)
and the DKK store to "B" (which should have the discount)
In database look like this.
the frontend does not show the discount for either store, even though it should show for the DKK store.
We have also tested another scenario, where we set "C" for the USD store (which should not have the discount)
and "B" for the DKK store (which should have the discount)
In database look like this.
In this case, the frontend shows the correct results.
It seems that the issue might be related to the "null" value. Could you please investigate this further? We have suggested to our client to set the default value for the dropdown attribute, which the default value should not have the discount. However, we want to make sure that this issue does not occur again, in case the admin sets the empty value (null) on the dropdown attribute.
Best regards,
The issue lies in
The resulting select for for the $productCollection
in
will always check for the global scope (0
) and the configured default StoreView. So it looks some like this:
SELECT `e`.*,
IF(at_{ATTRIBUTE_CODE}.value_id > 0, at_{ATTRIBUTE_CODE}.value,
at_{ATTRIBUTE_CODE}_default.value) AS `product_of_the_month`
FROM `catalog_product_entity` AS `e`
INNER JOIN `catalog_product_website` AS `product_website`
ON product_website.product_id = e.entity_id AND product_website.website_id IN (8)
LEFT JOIN `catalog_product_entity_int` AS `at_{ATTRIBUTE_CODE}_default`
ON (`at_{ATTRIBUTE_CODE}_default`.`entity_id` = `e`.`entity_id`) AND
(`at_{ATTRIBUTE_CODE}_default`.`attribute_id` = '493') AND
`at_{ATTRIBUTE_CODE}_default`.`store_id` = 0
LEFT JOIN `catalog_product_entity_int` AS `at_{ATTRIBUTE_CODE}`
ON (`at_{ATTRIBUTE_CODE}`.`entity_id` = `e`.`entity_id`) AND
(`at_{ATTRIBUTE_CODE}`.`attribute_id` = '493') AND (`at_{ATTRIBUTE_CODE}`.`store_id` = 1)
WHERE ((e.entity_id IN ((SELECT `ca_product_of_the_month`.`entity_id`
FROM `catalog_product_entity_int` AS `ca_product_of_the_month`
WHERE (ca_product_of_the_month.attribute_id = '493')
AND (ca_product_of_the_month.value IN ('195'))))))
The value of the StoreView specific value is not loaded if it is not coming from
AND (`at_{ATTRIBUTE_CODE}`.`store_id` = 1)
If you save the product itself in the BE it will work, but the indexer will overwrite it based on aforementioned mechanism.
Preconditions and environment
We have 2 websites and each website has 1 store.
USD store set the value to empty.
DKK store set the value to "B".
In database look like this.
USD store frontend reult.
DKK store frontend reult.
DKK store should show the discount price.
Steps to reproduce
Expected result
Frontend price:
Actual result
Frontend price:
Additional information
From many test cases we have done. We think catalog price rule get the first atribute value record without store/website filter.
For example, we try to set the match value on the first store and set value to empty for the second store.
Then frontend show discount for both stores which also unexpected.
Release note
No response
Triage and priority