Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Connecting Magento to AEMaaCS (Local instance and sandbox)

Avatar

Level 2

Hi, 

 

I am doing an internal project to connect a magento sandbox to an AEMaaCS sandbox to test out the use of CIF components.

 

I am building it locally and am using the latest AEMaaCS download, and the latest CIF plugin.

 

My project is pretty basic with only core components and core CIF components enabled. It was built using the Adobe Archetype with commerce enabled.

 

While the project builds and installs properly, I get a few problems.

 

The navigation header keeps coming up with a comparison error. I ended up removing the navigation component for now, but i did add a CIF product component to a page, and in the editorial interface it allows me to search the products on the magento server and choose the one that I want to visualise, however when I do view as published it says "No Product Found"

 

I did a bit of debugging on the ProductImpl class, and can see it getting called, however the self bound MagentoGraphqlClient is null, hence it can't find the content.

 

Does anyone have an idea on what configuration is missing?

 

I have the COMMERCE_ENDPOINT environment variable in place and that at least makes the editorial interface work as expected.

6 Replies

Avatar

Community Advisor

@getaylormerkle can you please cross verify your configuration as per the documentation https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/content-and-commerc...

 

We followed this and everything is working as expected.

 

Maybe storeid/catalogid missing or somewhere.

Avatar

Level 2

Hi @Shashi_Mulugu Yes this was the instructions I followed.

 

In the editirorial process and in the commerce pages I see the catalog and products, Even when i edit a product component on the page I can choose the product i want, it is just when i is in preview mode/view as published that it comes up with "No product found"

Screenshot 2022-06-30 at 16.49.02.png

Screenshot 2022-06-30 at 16.53.11.png

Screenshot 2022-06-30 at 16.49.09.png

Hi @Gucci-Paull-108 

 

I did debug it locally and found that the MagentoGraphqlClient is not initialised in the ProductImpl and the configurationResource is not found for the page. and when it tries to adapt the page

Screenshot 2022-06-30 at 16.48.46.png

This is the sort of logs I am seeing, and they are all caused by not having the magentographqlclient

 

at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) [org.apache.felix.http.jetty:4.2.0]

at java.base/java.lang.Thread.run(Thread.java:829)

Caused by: java.lang.NullPointerException: null

at com.adobe.cq.commerce.core.components.internal.models.v1.product.ProductImpl.getSku(ProductImpl.java:224) [com.adobe.commerce.cif.core-cif-components-core:2.9.0]

... 486 common frames omitted

 

There are a lot, but this is the component trying to get the different data items and it returning nothing.

 

 

Avatar

Employee

were you able to resolve this issue? I am also facing exact same issue, products showing up in dialog but not rendering, getting product not found error and see errors in logs for ProductImpl classes. in my case I am using AEM 6.5.17 with Magento commerce. Products shows up in Commerce/Products but not rendering in product detail component.

Avatar

Level 2

Any luck with this issue? I am having the same problem with my custom product component.

MagentoGraphqlClient is not getting injected in my CustomProductImpl even though I have all required OSGI configurations done. Due to this, I am getting magentoGraphqlClient object as null. I kept debug pointer in OOTB ProductImpl as well, and over there I can see the object is getting initialised. 


Strange thing, the injection in my local works fine some times and some times it doesn’t. In AEM cloud Dev ,magentoGraphqlClient is always null.