Closed adarshkhatri closed 1 year ago
Hi @adarshkhatri. Thank you for your report. To speed up processing of this issue, 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@magento I am working on this
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.
@magento give me 2.4-develop instance - upcoming 2.4.x release
Hi @adarshkhatri. Thank you for your request. I'm working on Magento instance for you.
Hi @adarshkhatri, here is your Magento Instance: https://a8e18a502c712ea06a567934a0b8b1a6.instances.magento-community.engineering Admin access: https://a8e18a502c712ea06a567934a0b8b1a6.instances.magento-community.engineering/admin_5a7f Login: 252163c5 Password: 329f56b8a069
I was able to reproduce in above instance.
Hi @engcom-Bravo. 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:
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to.2.4-develop
branch@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure. 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.Issue: Confirmed
once verification is complete. @magento give me 2.4-develop instance
Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you.
Hi @engcom-Bravo, here is your Magento Instance: https://a8e18a502c712ea06a567934a0b8b1a6.instances.magento-community.engineering Admin access: https://a8e18a502c712ea06a567934a0b8b1a6.instances.magento-community.engineering/admin_86e5 Login: b50c8847 Password: e81d88c79989
Hi @adarshkhatri,
Thank you for reporting and collaboration.
Verified the issue on Magento 2.4-develop instance and the issue is not reproducible.Kindly refer the screenshots.
Steps to reproduce
1.Create a product and set it's visibility to search 2.Query for GQL
As per magento devdocs when we set to product visibility to search
it will be found through search tool.
Kindly go through with this document https://docs.magento.com/user-guide/v2.3/sales-channels/amazon/creating-assigning-catalog-products.html#create-a-multiple-catalog-products-using-their-amazon-listing-information and please let us know if you are still facing any issue.
Thanks.
Isn't that the issue I reported that is response has no product
?
If this is expected, then what is the query should I run to take customer to product detail page
?
@magento give me 2.4-develop instance
Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you.
Hi @engcom-Bravo, here is your Magento Instance: https://a8e18a502c712ea06a567934a0b8b1a6.instances.magento-community.engineering Admin access: https://a8e18a502c712ea06a567934a0b8b1a6.instances.magento-community.engineering/admin_3898 Login: 732b15f7 Password: 541eea619e2d
Hi @adarshkhatri,
Thanks for your update.
Verified the issue on Magento 2.4-develop instance and the issue is not reproducible.Kindly refer the screenshots.
Steps to reproduce
1.Create a product and set it's visibility to search
We have used below query for a product when set visibility as "search".We got a response for a product.
{
products(search: "Product SKU") {
items {
name
sku
url_rewrites {
url
parameters {
name
value
}
}
}
}
}
Kindly let us know if we are still facing any issue.
Thanks.
Above query would be for your search result page. now how will you take your customer to product detail page? You cannot rely on ‘search query’ to take your customer to PDP.
The way we do it, we remove the “search” query and pass the SKU as a filter when taking to PDP.
@magento give me 2.4-develop instance
Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you.
Hi @engcom-Bravo, here is your Magento Instance: https://a8e18a502c712ea06a567934a0b8b1a6.instances.magento-community.engineering Admin access: https://a8e18a502c712ea06a567934a0b8b1a6.instances.magento-community.engineering/admin_40a5 Login: e493355e Password: 56c72a1d1c64
Hi @adarshkhatri,
Thanks for your update.
As per Magento devdocs when we set visibility to search
the product should be only searchable,and also we cannot find that product in categories kindly refer the attached video.
We have used below graphql query for a product when we set visibility to search
.we got the response.
{
products(
search: "ProductA"
) {
items {
name
sku
price_range {
minimum_price {
regular_price {
value
currency
}
}
}
}
total_count
page_info {
page_size
}
}
}
Since the product is not showing an category page we cannot filter the product.Kindly let us know if you are still facing any issue.Please let us know if we missed anything.
Thanks.
@magento give me 2.4-develop instance
Hi @adarshkhatri. Thank you for your request. I'm working on Magento instance for you.
Hi @adarshkhatri, here is your Magento Instance: https://a8e18a502c712ea06a567934a0b8b1a6.instances.magento-community.engineering Admin access: https://a8e18a502c712ea06a567934a0b8b1a6.instances.magento-community.engineering/admin_3525 Login: 259c2238 Password: 26f6e359402e
Ok, I think we are going in circle.
I agree with you on search result page
. But I am trying to understand your approach for PDP.
Below is the approach I am using for my storefront.
And https://venia.magento.com/penelope-peasant-blouse.html
As you see, for the PDP there the query:
getProductDetailForProductPage($urlKey:String!)
and fitler by url_key
: {"urlKey":"penelope-peasant-blouse"}
in the filter payload.
With this fitler, the response is null.
@magento give me 2.4-develop instance
Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you.
Hi @engcom-Bravo, here is your Magento Instance: https://a8e18a502c712ea06a567934a0b8b1a6.instances.magento-community.engineering Admin access: https://a8e18a502c712ea06a567934a0b8b1a6.instances.magento-community.engineering/admin_eba0 Login: 7cc73077 Password: 4fa3868fb7f3
Hi @adarshkhatri,
Thanks for your update.
We have created 3 products with visilibity to search.These products we cannot found in category.we tried using search tool.
We have used below query with filter input.We got response.
{
products(
search: "ProductA"
filter: { sku: { eq: "ProductAAA" } }
) {
items {
name
sku
price_range {
minimum_price {
regular_price {
value
currency
}
}
}
}
total_count
page_info {
page_size
}
}
}
We are able to filter the product with SKU.
Kindly let us know if we missed anything.
Thanks.
You are using search
for the product query
in PDP. As we know search query
may not give you the exact product. The search query is for catalog search.
As you can see your own demo PWA link https://venia.magento.com/penelope-peasant-blouse.html it is not using search query
query getProductDetailForProductPage($urlKey:String!){
products(
filter:{
url_key:{eq:$urlKey}
}
){
items{
id
uid
...ProductDetailsFragment
__typename
}
__typename
}
}
Can you confirm or point me to a Magento doc about the PDP page query approach to use search
in a query?
@magento give me 2.4-develop instance
Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you.
Hi @engcom-Bravo, here is your Magento Instance: https://a8e18a502c712ea06a567934a0b8b1a6.instances.magento-community.engineering Admin access: https://a8e18a502c712ea06a567934a0b8b1a6.instances.magento-community.engineering/admin_8410 Login: 07c77e17 Password: 1e07e824c85d
Hi @adarshkhatri,
Thanks for your update.
We have tried below query using search
.we got response for PDP page.
query {
productDetail: products(
search: "ProductA"
filter: { sku: { eq: "ProductAAA" } }
) {
total_count
items {
sku
id
name
__typename
price_range {
minimum_price {
regular_price {
value
currency
}
}
}
}
}
}
As per Magento devdocs https://developer.adobe.com/commerce/webapi/graphql/schema/products/queries/products/#deprecated-output-attributes. filter withurl_key
is deprecated.
For url_key we have to use route query.Please check this document https://developer.adobe.com/commerce/webapi/graphql/schema/products/queries/route/.
Kindly let us know if you are still facing any issue.
Thanks.
I think we are going in circles. Please close the ticket if you think there is no problem. I have already patched our version.
Hi @adarshkhatri,
Thanks for your update.
As per latest comment https://github.com/magento/magento2/issues/36857#issuecomment-1445012602 we are closing this issue. Please raise a fresh ticket or reopen this ticket if you need more assistance on this.
Thanks.
I have the same issue as @adarshkhatri. I think we should reopen task.
Maybe it's an issue from the PWA side and we should use another query, but for now it's products
with filter
still:
Query is:
query getProductDetailForProductPage($urlKey:String!) {
products(filter:{url_key:{eq:$urlKey}}) {
items {
...
}
}
}
And this query has build in filter by visibility and products with visibility "Search" ignored.
I think we are going in circles. Please close the ticket if you think there is no problem. I have already patched our version.
@adarshkhatri how did you resolve the issue? We encounter the same problem in 2.4.5-p8 aswell.
Preconditions and environment
Steps to reproduce
search
Variable:
Expected result
The response should have a product.
Actual result
The response is empty.
Additional information
It looks Magento adds
visibility as 2 and 4
by default while doing GQL query. It make sense when doing query for the category page. But how about the product detail page?Release note
No response
Triage and priority