on 2019 Apr 21 12:13 AM
Your system contains a search restriction with the following parameters: Type: Product User: anonymous Restriction: 1=0 There is a product "Candle" in the online catalog and a variant product "PinkCandle" in the online catalog. The system renders the Product Detail Page for Pink Candle using the following flexible search query: "SELECT {pk} FROM {VariantProduct} WHERE {code} = "PinkCandle".
What happens next? what is the Search Query Result?
Request clarification before answering.
The flexible search query returns an empty list as the final query is SELECT {pk} FROM {VariantProduct} WHERE {code} = "PinkCandle" AND 1 = 0;
As 1 = 0 is False the the where clause returns also false even the PinkCandle exists on the online catalog.
Note: A search restriction applies to the item type and its subtypes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What does 1 = 0 mean? And what would change if it would be User: customergroup? Would the result be the same?
EDIT:
I found the answer. So in case you will access product detail page with restriction:
Type: Product
User: anonymous
Restriction: 1=0
it will probably return 404 or product not found.
Restriction describes that restriction works for Product type and all subtypes (including VariantProduct).
User field describes that this applies for anonymous customers.
Restriction field describes that it will always be false.
For example, if you are not logged in customer, accessing variant product on product detail page, you will see 404 or page not found, since in backed flexible search query will return empty result for that search.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.