Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Connecting Magento to AEMaaCS (Local instance and sandbox)

Avatar

Level 1

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.

0 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 1

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

Avatar

Level 1

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.