Open Dhaval410 opened 2 years ago
Hi @Dhaval410. 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-November. 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.
Verified the issue on Magento 2.4-develop branch and the issue is reproducible when condition "Quantity is in stock" is added to the catalog price rule. Catalog Price rule is not getting applied on any of the products in stock. Issue is not reproducible if the condition "Quantity is in stock" is removed from catalog Price Rule. Promo rule is applied as expected.
:white_check_mark: Jira issue https://jira.corp.magento.com/browse/AC-5974 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-November. Thank you for verifying the issue.
Issue Available: @engcom-November, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
Internal team is working on the issue
Preconditions and environment
Steps to reproduce
Go to Stores menu -> select Product in Attributes. And search “quantity_and_stock_status” attribute and edit it.
Open Storefront Properties tab and Select yes for Use for Promo Rule Conditions.
After creating above rule Save And Apply the rule.
Make cache flush / clean and reindex it.
Go to store frontend and open the product which is in stock and check the rule applied or not.
Expected result
Actual result
Additional information
As we found that, magento is uses different way to use for the attribute Quantity (quantity_and_stock_status) as compared to the other attributes.
For the Quantity attribute magento use the after load plugin. Here is the class where that plugin exists. vendor/magento/module-catalog/Model/Product/Attribute/Backend/Stock.php In this class, There is one function afterLoad() on line 44. In this function, they set data in the array form with the is_in_stock and qty key from the stockItem object. And magento uses this data.
But, when we use this Quantity attribute in Rules, Sorting and Search etc. Then, it is not using that array. But, it use the default magento attribute way as same as other attributes. Like, they use the value of the Quantity attribute for the products from the the “_catalog_product_entityint” table. But, in that table for that attribute (attribute code: quantity_and_stock_status and attribute id: 115) there are no records.
For example, I have created one product, but for the "quantity_and_stock_status" attribute, there is no record in the table as in the above image.
It bit strange that when we use sample data and the API for the products import, then it insert the records in the “_catalog_product_entityint” table for Quantity attribute. But when we create manually then it doesn't insert the records in that table.
Release note
No response
Triage and priority