Skip to content

Prices should be hidden from products query results when the category permissions chooses to hide them #29926

Closed
@pmarjan

Description

@pmarjan

query{ products(search: "product"){ total_count items { name sku price_tiers { quantity final_price { value } } price_range { maximum_price { final_price { value } } minimum_price { final_price { value } } } special_price } } }

The product collection is processed properly. Processor is:
Magento\CatalogPermissionsGraphQl\Model\Resolver\Products\DataProvider\Product\CollectionProcessor\CustomerGroupProcessor
This returns results by which the product property can_show_price is set correctly per the category permissions configuration.
However, the query above would still display the prices.
We need to return null, when on product level can_show_prices is false for the following fields

  • price_range
  • price_tiers
  • special_price

Preconditions (*)

Steps to reproduce (*)

Expected result (*)

  1. [Screenshots, logs or description]

Actual result (*)

  1. [Screenshots, logs or description]

Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

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

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions