forked from SymfonyCasts/symfony-ux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlazysidebar-add-internal-turbo-frame.diff
42 lines (40 loc) · 1.66 KB
/
lazysidebar-add-internal-turbo-frame.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
diff --git a/templates/cart/_featuredSidebar.html.twig b/templates/cart/_featuredSidebar.html.twig
index fd148db..2d64e39 100644
--- a/templates/cart/_featuredSidebar.html.twig
+++ b/templates/cart/_featuredSidebar.html.twig
@@ -1,19 +1,21 @@
-<div class="component-light product-show p-3 mb-5">
- <h5 class="text-center">Featured Product!</h5>
- <a href="{{ path('app_product', { id: featuredProduct.id }) }}">
- <img
- alt="{{ featuredProduct.name }}"
- src="{{ asset('/uploads/products/'~featuredProduct.imageFilename) }}"
- class="d-block"
- >
- </a>
- <div class="pt-3">
- <h6 class="d-flex justify-content-between mb-3">
- <strong>{{ featuredProduct.name }}</strong>
+<turbo-frame id="cart-sidebar">
+ <div class="component-light product-show p-3 mb-5">
+ <h5 class="text-center">Featured Product!</h5>
+ <a href="{{ path('app_product', { id: featuredProduct.id }) }}">
+ <img
+ alt="{{ featuredProduct.name }}"
+ src="{{ asset('/uploads/products/'~featuredProduct.imageFilename) }}"
+ class="d-block"
+ >
+ </a>
+ <div class="pt-3">
+ <h6 class="d-flex justify-content-between mb-3">
+ <strong>{{ featuredProduct.name }}</strong>
- {{ featuredProduct.priceString|format_currency('USD') }}
- </h6>
+ {{ featuredProduct.priceString|format_currency('USD') }}
+ </h6>
- {{ include('product/_cart_add_controls.html.twig') }}
+ {{ include('product/_cart_add_controls.html.twig') }}
+ </div>
</div>
-</div>
+</turbo-frame>