Expand my Community achievements bar.

SOLVED

Displaying Product details in CIF Venia project

Avatar

Level 8

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/carin...

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 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@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/ven...

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-comm...

 

 


Amanath Ullah

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

@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/ven...

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-comm...

 

 


Amanath Ullah