Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions 17/umbraco-commerce/key-concepts/product-adapters.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@

```

{% hint style="info" %}
`IProductSnapshot` is the base model for what Umbraco Commerce needs. If you want to include images or measurements (if you for example need to do shipping based on weight), then there are other extended IProductSnapshot interfaces you can return.

Check warning on line 75 in 17/umbraco-commerce/key-concepts/product-adapters.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐢 [UmbracoDocs.SentenceLength] Write shorter sentences (less than 25 words). For content inside note or warning blocks, add blank lines around the content. Raw Output: {"message": "[UmbracoDocs.SentenceLength] Write shorter sentences (less than 25 words). For content inside note or warning blocks, add blank lines around the content.", "location": {"path": "17/umbraco-commerce/key-concepts/product-adapters.md", "range": {"start": {"line": 75, "column": 71}}}, "severity": "WARNING"}
`IProductSnapshotWithImage`, `IProductSnapshotWithCategories` & `IProductSnapshotWithMeasurements` are all valid return types that allows you to enrich the product model.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if there are in fact more available interfaces - you probably know that better than me ;)
But how about we use a list here? πŸ€”

Suggested change
`IProductSnapshotWithImage`, `IProductSnapshotWithCategories` & `IProductSnapshotWithMeasurements` are all valid return types that allows you to enrich the product model.
Valid interfaces include, but are not limited to:
* `IProductSnapshotWithImage`
* `IProductSnapshotWithCategories`
* `IProductSnapshotWithMeasurements`

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are all the ones I could find, which also makes mentioning it being not limited to them a bit misleading πŸ™‚

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good!
And how about the change suggestions I made? 🀞

{% endhint %}

## Support editable carts

To allow Umbraco Commerce to search for products/variants to add to a cart via the backoffice, Product Adapters can implement 3 additional methods. This can also be done to support editable carts.
Expand Down
Loading