@@ -24,23 +24,31 @@ class Getbasket extends \Magento\Framework\App\Action\Action
24
24
*/
25
25
private $ quote ;
26
26
27
+ /**
28
+ * @var \Magento\Customer\Model\SessionFactory
29
+ */
30
+ private $ customerSessionFactory ;
31
+
27
32
/**
28
33
* Getbasket constructor.
29
34
*
30
35
* @param \Magento\Quote\Model\ResourceModel\Quote $quoteResource
31
36
* @param \Magento\Checkout\Model\SessionFactory $checkoutSessionFactory
32
37
* @param \Magento\Quote\Model\QuoteFactory $quoteFactory
33
38
* @param \Magento\Framework\App\Action\Context $context
39
+ * @param \Magento\Customer\Model\SessionFactory $customerSessionFactory
34
40
*/
35
41
public function __construct (
36
42
\Magento \Quote \Model \ResourceModel \Quote $ quoteResource ,
37
43
\Magento \Checkout \Model \SessionFactory $ checkoutSessionFactory ,
38
44
\Magento \Quote \Model \QuoteFactory $ quoteFactory ,
39
- \Magento \Framework \App \Action \Context $ context
45
+ \Magento \Framework \App \Action \Context $ context ,
46
+ \Magento \Customer \Model \SessionFactory $ customerSessionFactory
40
47
) {
41
48
$ this ->checkoutSession = $ checkoutSessionFactory ;
42
49
$ this ->quoteFactory = $ quoteFactory ;
43
50
$ this ->quoteResource = $ quoteResource ;
51
+ $ this ->customerSessionFactory = $ customerSessionFactory ;
44
52
parent ::__construct ($ context );
45
53
}
46
54
@@ -85,7 +93,7 @@ public function execute()
85
93
private function handleCustomerBasket ()
86
94
{
87
95
/** @var \Magento\Customer\Model\Session $customerSession */
88
- $ customerSession = $ this ->checkoutSession ->create ();
96
+ $ customerSession = $ this ->customerSessionFactory ->create ();
89
97
$ configCartUrl = $ this ->quote ->getStore ()->getWebsite ()->getConfig (
90
98
\Dotdigitalgroup \Email \Helper \Config::XML_PATH_CONNECTOR_CONTENT_CART_URL
91
99
);
0 commit comments