-
Notifications
You must be signed in to change notification settings - Fork 811
Add umbraco commerce product feed package #6007
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
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 6652591
Merge branch 'add-buckaroo-payment-provider-docs'
umbracotrd 2269e69
Update commerce-add-ons/packages/README.md
alina-tincas ca5aa74
Update commerce-add-ons/packages/product-feeds/README.md
alina-tincas 32e374d
Update commerce-add-ons/packages/product-feeds/README.md
alina-tincas 6b538d7
Update commerce-add-ons/packages/product-feeds/README.md
alina-tincas ddd5514
Update commerce-add-ons/packages/product-feeds/README.md
alina-tincas 19dac8a
Update commerce-add-ons/packages/product-feeds/extending.md
alina-tincas 0002b56
Update commerce-add-ons/packages/product-feeds/extending.md
alina-tincas 99e20ab
Update commerce-add-ons/packages/product-feeds/README.md
alina-tincas 78a2dea
Update commerce-add-ons/packages/product-feeds/extending.md
alina-tincas 460dfa0
restructure product feeds plugin docs
umbracotrd 184c36e
fix vale warning
umbracotrd 5b63278
minor tweaks
umbracotrd de458d8
update summary page
umbracotrd 688368c
Use shorter sentence!
umbracotrd 43e07d4
Update commerce-add-ons/packages/product-feeds/README.md
alina-tincas 529d070
Update commerce-add-ons/packages/product-feeds/extending.md
alina-tincas e253e01
Update commerce-add-ons/packages/product-feeds/README.md
alina-tincas 833bf6c
Update commerce-add-ons/packages/product-feeds/installation.md
alina-tincas b3c93c6
Update commerce-add-ons/packages/product-feeds/README.md
alina-tincas f96b8a0
Update commerce-add-ons/packages/product-feeds/README.md
alina-tincas a19f9f2
Update commerce-add-ons/packages/product-feeds/README.md
alina-tincas 076e2d6
Update commerce-add-ons/packages/product-feeds/installation.md
alina-tincas 256a067
Update commerce-add-ons/packages/product-feeds/installation.md
alina-tincas 6b61572
Update commerce-add-ons/packages/product-feeds/installation.md
alina-tincas e999131
Update upgrading section
umbracotrd 75a6318
Update commerce-add-ons/packages/product-feeds/installation.md
alina-tincas 17fbc9a
Update commerce-add-ons/packages/product-feeds/installation.md
alina-tincas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. | ||
|
|
||
alina-tincas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 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) | ||
umbracotrd marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
alina-tincas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| 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. | ||
|
|
||
|  | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 => { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will fix this code block after am merging it in.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. | ||
|
|
||
|  | ||
|
|
||
| 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. | ||
|
|
||
|  | ||
|
|
||
| 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. | ||
|
|
||
|  | ||
|
|
||
| **Google Merchant Center Feed** sample: | ||
|
|
||
|  | ||
|
|
||
| ## 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.
Binary file added
BIN
+82.4 KB
commerce-add-ons/packages/product-feeds/media/google-merchant-center-feed.png
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.
Binary file added
BIN
+62.7 KB
commerce-add-ons/packages/product-feeds/media/product-feed-list-page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+51.6 KB
...erce-add-ons/packages/product-feeds/media/property-value-extractor-dropdown.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.