Commit bf3eed9 1 parent 73b21be commit bf3eed9 Copy full SHA for bf3eed9
File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 13
13
<language >en_US</language >
14
14
<language >fr_FR</language >
15
15
</languages >
16
- <version >3.1.12 </version >
16
+ <version >3.1.13 </version >
17
17
<authors >
18
18
<author >
19
19
<name >Bertrand Tourlonias</name >
Original file line number Diff line number Diff line change 2
2
3
3
namespace GoogleTagManager \Service ;
4
4
5
+ use Symfony \Component \EventDispatcher \EventDispatcherInterface ;
5
6
use Symfony \Component \HttpFoundation \RequestStack ;
6
7
use Thelia \Core \HttpFoundation \Session \Session ;
7
8
use Thelia \Model \Base \CartQuery ;
@@ -32,6 +33,7 @@ class GoogleTagService
32
33
public function __construct (
33
34
private RequestStack $ requestStack ,
34
35
private TaxEngine $ taxEngine ,
36
+ private EventDispatcherInterface $ dispatcher
35
37
)
36
38
{
37
39
}
@@ -487,7 +489,7 @@ protected function getOrderTotalAmount($view)
487
489
switch ($ view ) {
488
490
case 'cart ' :
489
491
case 'order-delivery ' :
490
- return $ this ->requestStack ->getSession ()->getSessionCart ()->getTaxedAmount ($ this ->taxEngine ->getDeliveryCountry ());
492
+ return $ this ->requestStack ->getSession ()->getSessionCart ($ this -> dispatcher )->getTaxedAmount ($ this ->taxEngine ->getDeliveryCountry ());
491
493
case 'order-placed ' :
492
494
$ order = OrderQuery::create ()->findPk ($ this ->requestStack ->getCurrentRequest ()->get ('order_id ' ));
493
495
return $ order ->getTotalAmount ($ tax , false ) - $ tax ;
@@ -496,4 +498,4 @@ protected function getOrderTotalAmount($view)
496
498
}
497
499
}
498
500
499
- }
501
+ }
You can’t perform that action at this time.
0 commit comments