Skip to content

Commit fabf055

Browse files
committed
fixed broken links for commerce v13
1 parent b5406da commit fabf055

File tree

6 files changed

+33
-33
lines changed

6 files changed

+33
-33
lines changed

13/umbraco-commerce/how-to-guides/add-item.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: How-To Guide to add an item to your cart.
44

55
# Add item to Cart
66

7-
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).
7+
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).
88

99
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.
1010

@@ -30,30 +30,30 @@ var price = product.TryCalculatePrice().ResultOrThrow("Unable to calculate produ
3030

3131
The code above does the following:
3232

33-
- 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.
34-
- 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.
35-
- 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.
36-
- Finally, you need to calculate the price which is then displayed without VAT. This can also be displayed with VAT.
33+
* 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.
34+
* 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.
35+
* 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.
36+
* Finally, you need to calculate the price which is then displayed without VAT. This can also be displayed with VAT.
3737

3838
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:
3939

4040
```csharp
4141
@using (Html.BeginUmbracoForm("AddToCart", "CartSurface"))
4242
{
43-
@Html.Hidden("productReference", Model.Key.ToString())
44-
<h1>@Model.Value<string>("productTitle")</h1>
45-
<h2>@Model.Value<string>("productDescription")</h2>
43+
@Html.Hidden("productReference", Model.Key.ToString())
44+
<h1>@Model.Value<string>("productTitle")</h1>
45+
<h2>@Model.Value<string>("productDescription")</h2>
4646

47-
<p>Our price excluding VAT <strong>@price.WithoutTax.ToString("C0") </strong></p>
47+
<p>Our price excluding VAT <strong>@price.WithoutTax.ToString("C0") </strong></p>
4848

49-
if (@Model.Value<int>("stock") == 0)
50-
{
51-
<p>Sorry, out of stock</p>
52-
}
53-
else
54-
{
55-
<button type="submit">Add to Basket</button>
56-
}
49+
if (@Model.Value<int>("stock") == 0)
50+
{
51+
<p>Sorry, out of stock</p>
52+
}
53+
else
54+
{
55+
<button type="submit">Add to Basket</button>
56+
}
5757

5858
}
5959
```
@@ -166,12 +166,12 @@ public IActionResult AddToBasket(CartDto cart)
166166

167167
The code above does the following:
168168

169-
- The `store` variable is used to access the store to get the store ID.
170-
- A try-catch block captures any errors that may occur when adding the item to the cart, including any validation errors.
171-
- `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.
172-
- `AddProduct` is called and `productReference` is passed along with the quantity.
173-
- `SaveOrder` is called to save the order.
174-
- `TempData` stores a message to be displayed to the user if the product has been added to the cart.
169+
* The `store` variable is used to access the store to get the store ID.
170+
* A try-catch block captures any errors that may occur when adding the item to the cart, including any validation errors.
171+
* `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.
172+
* `AddProduct` is called and `productReference` is passed along with the quantity.
173+
* `SaveOrder` is called to save the order.
174+
* `TempData` stores a message to be displayed to the user if the product has been added to the cart.
175175

176176
{% hint style="warning" %}
177177
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`.
187187
@Html.ValidationSummary(true, "", new { @class = "danger" })
188188

189189
@{
190-
var success = TempData["SuccessFeedback"]?.ToString();
190+
var success = TempData["SuccessFeedback"]?.ToString();
191191

192-
if (!string.IsNullOrWhiteSpace(success))
193-
{
194-
<div class="success">@success</div>
195-
}
192+
if (!string.IsNullOrWhiteSpace(success))
193+
{
194+
<div class="success">@success</div>
195+
}
196196
}
197197
```
198198

13/umbraco-commerce/how-to-guides/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ In this section, we will provide a series of How-To Guides, showcasing how to pe
88

99
## Available guides
1010

11-
<table data-card-size="large" data-view="cards"><thead><tr><th align="center"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td align="center">Migrate from Vendr to Umbraco Commerce</td><td><a href="migrate-from-vendr-to-umbraco-commerce/">migrate-from-vendr-to-umbraco-commerce</a></td></tr><tr><td align="center">Configure SQLite support</td><td><a href="configure-sqlite-support.md">configure-sqlite-support.md</a></td></tr><tr><td align="center">Add item to Cart</td><td><a href="add-item.md">add-item.md</a></td></tr><tr><td align="center">Update Cart</td><td><a href="update-cart.md">update-cart.md</a></td></tr>
11+
<table data-card-size="large" data-view="cards"><thead><tr><th align="center"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td align="center">Migrate from Vendr to Umbraco Commerce</td><td><a href="../upgrading/migrate-from-vendr-to-umbraco-commerce/README.md">migrate-from-vendr-to-umbraco-commerce</a></td></tr><tr><td align="center">Configure SQLite support</td><td><a href="configure-sqlite-support.md">configure-sqlite-support.md</a></td></tr><tr><td align="center">Add item to Cart</td><td><a href="add-item.md">add-item.md</a></td></tr><tr><td align="center">Update Cart</td><td><a href="update-cart.md">update-cart.md</a></td></tr>
1212
<tr><td align="center">Delete item from Cart</td><td><a href="delete-item.md">delete-item.md</a></td></tr><tr><td align="center">Limit Order Line Quantity</td><td><a href="limit-orderline-quantity.md">limit-orderline-quantity.md</a></td></tr><tr><td align="center">Use an alternative database for Umbraco Commerce tables</td><td><a href="use-an-alternative-database-for-umbraco-commerce-tables.md">use-an-alternative-database-for-umbraco-commerce-tables.md</a></td></tr></tbody></table>

13/umbraco-commerce/key-concepts/product-bundles.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ By adding sub-products to a bundle, Umbraco Commerce knows to automatically sum
4242

4343
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.
4444

45-
![Product bundles in the backoffice](../media/backback-office-bundles.png)
45+
![Product bundles in the backoffice](../media/back-office-bundles.png)

13/umbraco-commerce/reference/stores/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Further store configuration can be achieved by setting up different categories o
7979

8080
The available configuration options are:
8181

82-
* **Locations** - Defines different locations for a store. See [Locations reference documentation](broken-reference) for more details.
82+
* **Locations** - Defines different locations for a store.
8383
* **Order Statuses** - Defines the order statuses to be used by a store.
8484
* **Shipping Methods** - Defines the different shipping options available in the store. See [Shipping reference documentation](../shipping/) for more details.
8585
* **Payment Methods** - Defines the different payment options available in the store.

13/umbraco-commerce/release-notes/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ In this section, we have summarized the changes to Umbraco Commerce that were re
99
If there are any breaking changes or other issues to be aware of when upgrading they are also noted here.
1010

1111
{% hint style="info" %}
12-
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.
12+
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.
1313
{% endhint %}
1414

1515
## Release History

13/umbraco-commerce/upgrading/version-specific-upgrades.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: >-
88
This page covers specific upgrade documentation for when migrating to major 13 of Umbraco Commerce.
99

1010
{% hint style="info" %}
11-
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.
11+
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.
1212
{% endhint %}
1313

1414
## Version Specific Upgrade Notes History

0 commit comments

Comments
 (0)