Catalog Price Rule Sets Catalog_product_index_price Min Price To 0 For Bundle Products With Dynamic Pricing

by ADMIN 108 views

Introduction

In Magento 2.4.8, a critical issue has been identified in the catalog price rule functionality. When a catalog price rule is applied to a bundle product with dynamic pricing enabled, the catalog_product_index_price table is updated with a minimum price of 0 for the parent bundle product. This is incorrect, as the minimum price should be the cheapest possible combination of the required bundle options. In this article, we will delve into the preconditions and environment, steps to reproduce the issue, expected and actual results, and provide additional information.

Preconditions and Environment

Magento Version

The issue is specific to Magento 2.4.8.

Steps to Reproduce


To reproduce the issue, follow these steps:

  1. Create a Catalog Price Rule: Go to Stores > Configuration > Catalog > Price Rules and create a new catalog price rule. Set the rule to apply to a specific website and customer group.
  2. Save and Apply the Rule: Save the rule and apply it to the catalog.
  3. Ensure Indexers are Current: Run the indexers to ensure that the catalog data is up-to-date.
  4. Query the Database: Run a query on the catalog_product_index_price table to retrieve the minimum price for a parent bundle product with dynamic pricing enabled.
  5. Observe the Results: Observe the results for the selected websites and customer groups. The minimum price should not be set to 0.

Expected Result

The expected result is that the minimum price for the parent bundle product should be the cheapest possible combination of the required bundle options.

Actual Result

The actual result is that the minimum price is set to 0.

Additional Information

No additional information is available at this time.

Release Note

No release note is available for this issue.

Triage and Priority

The severity of this issue is S0, as it affects critical data or functionality and leaves users without a workaround.

Severity Levels

  • S0: Affects critical data or functionality and leaves users without a workaround.
  • S1: Affects critical data or functionality and forces users to employ a workaround.
  • S2: Affects non-critical data or functionality and forces users to employ a workaround.
  • S3: Affects non-critical data or functionality and does not force users to employ a workaround.
  • S4: Affects aesthetics, professional look and feel, “quality” or “usability”.

Conclusion

In conclusion, the catalog price rule sets the catalog_product_index_price minimum price to 0 for bundle products with dynamic pricing enabled. This is incorrect and affects critical data or functionality, leaving users without a workaround. The severity of this issue is S0, and it requires immediate attention to resolve.

Recommendations

To resolve this issue, we recommend the following:

  1. Update the Catalog Price Rule: Update the catalog price rule to exclude bundle products with dynamic pricing enabled.
  2. Run Indexers: Run the indexers to update the catalog data.
  3. Verify the Results: Verify that the minimum price for the parent bundle product is set correctly.

By following these recommendations, you can resolve the issue and ensure that the catalog price rule functionality works as expected.

Future Development

In future development, we recommend the following:

  1. Improve the Catalog Price Rule: Improve the catalog price rule functionality to exclude bundle products with dynamic pricing enabled by default.
  2. Add a Warning: Add a warning to the catalog price rule configuration to alert users that the rule may not work correctly for bundle products with dynamic pricing enabled.
  3. Provide a Workaround: Provide a workaround for users who need to apply the catalog price rule to bundle products with dynamic pricing enabled.

Introduction

In our previous article, we discussed the issue with the catalog price rule setting the catalog_product_index_price minimum price to 0 for bundle products with dynamic pricing enabled. In this article, we will provide a Q&A section to address common questions and concerns related to this issue.

Q: What is the cause of this issue?

A: The cause of this issue is a bug in the catalog price rule functionality in Magento 2.4.8. When a catalog price rule is applied to a bundle product with dynamic pricing enabled, the catalog_product_index_price table is updated with a minimum price of 0 for the parent bundle product.

Q: How can I reproduce this issue?

A: To reproduce this issue, follow these steps:

  1. Create a catalog price rule and apply it to a bundle product with dynamic pricing enabled.
  2. Ensure that the indexers are current.
  3. Run a query on the catalog_product_index_price table to retrieve the minimum price for the parent bundle product.
  4. Observe the results for the selected websites and customer groups. The minimum price should not be set to 0.

Q: What are the expected and actual results?

A: The expected result is that the minimum price for the parent bundle product should be the cheapest possible combination of the required bundle options. The actual result is that the minimum price is set to 0.

Q: How can I resolve this issue?

A: To resolve this issue, you can follow these steps:

  1. Update the catalog price rule to exclude bundle products with dynamic pricing enabled.
  2. Run the indexers to update the catalog data.
  3. Verify that the minimum price for the parent bundle product is set correctly.

Q: What are the recommendations for future development?

A: To improve the catalog price rule functionality, we recommend the following:

  1. Improve the catalog price rule to exclude bundle products with dynamic pricing enabled by default.
  2. Add a warning to the catalog price rule configuration to alert users that the rule may not work correctly for bundle products with dynamic pricing enabled.
  3. Provide a workaround for users who need to apply the catalog price rule to bundle products with dynamic pricing enabled.

Q: What is the severity of this issue?

A: The severity of this issue is S0, as it affects critical data or functionality and leaves users without a workaround.

Q: Can I get a workaround for this issue?

A: Yes, you can get a workaround for this issue by following the steps outlined in the previous article. However, please note that this workaround may not be suitable for all use cases and may require additional configuration.

Q: How can I prevent this issue from occurring in the future?

A: To prevent this issue from occurring in the future, you can follow these best practices:

  1. Test the catalog price rule functionality thoroughly before applying it to your production environment.
  2. Ensure that the indexers are current before running the catalog price rule.
  3. Verify that the minimum price for the parent bundle product is set correctly after applying the catalog price rule.

By following these best practices, you can prevent this issue from occurring in the future and ensure that your catalog price rule functionality works as expected.