You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Lookup a product by productVariantReference and convert to IProductSnapshot
@@ -33,9 +28,9 @@ public class MyCustomProductAdapter : IProductAdapter
33
28
34
29
```
35
30
36
-
All Product Adapters implement the `IProductAdapter` interface which requires three method implementations:
31
+
All Product Adapters implement the `ProductAdapterBase` base class which requires two method implementations:
37
32
38
-
*Two`GetProductSnapshot`methods that retrieve a Product Snapshot for either a product or product variant by reference parameters.
33
+
*A`GetProductSnapshot`method that retrieves a Product Snapshot for either a product or a product variant by reference parameters.
39
34
* A `TryGetProductReference` method which retrieves a product/variant reference for a product that belongs to a given `storeId` and has the given `sku`.
40
35
41
36
A Product Snapshot consists of the following properties in order to present a Product to Umbraco Commerce in a standard way.
@@ -168,7 +163,11 @@ public interface IProductVariantSnapshot
168
163
169
164
## Registering a Product Adapter
170
165
171
-
typeProduct Adapters are [registered via the IUmbracoCommerceBuilder](umbraco-commerce-builder.md) interface using the `AddUnique<IProductAdapter, TReplacementAdapter>()` method on the `Services` property. The `TReplacementAdapter` parameter is the type of our custom Product Adapter implementation.
166
+
Product Adapters are [registered via the IUmbracoCommerceBuilder](umbraco-commerce-builder.md) interface using the `AddUnique<IProductAdapter, TReplacementAdapter>()` method on the `Services` property. The `TReplacementAdapter` parameter is the type of our custom Product Adapter implementation.
167
+
168
+
{% hint style="info" %}
169
+
It is important that you register your product adapter via the `IProductAdapter` interface rather than the `ProductAdapterBase` class. If the `IProductAdapter` displays an obsolete warning, kindly ignore this. It is used to promote the use of the `ProductAdapterBase` base class.
// Try lookup a product / variant reference by store + sku
31
26
}
32
27
}
33
28
34
29
```
35
30
36
-
All Product Adapters implement the `IProductAdapter` interface which requires three method implementations:
31
+
All Product Adapters implement the `ProductAdapterBase` base class which requires two method implementations:
37
32
38
-
*Two`GetProductSnapshotAsync`methods that retrieve a Product Snapshot for either a product or product variant by reference parameters.
33
+
*A`GetProductSnapshotAsync`method that retrieves a Product Snapshot for either a product or a product variant by reference parameters.
39
34
* A `TryGetProductReferenceAsync` method which retrieves a product/variant reference for a product that belongs to a given `storeId` and has the given `sku`.
40
35
41
36
A Product Snapshot consists of the following properties in order to present a Product to Umbraco Commerce in a standard way.
@@ -168,7 +163,11 @@ public interface IProductVariantSnapshot
168
163
169
164
## Registering a Product Adapter
170
165
171
-
typeProduct Adapters are [registered via the IUmbracoCommerceBuilder](umbraco-commerce-builder.md) interface using the `AddUnique<IProductAdapter, TReplacementAdapter>()` method on the `Services` property. The `TReplacementAdapter` parameter is the type of our custom Product Adapter implementation.
166
+
Product Adapters are [registered via the IUmbracoCommerceBuilder](umbraco-commerce-builder.md) interface using the `AddUnique<IProductAdapter, TReplacementAdapter>()` method on the `Services` property. The `TReplacementAdapter` parameter is the type of our custom Product Adapter implementation.
167
+
168
+
{% hint style="info" %}
169
+
It is important that you register your product adapter via the `IProductAdapter` interface rather than the `ProductAdapterBase` class. If the `IProductAdapter` displays an obsolete warning, kindly ignore this. It is used to promote the use of the `ProductAdapterBase` base class.
// Try lookup a product / variant reference by store + sku
31
26
}
32
27
}
33
28
34
29
```
35
30
36
-
All Product Adapters implement the `IProductAdapter` interface which requires three method implementations:
31
+
All Product Adapters implement the `ProductAdapterBase` base class which requires two method implementations:
37
32
38
-
*Two`GetProductSnapshotAsync`methods that retrieve a Product Snapshot for either a product or product variant by reference parameters.
33
+
*A`GetProductSnapshotAsync`method that retrieves a Product Snapshot for either a product or a product variant by reference parameters.
39
34
* A `TryGetProductReferenceAsync` method which retrieves a product/variant reference for a product that belongs to a given `storeId` and has the given `sku`.
40
35
41
36
A Product Snapshot consists of the following properties in order to present a Product to Umbraco Commerce in a standard way.
@@ -168,7 +163,11 @@ public interface IProductVariantSnapshot
168
163
169
164
## Registering a Product Adapter
170
165
171
-
typeProduct Adapters are [registered via the IUmbracoCommerceBuilder](umbraco-commerce-builder.md) interface using the `AddUnique<IProductAdapter, TReplacementAdapter>()` method on the `Services` property. The `TReplacementAdapter` parameter is the type of our custom Product Adapter implementation.
166
+
Product Adapters are [registered via the IUmbracoCommerceBuilder](umbraco-commerce-builder.md) interface using the `AddUnique<IProductAdapter, TReplacementAdapter>()` method on the `Services` property. The `TReplacementAdapter` parameter is the type of our custom Product Adapter implementation.
167
+
168
+
{% hint style="info" %}
169
+
It is important that you register your product adapter via the `IProductAdapter` interface rather than the `ProductAdapterBase` class. If the `IProductAdapter` displays an obsolete warning, kindly ignore this. It is used to promote the use of the `ProductAdapterBase` base class.
0 commit comments