https://github.com/geta/epi.commerce.extensions
https://github.com/geta/epi.commerce.extensions
commerce
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/geta/epi.commerce.extensions
- Owner: Geta
- Created: 2015-06-29T16:21:44.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2023-04-16T15:30:23.000Z (about 2 years ago)
- Last Synced: 2025-02-08T17:44:48.433Z (3 months ago)
- Topics: commerce
- Language: C#
- Size: 85.9 KB
- Stars: 1
- Watchers: 9
- Forks: 2
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Geta.EPi.Commerce.Extensions
* Master
,branch:master/statusIcon)
[](https://msdn.microsoft.com/en-us/library/w0x726c2%28v=vs.110%29.aspx)
[](http://world.episerver.com/commerce/)## Description
Helpers and extension methods for Episerver Commerce.
```
Install-Package Geta.EPi.Commerce.Extensions
```## Features
#### Extension methods for:
* **EPiServer.Commerce.Catalog.ContentTypes.IAssetContainer** - *get assets of Episerver's default group*
* **EPiServer.Commerce.Catalog.ContentTypes.BundleContent** - *gets all bundle entries for a bundle*
* **EPiServer.Commerce.Catalog.ContentTypes.EntryContentBase** - *gets the parent packages, bundles and categories*
* **EPiServer.Commerce.Order.ILineItem** - *gets Url, FullUrl and Thumbnailurl of an EPiServer.Commerce.Catalog.ContentTypes.EntryContentBase*
* **EPiServer.Commerce.Catalog.ContentTypes** - *gets the parent categories*
* **EPiServer.Commerce.Order.IOrderGroup** - *converts decimal to Mediachase.Commerce.Money*
* **EPiServer.Commerce.Catalog.ContentTypes.PackageContent** - *gets package entries for a package*
* **Mediachase.Commerce.Pricing.IPriceDetailService** - *saves the MSRP price*
* **Mediachase.Commerce.Pricing.IPriceService** - *gets the previous price and load the Msrp.*
* **EPiServer.Commerce.Catalog.ContentTypes.ProductContent** - *gets all variants/SKUs for a product*
* **EPiServer.Commerce.Catalog.ContentTypes.VariationContent** - *get the url and parent products*## Examples
### Asset
```csharp
string image = variant.GetDefaultAsset();
IEnumerable images = variation.GetAssets();
```### Bundle content
```csharp
IEnumerable GetBundleEntries(this BundleContent bundleContent);
IEnumerable GetBundleEntries(this BundleContent bundleContent, IRelationRepository relationRepository);
```### Entry content
```csharp
IEnumerable GetPackages(this EntryContentBase entryContent);
IEnumerable GetPackages(this EntryContentBase entryContent, IRelationRepository relationRepository);IEnumerable GetBundles(this EntryContentBase entryContent);
IEnumerable GetBundles(this EntryContentBase entryContent, IRelationRepository relationRepository);IEnumerable GetParentCategories(this EntryContentBase entryContent);
IEnumerable GetParentCategories(this EntryContentBase entryContent, IRelationRepository relationRepository);
```### LineItem
```csharp
string url = lineItem.GetUrl();
string fullUrl = lineItem.GetFullUrl();
string thumbnail = lineItem.GetThumbnailUrl();
```## Cart
```csharp
void AddValidationIssues(this Dictionary> issues, ILineItem lineItem, ValidationIssue issue);
bool HasItemBeenRemoved(this Dictionary> issuesPerLineItem, ILineItem lineItem);
```### Node content
```csharp
IEnumerable GetParentCategories(this NodeContent nodeContent);
IEnumerable GetParentCategories(this NodeContent nodeContent, IRelationRepository relationRepository)
```### Package content
```csharp
IEnumerable GetPackageEntries(this PackageContent packageContent);
IEnumerable GetPackageEntries(this PackageContent packageContent, IRelationRepository relationRepository);
```### Price detail service
[MSRP](https://en.wikipedia.org/wiki/List_price) (list price/manufacturer's suggested retail price)
```csharp
SaveMsrp(this IPriceDetailService priceDetailService, ContentReference contentLink, MarketId marketId, Currency currency, decimal amount);
```### Price service
[MSRP](https://en.wikipedia.org/wiki/List_price) (list price/manufacturer's suggested retail price)
```csharp
IPriceValue LoadMsrp(this IPriceService priceService, ContentReference contentLink, MarketId marketId, Currency currency);// Example usage: Was 1000 now only 800
IPriceValue GetPreviousPrice(this IPriceService priceService, ContentReference contentLink, MarketId marketId, Currency currency);
```### Product content
```csharp
IEnumerable GetVariations(this ProductContent productContent);
IEnumerable GetVariations(this ProductContent productContent, IRelationRepository relationRepository);
```### VariantContent
```csharp
string url = variant.GetUrl();
IEnumerable GetProducts(this VariationContent variationContent, IRelationRepository relationRepository);
IEnumerable GetProducts(this VariationContent variationContent);
```## Package maintainer
https://github.com/frederikvig