File tree Expand file tree Collapse file tree 6 files changed +11
-4
lines changed Expand file tree Collapse file tree 6 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ public function execute()
102
102
$ this ->checkoutSession ->setQuoteId ($ quote ->getId ());
103
103
$ data = $ this ->session ->getVisitorData ();
104
104
$ data ['quote_id ' ] = $ quote ->getId ();
105
+ $ data ['last_visit_at ' ] = $ data ['last_visit_at ' ] ?? (new \DateTime ())->format (\Magento \Framework \Stdlib \DateTime::DATETIME_PHP_FORMAT );
105
106
$ this ->session ->setVisitorData ($ data );
106
107
$ this ->visitor ->setData ($ data )->save ();
107
108
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" ?>
2
- <config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" ../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd" ><module name =" Ometria_AbandonedCarts" setup_version =" 2.0.2 " /></config >
2
+ <config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" ../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd" ><module name =" Ometria_AbandonedCarts" setup_version =" 2.0.3 " /></config >
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" ?>
2
- <config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" ../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd" ><module name =" Ometria_Api" setup_version =" 2.0.2 " /></config >
2
+ <config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" ../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd" ><module name =" Ometria_Api" setup_version =" 2.0.3 " /></config >
Original file line number Diff line number Diff line change @@ -59,6 +59,12 @@ public function updateBasketCookie() {
59
59
60
60
// $cart = Mage::getModel('checkout/cart')->getQuote();
61
61
$ cart = $ this ->cartModel ->getQuote ();
62
+
63
+ // For newly created carts, reload the model to get created_at value added by database
64
+ if ($ cart ->getCreatedAt () == null ) {
65
+ $ cart = $ cart ->load ($ cart ->getId ());
66
+ }
67
+
62
68
$ cart_token = substr (md5 ($ cart ->getCreatedAt ().$ cart ->getId ()),0 ,12 );
63
69
64
70
$ command = array (
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" ?>
2
- <config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" ../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd" ><module name =" Ometria_Core" setup_version =" 2.0.2 " /></config >
2
+ <config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" ../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd" ><module name =" Ometria_Core" setup_version =" 2.0.3 " /></config >
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " ometria/magento2" ,
3
3
"type" : " magento2-module" ,
4
- "version" : " 2.0.2 " ,
4
+ "version" : " 2.0.3 " ,
5
5
"description" : " Dev composer package for Ometria Extension" ,
6
6
"authors" : [
7
7
{
You can’t perform that action at this time.
0 commit comments