Skip to content

Commit c71c2be

Browse files
committed
Document linking to order downloads
1 parent 6d8f70d commit c71c2be

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/docs/products.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,23 @@ You can also specify a limit on how many times a customer can download the files
3636

3737
![Download fields on the product publish form](/images/product-downloads.png)
3838

39+
After an order has been created, you may loop through the order's downloads like this:
40+
41+
::tabs
42+
::tab antlers
43+
```antlers
44+
{{ downloads }}
45+
<a href="{{ download_url }}">Download {{ product:title }}</a>
46+
{{ /downloads }}
47+
```
48+
::tab blade
49+
```blade
50+
@foreach($downloads as $download)
51+
<a href="{{ $download['download_url'] }}">Download {{ $download['product']['title'] }}</a>
52+
@endforeach
53+
```
54+
::
55+
3956
## Inventory / Stock Tracking
4057
If you want to keep track of inventory, add a "Stock" field to your collection blueprint and specify a stock count on each product.
4158

0 commit comments

Comments
 (0)