Tuesday 2 April 2013

AEM and Hybris Integration Example

Hybris Integration:

To have the e-commerce capabilities, you need to install the Adobe Experience Manager and Install the following packages using package manager (These packages are available on Adobe Package Share). AEM  has an e-commerce framework available in it, which is installed when you install the AEM.

  • cq-hybris content ( It has hybris API's implementation)
  • cq-hybris server ( in case you do not have a hybris server)
Hybris Example with AEM :- 

To implement an e-commerce example. Follow the below steps:- 


1. When CQ and Hybris servers are up and running

2. Open siteadmin

3. Open English (US) Geometrixx Outdoors page in Siteadmin      (http://localhost:4502/siteadmin#/content/geometrixx-outdoors/en_US)

4. Open the Men's category page (http://localhost:4502/cf#/content/geometrixx-outdoors/en_US/men.html)

5. Open Jola Summer page (http://localhost:4502/cf#/content/geometrixx-outdoors/en_US/men/shorts/48576.html)

  •  Switch colors (variants)
  • See product name changing
  • See available sizes changing

6. Open the Ashanti Nomad page (http://localhost:4502/cf#/content/geometrixx-outdoors/en_US/men/shirts/3209.html )

7. Switch to the Hybris interface https://localhost:9001/hmc/hybris

  • Login: admin/admin
  • Click Home
  • Login again (same credentials)
  • Click on any link; login again if required
  • Switch to the English interface (top-right)
  • Click Catalog/Catalogs
  • Expand outdoors -> outdoors - Staged -> men -> shirts -> 3209
  • Click on 320984-L
  • Show that it refers to the L variant
  • Click price (top bar), change price (e.g. from $29.50 to $22.00), save (top left)

8. Back to CQ

9. Show Ashanti Nomad again http://localhost:4502/content/geometrixx-outdoors/en_US/men/shirts/3209.html, select L variant with new price

  • Select size variant, click add to cart
  • Click Cart (#) http://localhost:4502/cf#/content/geometrixx-outdoors/en_US/user/cart.html, show cart
  • Click one product link
  • Update a quantity from the cart
  • Delete an item line from the cart

10. Back to Hybris

  • Browse through Marketing -> Order statistics -> Carts
  • In main page, click search
  • In Results section, click Date column header to order by date, check that the latest cart is from the current date
  • Double click the latest cart
  • Show that cart items (and prices) are the same as in CQ cart
  • Change the quantity of an item and save

11. Back to CQ
  • Show new quantity in CQ Cart
  • Checkout
This is an example of implementing cart and a checkout. In a similar manner, a simple cart system can be implemented.

For more information, find http://dev.day.com/docs/en/cq/current/ecommerce/eCommerce-framework.html

35 comments:

  1. hello kanika;
    I really find your blog so interesting;
    I wanna know if did you try to import an other catalog (than outdoors) from hybris beacause I did it with electronicsCatalog; and it import just the product id
    and it doesn't import variant product and prices,
    thanks for your help;

    ReplyDelete
  2. Yes, I tried and it works fine. Which CQ version are you using and the steps you follow.

    Generally, Product data (prices, descriptions, variations, sizes, etc.) is stored in /etc/commerce/products.

    Catalog structure (section hierarchy, what templates to use, product tags/searches, etc.) is stored in /content/catalogs.

    When a catalog is generated, pages are generated in /content for each section and for each product found in /etc/commerce/products which matches the catalog section tags and/or search.

    This way you can have multiple catalogs (whether base + sale catalogs, regional catalogs, whatever) for the same product set.

    The Procedure :-

    First, in hybris (http://localhost:9001/hmc/hybris/), you have to define a new base store by going to Base Commerce -> Base Store. Then, you have to create a new website associated with this base store by going to WCMS -> Websites. In the base store you configure what catalog to use for products, here you select your catalog. For more info see the wiki page[0] where we describe how we import the geometrixx-outdoors catalog in hybris.

    . After that, you can use the importer again with the new base store & catalog. It will import the product data to /etc/commerce/products// and the images to /content/dam/geometrixx-outdoors/products/import (this can be configured in the OSGi console for the DefaultImportHandler component).

    Then, you have to create a new catalog similar to the hybris-base-catalog but that pulls product info from the new path and roll it out to a new site.

    This should work.

    ReplyDelete
    Replies
    1. Hi Kanika,

      Thanks for this post. We could integrate CQ with Hybris.
      In the last line, you mention about Rollling out Catalog to new site. Can you please elaborate on this process. I am facing difficulty in rolling out catalog to new site.
      At, /content location, I created a new live copy "New--> New Live Copy " & gave Hybris-base-catalog (/content/catalogs/geometrixx-outdoors/hybris-base-catalog) in "Live Copy From" attribute & en_UK in ''Name' attribute.
      It created a site with name "en_UK" with subnodes, but the template Type for the newly created site is "Catalog BluePrint". Template type for "en" & en_US is "Homepage". also when i double click on the newly created page, I don't see site as expected. I expected new site to be similar to "en_US" or "en" site.
      Am I missing any step? What is the correct step to roll out Catalog to New site?

      Delete
  3. first of all; thanks for trying this; and for your time;
    I use cq5.5; and hybris4.8.2; that's a link for my screenshots for my tests;
    http://www.mediafire.com/?svo6wd72krkoa23

    so I create base store mybasestore then a website mywebsite; then I go to http://localhost:4502/etc/importers/hybris.html
    : and I fill the form it gives me base site(myBaseStore) not found
    so I tried with electronics and it imported but without price and prduct variant;and when I need a price I get it via web service to have it from hybris; but I have some problems in that;
    so I wanna stock prices in cq;

    I dont know why it doesn't work with mybaseStore;
    and did you make a configuration for an hierarchy import; to import the catalog?
    and I didn't understand your last note "you have to create a new catalog similar to the hybris-base-catalog but that pulls product info from the new path and roll it out to a new site."
    thanks for you helps;

    ReplyDelete
  4. hello;
    how do you choose a price if there is multiple prices in a product.

    ReplyDelete
    Replies
    1. Multiple Prices for a particular product you mean?

      Delete
    2. yes; but cause when I give multiple price to a product it gives me an error;
      "invalid uri:...."

      Delete
  5. Hello Marouane,

    I tried to import electronicsProductCatalog from an extern hybris instance. I failed and I wanted to ask you to upload Screenshots from "Day CQ Commerce Hybris Default Import Handler"- and "Day CQ Commerce Hybris Default Response Parser"-Dialog, because I think I made a mistake there. If you did some other changes please post Screenshots too.

    regards Joerg

    ReplyDelete
  6. @Marounae:- I couldn't see the screenshots on that link. Sorry for late reply !

    ReplyDelete
    Replies
    1. the link gives u the file screenShots.rar to download which contain the screenshots;
      thanks

      Delete
  7. Hi,

    Can you please upload the screen shots from OSGi console for hybris package

    ReplyDelete
  8. @ george & galiwala there is no special config to do in osgi to import product just install packages : hybris server.zip, hybris content.zip, and cq commerce content from package share; ok
    give us a screen shot of ur problem; ok

    ReplyDelete
    Replies
    1. Right, We do not make any configuration changes

      Delete
  9. Hi again,

    I solved my problem there might be a problem with AEM, adobe support ticket already created. If I get a response that is helpful I will post again.

    ReplyDelete
  10. hi, great post!, but do you know how to do this from scratch?

    i mean, create the hybris catalog, import it in CQ5 and use it with some components

    i cant find any example or guide

    thank you!

    ReplyDelete
  11. Hi,
    Interesting blog. It would be great if you can provide more details about it... Adobe Technical Support please visit the link.

    ReplyDelete
    Replies
    1. You can raise tickets here: https://helpx.adobe.com/marketing-cloud/contact-support.html

      Delete
  12. Hi Kanika,

    Thanks for the wonderful post.
    We tried these steps & could successfully import outdoors catalog from CQ out of box hybis server to cq5.
    But when we try to import default "electronicsProductCatalog" catalog from standalone hybris server, we get this error message
    "E Skipping Product due to missing base product Information (code/path) : null"

    We are using cq-hybris-content-5.6.2.zip package from adobe.

    Regards,
    Gopal

    ReplyDelete
  13. Very usefull and synchronized i owe to you.

    Regards
    Chandra
    http://jcr-nosql.com

    ReplyDelete
  14. Thank you good information.EDUWIZZ provides an excellent job opportunity in Hybris Trainingfor JAVA professionals who are seeking for job or looking to change to latest and advanced technologies.

    ReplyDelete
  15. Thank you for your article it's looks good and providing some valuable information by Hybris Training

    ReplyDelete
  16. It's looking good article and providing some valuable information.We are providing Hybris Training In Visualpath Technology

    ReplyDelete
  17. Thanks The information which you provided is very much useful for Hybris Training in Bangalore
    Websphere Commerce Server Training vm

    ReplyDelete
  18. I have tried to integrate AEM 6.1 and hybris 6.1 and installed packages from package share. When I try to use importer, am getting error oauth handler 2xx authentication failed. I have provided login details in OSGi.
    Is there any new config to be done???

    ReplyDelete
  19. Kishore- I also have the exact same error 23.02.2017 15:41:48.818 *ERROR* [sling-default-300-default.3247] com.adobe.cq.commerce.hybris.impl.OAuthHandler Server did not respond with 2xx -> authentication failed.

    How did you solve it?

    ReplyDelete
  20. I really appreciate information shared above. It’s of great help. I am very happy to read your post. It is really very helpful for us and I have gathered some important information from this blog.
    grepthor

    ReplyDelete
  21. Thank you good information.EDUWIZZ provides an excellent job opportunity in Hybris Trainingfor JAVA professionals who are seeking for job or looking to change to latest and advanced technologies.In future we are expecting more blogs from your side.

    ReplyDelete
  22. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me. I am a regular follower of your blog.
    Really very informative post you shared here. Kindly keep blogging.
    Java training in Btm layout
    Java training in Rajaji nagar
    Java training in Kalyan nagar
    Java training in Kalyan nagar
    Java training in Jaya nagar


    ReplyDelete
  23. Thank You so much for your effort in sharing such a wonderful blog with us.
    Nice article I was impressed by seeing this blog, it was very interesting and it is Thanks for sharing all the information with us all.very useful for me.
    oracle training in chennai

    oracle training institute in chennai

    oracle training in bangalore

    oracle training in hyderabad

    oracle training

    oracle online training

    hadoop training in chennai

    hadoop training in bangalore

    ReplyDelete