Extend Umbraco to populate data from external source
Hi,
I am working on a project to migrate a existing ecommerce website to Umbraco platform. The website has 3 distinct functional areas -
Content
Product Data
Functional Pages.
For Content part its straight forward; will use Umbraco platform to manage all content. For 3rd part - Functional part we will manage through custom controllers and route hijacking. But for product pages we have bit of challenge - we don't want to store product data in Umbraco instead we have another system which is responsible for maintaining product data.
So, coming to the real challenge we are experiencing - Is there any way in Umbraco through which we can create IPublishedContent from external data (i.e, fetch data from external system and populate IPublishedContent); but don't want to create actual node in Umbraco database. I want to manage templates in Umbraco application but want to populate RenderModel (and so IPublishContent) through external data which is not available in Umbraco cache.
My limitations -
I can not use any of the eCommerce addon as the website requires complex integration with backend ERP system.
I cant use uSync/uImpport kind of functionality to import all product data into Umbraco.
Hi Serhiy,
Unfortunately I haven't found any proper solution for this scenario. The way I am managing it for a while is I have created 2 projects- CMS & Functional and I am exposing top navigation and other templates through web api from CMS project and rendering Product pages from Functional project.
Not sure whether this information is useful but let me know if you want to know any more details.
I have seen and done myself pulling in data on front end using macros and partials, controllers and in early days using webforms usercontrols to display non Umbraco data. In the backend to edit that data creating custom trees and dashboard controls. Not sure why you want to populate IPublishedContent with your external data?
Guys, what is the best way to show products on Umbraco CMS page if the products are not stored in Umbraco DB, instead I want to *download it from external API?. Can you, please, recommend a way to do this? Maybe you can suggest a tutorial or example.
Extend Umbraco to populate data from external source
Hi,
I am working on a project to migrate a existing ecommerce website to Umbraco platform. The website has 3 distinct functional areas -
For Content part its straight forward; will use Umbraco platform to manage all content. For 3rd part - Functional part we will manage through custom controllers and route hijacking. But for product pages we have bit of challenge - we don't want to store product data in Umbraco instead we have another system which is responsible for maintaining product data.
So, coming to the real challenge we are experiencing - Is there any way in Umbraco through which we can create IPublishedContent from external data (i.e, fetch data from external system and populate IPublishedContent); but don't want to create actual node in Umbraco database. I want to manage templates in Umbraco application but want to populate RenderModel (and so IPublishContent) through external data which is not available in Umbraco cache.
My limitations -
Thanks in advance for any suggestions.
Regards, Nirmit
Have you found something on this subject? I have the same question.
Hi Serhiy, Unfortunately I haven't found any proper solution for this scenario. The way I am managing it for a while is I have created 2 projects- CMS & Functional and I am exposing top navigation and other templates through web api from CMS project and rendering Product pages from Functional project.
Not sure whether this information is useful but let me know if you want to know any more details.
Regards, Nirmit
Nirmit,
I have seen and done myself pulling in data on front end using macros and partials, controllers and in early days using webforms usercontrols to display non Umbraco data. In the backend to edit that data creating custom trees and dashboard controls. Not sure why you want to populate IPublishedContent with your external data?
Take a look this presentation on ecommerce with Umbraco by Novacell this site was insane http://stream.umbraco.org/video/11665495/custom-editors-and-super-speed-with
Regards
Ismail
Guys, what is the best way to show products on Umbraco CMS page if the products are not stored in Umbraco DB, instead I want to *download it from external API?. Can you, please, recommend a way to do this? Maybe you can suggest a tutorial or example.
Regards
Serhiy
Serhiy,
Create a razor macro or partial and write .net code in there to get it from your third party api and write it out.
@{ var myRemoteData = YourService.GetData(); foreach(var item in myRemoteData){
@item.Title
} }See completely made up code above but you get the picture.
Regards
Ismail
Isamil,
Thank you! I thought it's not a good idea to put such code in Razor, though.
Take a look at route hijacking https://our.umbraco.org/documentation/Reference/Templating/Mvc/custom-controllers and also for good working mvc starterkit with best practices see https://our.umbraco.org/projects/developer-tools/hybrid-framework/
Regards
Ismail
Hey Serhiy,
I would recommend checking out the two following blog posts by Shannon:
http://shazwazza.com/post/Custom-MVC-routing-in-Umbraco http://shazwazza.com/post/Custom-MVC-routes-within-the-Umbraco-pipeline
He talks about custom routes and virtual content which seems like it fits your scenario.
Cheers,
Tom
Thanks, guys, links you've sent are very helpful!
is working on a reply...