Monday, 10 July 2017

AEM Ecommerce Unleashed-2 / Hybris integration with AEM

Creating Customized Ecom provider

What is Commerce Provider in AEM’s Ecommerce?

After my previous article on ecommerce's example you have seen that I used “geometrixx” as my commerce provider which already exists in code set of geometrixx. In this article, we’ll learn why we require this commerceprovider and how to create it.

How a Commerce Provider works?

When importing data from a commerce engine into your AEM eCommerce site, a commerce provider is used to supply the importers with data. One commerce provider can support multiple importers. A commerce provider is AEM code customized to either:
1. interface to a back-end commerce engine
2. implement a commerce system on top of the JCR repository
Though usually a project will need to develop their own, customized, commerce provider specific to their PIM and product data schema.

How can I create my own Commerce Provider?

The ProductServicesManager maintains (through OSGi) a list of implementations of the ProductImporter and CatalogBlueprintImporter interfaces. These are listed in the Importer/Commerce Provider dropdown field of the importer wizard (using the commerceProvider property as a name).
When a specific importer/commerce provider is available from the dropdown, any supplemental data it needs must be defined (depending on the importer type) in either:

/apps/commerce/gui/content/catalogs/importblueprintswizard/importers

/apps/commerce/gui/content/products/importproductswizard/importers

The folder under the appropriate importers folder must match the importer name; for example: .../importproductswizard/importers/geometrixx/.content.xml

The format of the source import file is defined by the importer. Or the importer may establish a connection (e.g WebDAV or http) to the commerce engine.

1. Create Service Factory : Highlighted one is defining my commerce provider
@Component(metatype = true, label = "Adobe CQ Commerce Factory for Training")

@Service

@Properties(value = {

       @Property(name = "service.description", value = "Factory for training commerce service"),       @Property(name = "commerceProvider", value = "ckj-test")

}) public class ckjServiceFactory extends AbstractJcrCommerceServiceFactory implements CommerceServiceFactory { 

   public CommerceService getCommerceService(Resource res) {

       return new ckjServiceImpl(getServiceContext(), res);   } 

}
2. Creating respective files like ckjServiceImpl, ckjSessionImpl, ckjProductImpl, SimpleDSComponent, click here to download all code.
3. Once you’ve your code at place then in content node make sure to change following property:
You can replace cq:commerceProvider value from “geometrixx” to “ckj-test” and all functionalities should work as expected.

Integration of Hybris with AEM

Setting up Hybris server?

Please go through below URLs posted by me for setting up hybris server on your local and do a product import, on this video I've explained in detail but in case if you're facing any issue then please feel free to contact
https://www.slideshare.net/RestWest/ecom-adobe https://www.youtube.com/watch?v=TIcw7WSDPIg&t=186s https://www.youtube.com/watch?v=wuvP2PNyb7g

You can also go through adobe’s URL : https://docs.adobe.com/docs/en/aem/6-2/deploy/ecommerce/hybris.html

Creating Hybris Connectors?

To create Hybris connector, we can get their code from Hybris directly and can create ours based on that with modification if required. Here is a link of some developer who shared a sample hybris connector code, I'm not sure how correct is it but very soon I'll share mine as well: https://github.com/Adobe-Marketing-Cloud/cq-java-hybris-extensions

Connecting AEM using Hybris Connector?

First of all, from Hybris end all the process must have a webservice API created which need to be called with required param from AEM end via :
1. Using Hybris API methods. 2. Using Ajax call on Hybris API.

So, with this I end my Ecommerce implementation in AEM. Please share your feedback if any and help to improvise as well, your effort will be appreciated and known. On Ecommerce I'll continue to share more articles like payment gateway integration etc. Thanks for going through this article.

20 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Courses - Niche Tyrant
    The very first course has information about improving your conversions, and you can also locate classes for persuasive design.

    ReplyDelete
  3. Irrespective of which modem you decide on, you will need to activate it once you get it. thegreatdevice.com has more information on the Yamaha ATS1030 Review - Incredible Sound In A Slim Bar - The Great Device.

    ReplyDelete
  4. If you are thinking to create an E-commerce website then you must read this blog. After reading this blog I am sure that you will never make any mistake in making a full featured E-commerce website - 25 MOST IMPORTANT FEATURES FOR E-COMMERCE WEBSITE

    ReplyDelete
  5. Obviously the settings within your slicer impacts the result too. You can learn more about TEVO Tarantula 3D Printer Kit - A Quick Review - Android Tipster here.

    ReplyDelete
  6. Therefore, you're stuck with linking to a different site or not blogging whatsoever. When it has to do with building a special site the technical features are equally as critical as the style features. If you are more curious about add plugin then you can learn more about it on addplugin.com.

    ReplyDelete
  7. This comment has been removed by the author.

    ReplyDelete
  8. Much like any telephone, though, not everything is ideal. Ensure that your mobile phone is unlocked. In the usa, almost all cell phones arrive locked. Get more details on sparrowsurf.

    ReplyDelete
  9. You completed some great factors there. I did a seek nearly the problem and determined re all folks will post when your blog. Online Shenanigans

    ReplyDelete
  10. thank you for sharing such an informative post about ebay amazon order management software

    ReplyDelete
  11. Nice Blog.
    This blog has useful information.
    Have a look here Enterprise Resource Planning Software in Hyderabad. I would suggest TCERP because of its unique integrated ERP ecommerce software. Know more about ERP Software features & Modules For please contact us +91 8919439603.

    ReplyDelete
  12. Thanks everyone for your feedback , appreciation and suggestions ..... Will try to improvise more with upcoming blogs

    ReplyDelete

  13. Hello,

    we provide affordable and result-oriented SEO services, please give a chance to serve you.


    Thanks
    Admin: E07.net

    ReplyDelete
  14. VERY INFORMATIVE AND KNOWLEDGEABLE ARTICLE….
    THANKS FOR SHARING……

    DECENTRALISED FINANCE SERVICES IN INDIA

    ReplyDelete
  15. I like to read such a nice post thanks for posting it..!! SPL Token development

    ReplyDelete
  16. Thank you for sharing this amazing article...!! Polygon chain

    ReplyDelete

  17. VERY INFORMATIVE AND KNOWLEDGEABLE ARTICLE…..THANKS FOR SHARING……

    TOKEN DEVELOPMENT

    ReplyDelete
  18. Thank you for your post, I look for such an useful and beautiful article for a long time, today I found it finally. this post gives me lots of advice it is very useful for me.
    Serumswap Clone Development

    ReplyDelete