MDVA-30782: dynamic block is displayed regardless of cart rule

The MDVA-30782 patch fixes the issue where a dynamic block is displayed regardless of the cart rule. This patch is available when the Quality Patches Tool (QPT) 1.0.7 is installed. Please note that the issue was fixed in Adobe Commerce 2.4.2.

Affected products and versions

The patch is created for Adobe Commerce version:

Adobe Commerce on cloud infrastructure 2.3.5-p1

Compatible with Adobe Commerce versions:

Adobe Commerce (all deployment methods) 2.3.5 - 2.4.2

NOTE
The patch might become applicable to other versions with new Quality Patches Tool releases. To check if the patch is compatible with your Adobe Commerce version, update the magento/quality-patches package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.

Issue

The dynamic block is displayed on the page even when the related catalog price rule condition is not satisfied.

Steps to reproduce:

  1. Create two products.

  2. Create a catalog price rule applicable only for one of these products.

  3. Create a dynamic block and assign the newly created catalog price rule to it.

  4. Create a widget with the following parameters:

    • Type = Dynamic Block Rotator
    • Dynamic Blocks to Display = Specified Dynamic Blocks
    • Specify Dynamic Blocks = block form step #3Layout Updates (can be any)
    • Display on = All Product Types
    • Container = Product auxiliary info
  5. Perform reindex and flush the cache.

  6. Check both product pages for dynamic block form step #3

Expected results:

Dynamic block appears on the first product page only.

Actual results:

Dynamic block appears on both product pages. With Dynamic Blocks to Display = Catalog Price Rule Related on step #3, the result is the same.

Apply the patch

To apply individual patches, use the following links depending on your deployment method:

To learn more about Quality Patches Tool, refer to:

For info about other patches available in QPT, refer to Patches available in QPT in our developer documentation.

recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a