From fabf055387b09425f481b1e3a34cfbb341f55a97 Mon Sep 17 00:00:00 2001 From: "Alina-Magdalena Tincas (Umbraco HQ)" Date: Fri, 23 May 2025 13:23:12 +0200 Subject: [PATCH] fixed broken links for commerce v13 --- 13/umbraco-commerce/how-to-guides/add-item.md | 56 +++++++++---------- 13/umbraco-commerce/how-to-guides/overview.md | 2 +- .../key-concepts/product-bundles.md | 2 +- .../reference/stores/README.md | 2 +- 13/umbraco-commerce/release-notes/README.md | 2 +- .../upgrading/version-specific-upgrades.md | 2 +- 6 files changed, 33 insertions(+), 33 deletions(-) diff --git a/13/umbraco-commerce/how-to-guides/add-item.md b/13/umbraco-commerce/how-to-guides/add-item.md index cd74de7d3c4..e16e14f4764 100644 --- a/13/umbraco-commerce/how-to-guides/add-item.md +++ b/13/umbraco-commerce/how-to-guides/add-item.md @@ -4,7 +4,7 @@ description: How-To Guide to add an item to your cart. # Add item to Cart -To add an item to the cart, configure Umbraco with a store and add the necessary properties for interaction. Learn more by following the [Getting started with Umbraco Commerce: The Backoffice tutorial](../tutorials/getting-started-with-commerce). +To add an item to the cart, configure Umbraco with a store and add the necessary properties for interaction. Learn more by following the [Getting started with Umbraco Commerce](../getting-started/umbraco-configuration.md). You will need the front end to be set up to allow an item to be added to the cart. This can be done by adding a button to the front end to call the Action to add the item to the cart. @@ -30,30 +30,30 @@ var price = product.TryCalculatePrice().ResultOrThrow("Unable to calculate produ The code above does the following: -- You need to access the store to access the relevant properties for your product, such as price. The store has a fallback property allowing you to traverse the tree to find the store. -- You retrieve the product based on the store and a reference for the product. The 'productReference' comes from the Model which is a single product. -- The Product is returned as a ProductSnapshot which is Umbraco Commerce obtaining the page ID and carrying out necessary processes to bring in the data for further processing. -- Finally, you need to calculate the price which is then displayed without VAT. This can also be displayed with VAT. +* You need to access the store to access the relevant properties for your product, such as price. The store has a fallback property allowing you to traverse the tree to find the store. +* You retrieve the product based on the store and a reference for the product. The 'productReference' comes from the Model which is a single product. +* The Product is returned as a ProductSnapshot which is Umbraco Commerce obtaining the page ID and carrying out necessary processes to bring in the data for further processing. +* Finally, you need to calculate the price which is then displayed without VAT. This can also be displayed with VAT. To display this you need to add some markup or at least amend it to include a button to add an item. Add the following to the same file: ```csharp @using (Html.BeginUmbracoForm("AddToCart", "CartSurface")) { - @Html.Hidden("productReference", Model.Key.ToString()) -

@Model.Value("productTitle")

-

@Model.Value("productDescription")

+ @Html.Hidden("productReference", Model.Key.ToString()) +

@Model.Value("productTitle")

+

@Model.Value("productDescription")

-

Our price excluding VAT @price.WithoutTax.ToString("C0")

+

Our price excluding VAT @price.WithoutTax.ToString("C0")

- if (@Model.Value("stock") == 0) - { -

Sorry, out of stock

- } - else - { - - } + if (@Model.Value("stock") == 0) + { +

Sorry, out of stock

+ } + else + { + + } } ``` @@ -166,12 +166,12 @@ public IActionResult AddToBasket(CartDto cart) The code above does the following: -- The `store` variable is used to access the store to get the store ID. -- A try-catch block captures any errors that may occur when adding the item to the cart, including any validation errors. -- `order` is used to retrieve the current order if one exists or create a new order against the store found. In the Commerce API, everything is read-only for performance so you need to make it writable to add the product. -- `AddProduct` is called and `productReference` is passed along with the quantity. -- `SaveOrder` is called to save the order. -- `TempData` stores a message to be displayed to the user if the product has been added to the cart. +* The `store` variable is used to access the store to get the store ID. +* A try-catch block captures any errors that may occur when adding the item to the cart, including any validation errors. +* `order` is used to retrieve the current order if one exists or create a new order against the store found. In the Commerce API, everything is read-only for performance so you need to make it writable to add the product. +* `AddProduct` is called and `productReference` is passed along with the quantity. +* `SaveOrder` is called to save the order. +* `TempData` stores a message to be displayed to the user if the product has been added to the cart. {% hint style="warning" %} Umbraco Commerce uses the Unit of Work pattern to complete saving the item (`uow.Complete`). When retrieving or saving data ideally you would want the entire transaction to be committed. However, if there is an error nothing is changed on the database. @@ -187,12 +187,12 @@ Create a new partial view called `Feedback.cshtml`. @Html.ValidationSummary(true, "", new { @class = "danger" }) @{ - var success = TempData["SuccessFeedback"]?.ToString(); + var success = TempData["SuccessFeedback"]?.ToString(); - if (!string.IsNullOrWhiteSpace(success)) - { -
@success
- } + if (!string.IsNullOrWhiteSpace(success)) + { +
@success
+ } } ``` diff --git a/13/umbraco-commerce/how-to-guides/overview.md b/13/umbraco-commerce/how-to-guides/overview.md index 472ba99c910..542d9f7593b 100644 --- a/13/umbraco-commerce/how-to-guides/overview.md +++ b/13/umbraco-commerce/how-to-guides/overview.md @@ -8,5 +8,5 @@ In this section, we will provide a series of How-To Guides, showcasing how to pe ## Available guides - +
Migrate from Vendr to Umbraco Commercemigrate-from-vendr-to-umbraco-commerce
Configure SQLite supportconfigure-sqlite-support.md
Add item to Cartadd-item.md
Update Cartupdate-cart.md
Migrate from Vendr to Umbraco Commercemigrate-from-vendr-to-umbraco-commerce
Configure SQLite supportconfigure-sqlite-support.md
Add item to Cartadd-item.md
Update Cartupdate-cart.md
Delete item from Cartdelete-item.md
Limit Order Line Quantitylimit-orderline-quantity.md
Use an alternative database for Umbraco Commerce tablesuse-an-alternative-database-for-umbraco-commerce-tables.md
diff --git a/13/umbraco-commerce/key-concepts/product-bundles.md b/13/umbraco-commerce/key-concepts/product-bundles.md index 7e1b74db372..9465994d4d0 100644 --- a/13/umbraco-commerce/key-concepts/product-bundles.md +++ b/13/umbraco-commerce/key-concepts/product-bundles.md @@ -42,4 +42,4 @@ By adding sub-products to a bundle, Umbraco Commerce knows to automatically sum As you can imagine, product bundles could get rather large making it a little difficult to display them in the backoffice. Umbraco Commerce bundles order lines together in a collapsible user interface. This gives you a clear view of your orders whilst still being able to drill into the detail of the items purchased. -![Product bundles in the backoffice](../media/backback-office-bundles.png) +![Product bundles in the backoffice](../media/back-office-bundles.png) diff --git a/13/umbraco-commerce/reference/stores/README.md b/13/umbraco-commerce/reference/stores/README.md index 4731d2ab434..460b812eb61 100644 --- a/13/umbraco-commerce/reference/stores/README.md +++ b/13/umbraco-commerce/reference/stores/README.md @@ -79,7 +79,7 @@ Further store configuration can be achieved by setting up different categories o The available configuration options are: -* **Locations** - Defines different locations for a store. See [Locations reference documentation](broken-reference) for more details. +* **Locations** - Defines different locations for a store. * **Order Statuses** - Defines the order statuses to be used by a store. * **Shipping Methods** - Defines the different shipping options available in the store. See [Shipping reference documentation](../shipping/) for more details. * **Payment Methods** - Defines the different payment options available in the store. diff --git a/13/umbraco-commerce/release-notes/README.md b/13/umbraco-commerce/release-notes/README.md index d0e85f68e0d..4b986080cc2 100644 --- a/13/umbraco-commerce/release-notes/README.md +++ b/13/umbraco-commerce/release-notes/README.md @@ -9,7 +9,7 @@ In this section, we have summarized the changes to Umbraco Commerce that were re If there are any breaking changes or other issues to be aware of when upgrading they are also noted here. {% hint style="info" %} -If you are upgrading to a new major version, check the breaking changes in the [Version Specific Upgrade Notes](upgrading/version-specific-upgrades.md) article. +If you are upgrading to a new major version, check the breaking changes in the [Version Specific Upgrade Notes](../upgrading/version-specific-upgrades.md) article. {% endhint %} ## Release History diff --git a/13/umbraco-commerce/upgrading/version-specific-upgrades.md b/13/umbraco-commerce/upgrading/version-specific-upgrades.md index b24cb475b5f..0ee9c312a9b 100644 --- a/13/umbraco-commerce/upgrading/version-specific-upgrades.md +++ b/13/umbraco-commerce/upgrading/version-specific-upgrades.md @@ -8,7 +8,7 @@ description: >- This page covers specific upgrade documentation for when migrating to major 13 of Umbraco Commerce. {% hint style="info" %} -If you are upgrading to a new minor or patch version, you can find information about the breaking changes in the [Release Notes](../release-notes.md) article. +If you are upgrading to a new minor or patch version, you can find information about the breaking changes in the [Release Notes](../release-notes/README.md) article. {% endhint %} ## Version Specific Upgrade Notes History