Hi All,
i want to have multiple addresses for a customer. And customer can set one of the addresses as 'default address'. other addresses can be shipping address,billing address etc.
Please provide me a solution and best practice to achieve this. A demo would be really helpful.
Thanks in advance.
Solved! Go to Solution.
You need to read the JCR data modelling considerations that I listed above. Setup the JCR to handle your data as described in David N article. Its a must read for your use case.
Views
Replies
Total Likes
You need to build one. You might look at [1] which is kind of todo application where you can add/delete/remove etc..
[1] https://github.com/Adobe-Marketing-Cloud/aem-sightly-sample-todomvc
Are you looking to persist customer info in the AEM JCR. The closest community article we have for this use case is here.
http://helpx.adobe.com/experience-manager/using/querying-experience-manager-data-using1.html
It covers persisting and querying sample cust data. You can use the JCR API to persist cust data in the JCR. You can define node props to store cust attributes. The JCR API can be used with an AEM service, as shown in this article. This article will get you started.
Views
Replies
Total Likes
Of course, if you are interested in persisting cust data in a relational database, you can write an AEM service as well. In this case, refer to
http://helpx.adobe.com/experience-manager/using/querying-persisting-cq-data-mysql.html
Views
Replies
Total Likes
i want a customer to go to his/her account where all the links are available. i want to create address book of the customer and order history where an 'Oder id' will be a primary link for the order details. Please refere the attached screenshots.
[img]myAccountlinks.png[/img]
[img]order-history.png[/img]
Though the above demos are good but of no use to me. Thanks for on time responding.
Views
Replies
Total Likes
The above demos are to show how to write services within AEM to persist data in either MySQL or the JCR. You use these articles when you have no idea on how to write AEM services to persist data in the JCR or a relational db. After you know how to perform these tasks, move on to modelling data.
In your use case, you need to model data in more depth than shown in these articles. I recommend you read
http://docs.adobe.com/docs/en/cq/current/developing/chap_data_modelling.html
This covers data modelling considerations. Look at Rule #5: References considered harmful
Views
Replies
Total Likes
You can also develop your solution in a relational database.
http://www.princeton.edu/~achaney/tmve/wiki100k/docs/Database_normalization.html
In that case normalize your model as talked about in this link. For instance, store order history in a separate table.
Views
Replies
Total Likes
As i am working on CQ-Hybris integration, the addresses and orders of the customer will be stored in Hybris server. i am fetching it and displaying to customer. for better performance i will fetch it once and store it in user properties. Consider me as a new AEM developer, can u suggest me how to create the following address book.[img]addressesDesign.png[/img]
Views
Replies
Total Likes
You need to read the JCR data modelling considerations that I listed above. Setup the JCR to handle your data as described in David N article. Its a must read for your use case.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies