Displaying Product details in CIF Venia project | Community
Skip to main content
Level 7
August 8, 2024
Solved

Displaying Product details in CIF Venia project

  • August 8, 2024
  • 1 reply
  • 679 views

Hello Team,

I am exploring AEM CIF framework. Did the graphQL configuration. Once, I hit the URL:

http://localhost:4502/content/venia/us/en/products/category-page.html/venia-tops.html

I am getting all the details. Can someone tell me, how this URL displays the data.

Same case with: http://localhost:4502/content/venia/us/en/products/product-page.html/venia-tops/venia-sweaters/carina-cardigan.html

This displays that particular product details. But, I am not getting how, the component gets the product id/sku details??

 

Thanks in advance

cc : @hemalatha @amanath_ullah 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by AMANATH_ULLAH

@mahesh_gunaje 

The product page and category page gets the Product/category SKU or url_path based on the OSGI configuration com.adobe.cq.commerce.core.components.internal.services.UrlProviderImpl

CIF core components use the values from url based on this configuration

Refer the below sample configuration from Venia 

{
"enableContextAwareProductUrls": true,
"productPageUrlFormat":"{{page}}.html/{{url_path}}.html#{{variant_sku}}",
"categoryPageUrlFormat":"{{page}}.html/{{url_path}}.html"
}

https://github.com/adobe/aem-cif-guides-venia/blob/main/ui.config/src/main/content/jcr_root/apps/venia/osgiconfig/config/com.adobe.cq.commerce.core.components.internal.services.UrlProviderImpl.cfg.json

You can find more details on Advanced Url configurations from the below link

https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/content-and-commerce/storefront/administering/advanced-url-configuration#:~:text=The%20system%2Dwide%20category%20and,to%20the%20system%2Dwide%20configuration

 

 

1 reply

AMANATH_ULLAH
Community Advisor
AMANATH_ULLAHCommunity AdvisorAccepted solution
Community Advisor
August 8, 2024

@mahesh_gunaje 

The product page and category page gets the Product/category SKU or url_path based on the OSGI configuration com.adobe.cq.commerce.core.components.internal.services.UrlProviderImpl

CIF core components use the values from url based on this configuration

Refer the below sample configuration from Venia 

{
"enableContextAwareProductUrls": true,
"productPageUrlFormat":"{{page}}.html/{{url_path}}.html#{{variant_sku}}",
"categoryPageUrlFormat":"{{page}}.html/{{url_path}}.html"
}

https://github.com/adobe/aem-cif-guides-venia/blob/main/ui.config/src/main/content/jcr_root/apps/venia/osgiconfig/config/com.adobe.cq.commerce.core.components.internal.services.UrlProviderImpl.cfg.json

You can find more details on Advanced Url configurations from the below link

https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/content-and-commerce/storefront/administering/advanced-url-configuration#:~:text=The%20system%2Dwide%20category%20and,to%20the%20system%2Dwide%20configuration

 

 

Amanath Ullah
Level 7
August 9, 2024

Thanks a lot @amanath_ullah  for your help. 🙂