From 36b776cda52f7186d9630831acbaaceae4ac4c56 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Wed, 31 Jul 2024 15:12:47 +0700 Subject: email reminder checkout cart --- indoteknik_custom/models/website_user_cart.py | 8 +++---- indoteknik_custom/views/website_user_cart.xml | 32 +++++++++++++-------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/indoteknik_custom/models/website_user_cart.py b/indoteknik_custom/models/website_user_cart.py index e4b10178..dd3f87e6 100644 --- a/indoteknik_custom/models/website_user_cart.py +++ b/indoteknik_custom/models/website_user_cart.py @@ -131,13 +131,13 @@ class WebsiteUserCart(models.Model): return result def action_mail_reminder_to_checkout(self): - # user_ids = self.search([]).mapped('user_id') + user_ids = self.search([]).mapped('user_id') - user_ids = [101] + # user_ids = [1102] for user in user_ids: - latest_cart = self.search([('user_id', '=', user), ('is_reminder', '=', False)], order='create_date desc', limit=1) + latest_cart = self.search([('user_id', '=', user.id), ('is_reminder', '=', False)], order='create_date desc', limit=1) - carts_to_remind = self.search([('user_id', '=', user)]) + carts_to_remind = self.search([('user_id', '=', user.id)]) if latest_cart and not latest_cart.is_reminder: for cart in carts_to_remind: check = cart.check_product_flashsale(cart.product_id.id) diff --git a/indoteknik_custom/views/website_user_cart.xml b/indoteknik_custom/views/website_user_cart.xml index 7303a221..92dacd98 100755 --- a/indoteknik_custom/views/website_user_cart.xml +++ b/indoteknik_custom/views/website_user_cart.xml @@ -150,7 +150,7 @@
${promo[0].program_line_id.program_id.name}
-
+
${promo[0].program_line_id.name}
@@ -164,8 +164,8 @@ Berat barang: ${weight} Kg
-
- +
+
@@ -176,14 +176,14 @@
${data.product_id.name}
-
+
${data.product_id.name}
${data.product_id.default_code} | Berat barang: ${data.product_id.weight} Kg
-
- +
+
@@ -194,14 +194,14 @@
${free.product_id.name}
-
+
${free.product_id.name}
${free.product_id.default_code} | Berat barang: ${free.product_id.weight} Kg
-
- +
+
@@ -223,7 +223,7 @@ alt="${cart.product_id.name}" width="120" height="120" style="object-fit: fill; object-position: center;"/>
-
+
${cart.product_id.name}
@@ -237,8 +237,8 @@ ${cart.product_id.default_code} | Berat barang: ${cart.product_id.weight} Kg
-
- +
+
@@ -252,7 +252,7 @@ alt="${cart.product_id.name}" width="120" height="120" style="object-fit: fill; object-position: center;"/>
-
+
${cart.product_id.name}
@@ -263,8 +263,8 @@ ${cart.product_id.default_code} | Berat barang: ${cart.product_id.weight} Kg
-
- +
+
@@ -302,7 +302,7 @@ Cek Keranjang - Bayar Sekarang + Bayar Sekarang -- cgit v1.2.3