Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/geta/geta.omnium
Integration between Episerver and Omnium
https://github.com/geta/geta.omnium
episerver omnium
Last synced: 7 days ago
JSON representation
Integration between Episerver and Omnium
- Host: GitHub
- URL: https://github.com/geta/geta.omnium
- Owner: Geta
- License: apache-2.0
- Created: 2019-03-18T13:38:19.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-07T16:57:08.000Z (about 2 years ago)
- Last Synced: 2023-04-10T16:50:41.295Z (over 1 year ago)
- Topics: episerver, omnium
- Language: C#
- Homepage:
- Size: 33.7 MB
- Stars: 0
- Watchers: 19
- Forks: 0
- Open Issues: 37
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Omnium OMS
* Master
![](http://tc.geta.no/app/rest/builds/buildType:(id:GetaPackages_GetaOmnium_00ci),branch:master/statusIcon)
* Develop
![](http://tc.geta.no/app/rest/builds/buildType:(id:GetaPackages_GetaOmnium_00ci),branch:develop/statusIcon)## Description
Integration package for [Omnium OMS](https://www.omnium.no/?lang=en) and [Episerver Commerce](https://world.episerver.com).## Features
* Scheduled job for syncing orders to Omnium
* Scheduled job for synching orders back to Episerver## How to get started?
* ``install-package Geta.Omnium``### Configuration
```
```
### Implement IOmniumImportSettings
Create class that implements the ``IOmniumImportSettings`` interface.
```
public class OmniumImportSettings : IOmniumImportSettings
{
private readonly IContentRepository _contentRepository;
private readonly ISiteDefinitionRepository _siteDefinitionRepository;public OmniumImportSettings(
IContentRepository contentRepository,
ISiteDefinitionRepository siteDefinitionRepository)
{
_contentRepository = contentRepository;
_siteDefinitionRepository = siteDefinitionRepository;
}public void LogSyncFromOmniumDate(DateTime dateTime)
{
throw new NotImplementedException();
}public DateTime? GetLastSyncFromOmniumDate()
{
throw new NotImplementedException();
}
}
```Register the implementation.
``` services.AddTransient(); ```
Usually the last synced data would be stored on a settings page. By doing this the date can be modified in the CMS.
## Override default factories
For synching orders to Omnium the ``IPurchaseOrder`` object is mapped to a ``OmniunOrder``. To override the default functionality create a class and override from the ``DefaultOmniumOrderFactory`` class.```
public class SiteOmniumOrderFactory : DefaultOmniumOrderFactory
{
public SiteOmniumOrderFactory(
IShippingCalculator shippingCalculator,
IMarketService marketService,
CultureResolver cultureResolver,
ITaxUtility taxUtility,
ReferenceConverter referenceConverter,
IContentRepository contentRepository,
IPaymentManagerFacade paymentManagerFacade,
ILineItemCalculator lineItemCalculator,
IOrderFormCalculator orderFormCalculator,
IOrderGroupCalculator orderGroupCalculator,
IShipmentManagerFacade shipmentManagerFacade,
IPromotionEngine promotionEngine)
: base(shippingCalculator, marketService, cultureResolver, taxUtility, referenceConverter, contentRepository, paymentManagerFacade, lineItemCalculator, orderFormCalculator, orderGroupCalculator, shipmentManagerFacade, promotionEngine)
{
}
public override OmniumOrder MapOrder(IPurchaseOrder purchaseOrder, IOrderForm orderForm, IShipment[] shipments)
{
var omniumOrder = base.MapOrder(purchaseOrder, orderForm, shipments);
omniumOrder.StoreId = "123";
omniumOrder.MarketId = "NOR";return omniumOrder;
}
}
```And register the implementation.
``` services.AddTransient(); ```
Same can be done for the ``DefaultEpiOrderFactory`` for customizing the default functionality of mapping an OmniumOrder to a IPurchaseOrder.
## Package maintainer
https://github.com/marijorg## Changelog
[Changelog](CHANGELOG.md)