
Even though you can find a very detailed explanation about how to install hybris and add demo content (cq-geometrixx-hybris-content-6.2.100.zip) in Adobe documentation, the aim of this post is to dig a little deeper into this integration and talk about the communication between AEM and hybris during the checkout process.
Some considerations to take into account:
After installing the cq-hybris-content-6.2.100.zip package, make sure to have the correct hybris version in the config manager console http://localhost:4502/system/console/configMgr

If you plan on making a PoC on your project, make sure to have the cq:hybrisBaseStore, cq:hybrisCatalogId on your root page. Otherwise, you’ll get a null pointer when trying to access the product’s prices – among other types of issues.

Product’s price
The product’s price is not stored in AEM. So whenever a user hits a product’s detail page, AEM makes a request to hybris in order to get its price.
http://localhost:4502/content/geometrixx-outdoors/en_US/seasonal/winter/apparel/scarves/sherbrooke-winter.html

If you go to the hybris Product Cockpit Module (https://172.20.0.176:9002/productcockpit/), you will see two catalogs for Geometrixx: online and staged.

If by any chance, you need to change the product’s price, you will need to go to the hybris management console (https://172.20.0.176:9002/hmc/hybris) and change the stage product’s price.




Checkout process
If you try to add any product into the cart, you will get an “InsufficientStockError”

In order to bypass this error – and be able to add stock for a particular product (for each variation as well) – you should follow these steps:
https://172.20.0.176:9002/hmc/hybris

After adding products into the cart, you’ll go to the checkout page. In the State/Province field, you need to put a correct ISO 3166-2 value

These values are the expected ones in hybris https://172.20.0.176:9002/hmc/hybris

When testing data for credit card info, you can use the following example:

After finishing the checkout process, you will receive an order number. With it, you can proceed to the hybris console and view the order details.

https://172.20.0.176:9002/hmc/hybris
Some considerations to take into account:
After installing the cq-hybris-content-6.2.100.zip package, make sure to have the correct hybris version in the config manager console http://localhost:4502/system/console/configMgr

If you plan on making a PoC on your project, make sure to have the cq:hybrisBaseStore, cq:hybrisCatalogId on your root page. Otherwise, you’ll get a null pointer when trying to access the product’s prices – among other types of issues.

Product’s price
The product’s price is not stored in AEM. So whenever a user hits a product’s detail page, AEM makes a request to hybris in order to get its price.
http://localhost:4502/content/geometrixx-outdoors/en_US/seasonal/winter/apparel/scarves/sherbrooke-winter.html

If you go to the hybris Product Cockpit Module (https://172.20.0.176:9002/productcockpit/), you will see two catalogs for Geometrixx: online and staged.

If by any chance, you need to change the product’s price, you will need to go to the hybris management console (https://172.20.0.176:9002/hmc/hybris) and change the stage product’s price.




Checkout process
If you try to add any product into the cart, you will get an “InsufficientStockError”

In order to bypass this error – and be able to add stock for a particular product (for each variation as well) – you should follow these steps:
https://172.20.0.176:9002/hmc/hybris

After adding products into the cart, you’ll go to the checkout page. In the State/Province field, you need to put a correct ISO 3166-2 value

These values are the expected ones in hybris https://172.20.0.176:9002/hmc/hybris

When testing data for credit card info, you can use the following example:

After finishing the checkout process, you will receive an order number. With it, you can proceed to the hybris console and view the order details.

https://172.20.0.176:9002/hmc/hybris

No comments:
Post a Comment
If you have any doubts or questions, please let us know.