Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3a9e615
Add umbraco commerce product feed package
umbracotrd Apr 5, 2024
6652591
Merge branch 'add-buckaroo-payment-provider-docs'
umbracotrd Apr 5, 2024
2269e69
Update commerce-add-ons/packages/README.md
alina-tincas Apr 8, 2024
ca5aa74
Update commerce-add-ons/packages/product-feeds/README.md
alina-tincas Apr 8, 2024
32e374d
Update commerce-add-ons/packages/product-feeds/README.md
alina-tincas Apr 8, 2024
6b538d7
Update commerce-add-ons/packages/product-feeds/README.md
alina-tincas Apr 8, 2024
ddd5514
Update commerce-add-ons/packages/product-feeds/README.md
alina-tincas Apr 8, 2024
19dac8a
Update commerce-add-ons/packages/product-feeds/extending.md
alina-tincas Apr 8, 2024
0002b56
Update commerce-add-ons/packages/product-feeds/extending.md
alina-tincas Apr 8, 2024
99e20ab
Update commerce-add-ons/packages/product-feeds/README.md
alina-tincas Apr 8, 2024
78a2dea
Update commerce-add-ons/packages/product-feeds/extending.md
alina-tincas Apr 8, 2024
460dfa0
restructure product feeds plugin docs
umbracotrd Apr 9, 2024
184c36e
fix vale warning
umbracotrd Apr 9, 2024
5b63278
minor tweaks
umbracotrd Apr 9, 2024
de458d8
update summary page
umbracotrd Apr 9, 2024
688368c
Use shorter sentence!
umbracotrd Apr 9, 2024
43e07d4
Update commerce-add-ons/packages/product-feeds/README.md
alina-tincas Apr 9, 2024
529d070
Update commerce-add-ons/packages/product-feeds/extending.md
alina-tincas Apr 9, 2024
e253e01
Update commerce-add-ons/packages/product-feeds/README.md
alina-tincas Apr 9, 2024
833bf6c
Update commerce-add-ons/packages/product-feeds/installation.md
alina-tincas Apr 9, 2024
b3c93c6
Update commerce-add-ons/packages/product-feeds/README.md
alina-tincas Apr 9, 2024
f96b8a0
Update commerce-add-ons/packages/product-feeds/README.md
alina-tincas Apr 9, 2024
a19f9f2
Update commerce-add-ons/packages/product-feeds/README.md
alina-tincas Apr 9, 2024
076e2d6
Update commerce-add-ons/packages/product-feeds/installation.md
alina-tincas Apr 9, 2024
256a067
Update commerce-add-ons/packages/product-feeds/installation.md
alina-tincas Apr 9, 2024
6b61572
Update commerce-add-ons/packages/product-feeds/installation.md
alina-tincas Apr 9, 2024
e999131
Update upgrading section
umbracotrd Apr 9, 2024
75a6318
Update commerce-add-ons/packages/product-feeds/installation.md
alina-tincas Apr 9, 2024
17fbc9a
Update commerce-add-ons/packages/product-feeds/installation.md
alina-tincas Apr 9, 2024
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
4 changes: 3 additions & 1 deletion commerce-add-ons/packages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ description: Find detailed documentation for each of the official packages avail

Below is an overview of the different add-ons that you can install into your Umbraco Commerce implementation. All add-ons are meant to extend the features and functionality already available in the core product.

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Checkout</strong></td><td>Use this package to add additional functionality to the checkout flow for your Umbraco Commerce implementation.</td><td><a href="checkout/">checkout</a></td></tr><tr><td><strong>Deploy</strong></td><td>This package is used to enable the use of Umbraco Deploy with your Umbraco Commerce implementation.</td><td><a href="deploy/">deploy</a></td></tr></tbody></table>
<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Checkout</strong></td><td>Use this package to add additional functionality to the checkout flow for your Umbraco Commerce implementation.</td><td><a href="checkout/">checkout</a></td></tr><tr><td><strong>Deploy</strong></td><td>This package is used to enable the use of Umbraco Deploy with your Umbraco Commerce implementation.</td><td><a href="deploy/">deploy</a></td></tr></tbody>
<tr><td><strong>Product feeds</strong></td><td>This plugin is a XML feed generator plugin which extracts product data from Umbraco node and generate structured XML feed.</td><td><a href="product-feeds/">Product Feeds</a></td></tr>
</table>

## Using These Docs

Expand Down
7 changes: 7 additions & 0 deletions commerce-add-ons/packages/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,10 @@
* [Installation](deploy/installation.md)
* [Deploying Changes](deploy/deploying-changes.md)
* [Release Notes](deploy/release-notes.md)

## Product Feeds

* [Overview](product-feeds/README.md)
* [Installation](product-feeds/installation.md)
* [Extending the plugin](product-feeds/extending.md)
* [Release Notes](https://github.com/umbraco/Umbraco.Commerce.ProductFeeds/releases)
18 changes: 18 additions & 0 deletions commerce-add-ons/packages/product-feeds/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
description: >-
This is the documentation for the Product Feed package for Umbraco Commerce.
---

After building up your commerce website, you can expand your product reach and show your products to a larger audience with product feeds. Umbraco Commerce Product Feed is a free and open-source add-on for Umbraco Commerce that helps you generate the XML files that are used in services like Google Merchant Center.

`Umbraco Commerce Product Feeds` package is an XML feed generator plugin that simplifies the creation of structured XML files. It automatically extracts product data from Umbraco nodes, organizes it according to standards and also allows you to add more information to the feed.

Current supported feed template:
- `Google Merchant Center` feed template.

In this section, we will guide you through the key steps necessary to get you started with the Product Feeds package for Umbraco Commerce.

It is assumed that before we begin you already have an Umbraco website configured and Umbraco Commerce installed and a store set up. If you are not at this stage yet, please read the [core Umbraco Commerce documentation](https://docs.umbraco.com/umbraco-commerce/) to learn how to get started.
# Useful links
- [Umbraco Commerce Product Feed source code](https://github.com/umbraco/Umbraco.Commerce.ProductFeeds)
- [Umbraco Commerce Product Feed issue tracker](https://github.com/umbraco/Umbraco.Commerce.ProductFeeds/issues)
32 changes: 32 additions & 0 deletions commerce-add-ons/packages/product-feeds/extending.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
description: >-
Learn how to extend the plugin by adding a custom property value extractor.
---

# Extending the plugin

In this article, you can find an example of extending the plugin by adding a custom property value extractor.

## Add a custom property value extractor
When a default property value extractor does not suit your need, you can create your own extractor to *extract* the property value yourself.

For example, when a product's stock value is `0`, `Google Merchant Feed` desired value is `out_of_stock`. In that case, we have [`DefaultGoogleAvailabilityValueExtractor.cs`](https://github.com/umbraco/Umbraco.Commerce.ProductFeeds/blob/main/src/Umbraco.Commerce.ProductFeeds.Core/Features/PropertyValueExtractors/Implementations/DefaultGoogleAvailabilityValueExtractor.cs) to do the conversion from `0` to `out_of_stock`.

You can often create a new implementation of `ISingleValuePropertyExtractor` or rarely `IMultipleValuePropertyExtractor`.

This plugin uses [Collection Builder pattern](https://docs.umbraco.com/umbraco-cms/implementation/composing#example-modifying-collections) which is commonly used in Umbraco. You can use these two extension methods during application initialization to add your value extractors.

```c#
// IUmbracoBuilder builder;
builder.SingleValuePropertyExtractors()
.Append<DefaultSingleValuePropertyExtractor>()
.Append<DefaultGoogleAvailabilityValueExtractor>()
.Append<DefaultMediaPickerPropertyValueExtractor>();

builder.MultipleValuePropertyExtractors()
.Append<DefaultMultipleMediaPickerPropertyValueExtractor>();
```

Afterwards, your extractor name should show up in the dropdown under `Property And Node Mapping` section.

![property value extractor dropdown](./media/property-value-extractor-dropdown.png)
47 changes: 47 additions & 0 deletions commerce-add-ons/packages/product-feeds/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
description: >-
Detailed instructions on how to install and configure Product Feeds into your
Umbraco Commerce implementation.
---

The Product Feeds package can be installed directly into your project's code base using NuGet packages.

# Getting started

Below you can find some steps on installing the package using NuGet and getting started with implementing the Product Feeds into your Umbraco Commerce store.


1. Install the package from [NuGet](https://www.nuget.org/packages/Umbraco.Commerce.ProductFeeds/)

2. Locate where you [register the dependencies](https://docs.umbraco.com/umbraco-commerce/key-concepts/umbraco-commerce-builder#registering-dependencies) `IUmbracoBuilder.AddUmbracoCommerce()` and add a call to `IUmbracoCommerceBuilder.AddCommerceProductFeeds()` to add this plugin to your website.

umbracoBuilder.AddUmbracoCommerce(ucBuilder => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I will fix this code block after am merging it in.

Copy link
Contributor

Choose a reason for hiding this comment

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

done!

ucBuilder.AddCommerceProductFeeds(); // add this line
}

3. Open your store's setting page in the backoffice.

4. Click on `Product Feed` section.

![product feed list page](./media/product-feed-list-page.png)

5. Click on `Create Product Feed` button and fill in the feed settings. Mandatory fields are marked with a red asterisk (*). You can add more product data by adding new mappings in `Property And Node Mapping` section.

![feed setting page](./media/feed-setting-page.png)

6. After saving the feed setting, a link to access the feed will show up under `Feed URL Segment` field and at the bottom of the page.

![open feed link](./media/open-feed-link.png)

**Google Merchant Center Feed** sample:

![google merchant center feed](./media/google-merchant-center-feed.png)

## Upgrading

{% hint style="info" %}
Even though the package modifies only the `umbracoCommerceProductFeedSetting` table,
it is always advisable to take a complete backup of your site/database before upgrading.
{% endhint %}

The Product Feeds package uses a database migration for both installs and upgrades. Upgrading is generally a case of installing the latest version via NuGet over the existing package and restarting the website.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.