From 48d9a88181aa39f69ad52455ed40a0e778b8ec5b Mon Sep 17 00:00:00 2001 From: Norm Rasmussen Date: Thu, 1 May 2025 18:43:01 -0400 Subject: [PATCH] Added the Basic group templates for Walmart Luminate-Scintilla. Mizuno Monthly. --- .../_basic_group_homepage.html.liquid | 394 ++++++++++++++---- .../_basic_group_homepage.html.liquid | 346 +++++++++++++++ .../_header.html.liquid | 26 +- .../homepage.html.liquid | 13 +- Scripts/API_Tests/add-pgaids.py | 2 +- Tasks.md | 2 +- 6 files changed, 683 insertions(+), 100 deletions(-) create mode 100644 Custom_Templates/customer_templates/Walmart Scintilla Prod/_basic_group_homepage.html.liquid diff --git a/Custom_Templates/customer_templates/Walmart Scintilla Dev Copy/_basic_group_homepage.html.liquid b/Custom_Templates/customer_templates/Walmart Scintilla Dev Copy/_basic_group_homepage.html.liquid index 345bcb89..d0bd23bd 100644 --- a/Custom_Templates/customer_templates/Walmart Scintilla Dev Copy/_basic_group_homepage.html.liquid +++ b/Custom_Templates/customer_templates/Walmart Scintilla Dev Copy/_basic_group_homepage.html.liquid @@ -2,58 +2,136 @@ {% comment %} This is where "include homepage_featured" is usually inserted in the regular homepage. + {% endcomment %} - - {% include "ongoing_training", items: courses.enrolled %} - - {%- comment -%} - - - - - {%- endcomment -%} {% include "footer" %} +{% if current_person.signed_in? %} + {% unless current_person.email contains "+preview" %} + {% if current_person.properties.first_time_user_popup_seen == false %} + + {% elsif current_person.properties.first_time_user_popup_seen == true %} + + {% else %} + + {% endif %} + {% endunless %} +{% endif %} + diff --git a/Custom_Templates/customer_templates/Walmart Scintilla Prod/_basic_group_homepage.html.liquid b/Custom_Templates/customer_templates/Walmart Scintilla Prod/_basic_group_homepage.html.liquid new file mode 100644 index 00000000..047fa9a1 --- /dev/null +++ b/Custom_Templates/customer_templates/Walmart Scintilla Prod/_basic_group_homepage.html.liquid @@ -0,0 +1,346 @@ +
+
+
+ Courses +
+ +
+ {% if items.size > 0 %} + {% assign new_courses_count = 0 %} +
+
+ {% for course in items %} + {% if course.properties.is_article_course == false %} + {% if course.started? == false %} + {% assign new_courses_count = new_courses_count | plus: 1 %} +
+ {% include "cards_course_ongoing" with course %} +
+ {% endif %} + {% endif %} + {% endfor %} +
+
+ + {% if new_courses_count > 0 %} +
+ See more +
+ {% else %} + + + {% endif %} + {% else %} + + {% endif %} +
+ +
+
+
+ Ongoing Training +
+ +
+ {% if items.size > 0 %} + {% assign ongoing_courses_count = 0 %} +
+
+ {% for course in items %} + {% if course.properties.is_article_course == false %} + {% if course.progress > 0 and course.progress < 100 %} + {% assign ongoing_courses_count = ongoing_courses_count | plus: 1 %} +
+ {% include "cards_course_ongoing" with course %} +
+ {% endif %} + {% endif %} + {% endfor %} +
+
+ + {% if ongoing_courses_count > 0 %} +
+ {% comment %} See more {% endcomment %} +
+ {% else %} + + + {% endif %} + {% else %} + +
+ {% endif %} + +
+
+
+
Progress Tracker
+
+
+ {% assign lps_in_progress = 0 %} + {% assign enrolled_learning_paths = learning_paths.enrolled | sort: "progress" | reverse %} + {% for learning_path in enrolled_learning_paths %} + {% if learning_path.progress > 0 %} + {% assign lps_in_progress = lps_in_progress | plus: 1 %} + + {% if lps_in_progress < 4 %} +
+ {% include "cards_learning_path_progress" %} +
+ + {% endif %} + {% endif %} + {% endfor %} + + {% if lps_in_progress > 0 %} +
+ See more +
+ {% endif %} + {% if lps_in_progress == 0 %} +
+
+
+ Yikes! You don't have any learning Paths in progress. +
+ +
+
+ + {% endif %} +
+ +
+
+
+
+ +{% include "footer" %} + + + + diff --git a/Custom_Templates/customer_templates/Walmart Scintilla Prod/_header.html.liquid b/Custom_Templates/customer_templates/Walmart Scintilla Prod/_header.html.liquid index 84b4df88..11a59e53 100644 --- a/Custom_Templates/customer_templates/Walmart Scintilla Prod/_header.html.liquid +++ b/Custom_Templates/customer_templates/Walmart Scintilla Prod/_header.html.liquid @@ -1,3 +1,19 @@ +{% comment %} +3p Sandbox Group UUID = 490ab1f6-9ac0-4d02-9234-07707bee700b +Basic Sandbox Group UUID = 9f5c51a3-8e02-4b81-9e48-7ec3adff7c70 +{% endcomment %} + +{% assign basic_3p_user = false %} +{% if current_person.groups.any? %} + {% for group in current_person.groups %} + {% if group.name contains "BASIC" %} + + {% assign basic_3p_user = true %} + {% endif %} + {% endfor %} +{% endif %} +{% comment %} This goes to replace the group.name if statement. Make sure you remove the endif {% endcomment %} +{% comment %} {% if group.id == '9f5c51a3-8e02-4b81-9e48-7ec3adff7c70' or group.id == '490ab1f6-9ac0-4d02-9234-07707bee700b' %} {% endif %}{% endcomment %}
@@ -106,7 +122,7 @@ data-toggle-class-on-target="np-hidden" data-toggle-target=".np-header-avatar-tooltip" data-toggle-outside - > + > @@ -207,7 +223,7 @@ \ No newline at end of file + diff --git a/Custom_Templates/customer_templates/Walmart Scintilla Prod/homepage.html.liquid b/Custom_Templates/customer_templates/Walmart Scintilla Prod/homepage.html.liquid index db4623e8..65517eab 100644 --- a/Custom_Templates/customer_templates/Walmart Scintilla Prod/homepage.html.liquid +++ b/Custom_Templates/customer_templates/Walmart Scintilla Prod/homepage.html.liquid @@ -79,6 +79,7 @@
{{ homepage.subheadline }}
+ {% unless basic_3p_user %} + {% endunless %}
{{ homepage.headline }} - {% include "sub_navigation" %} + + {% if basic_3p_user %} + + {% assign enrolled_courses = courses.enrolled %} + {% include "basic_group_homepage", items: enrolled_courses %} + {% else %} + {% include "sub_navigation" %} {% include "homepage_featured", items: catalog_courses %} @@ -192,6 +200,8 @@ {%- endcomment -%} + {% comment %} This endif is for the "if basic_3p_group" {% endcomment %} +{% endif %} {% include "footer" %}
Sure! Show me around. {% endif %} -
diff --git a/Scripts/API_Tests/add-pgaids.py b/Scripts/API_Tests/add-pgaids.py index 17f74a8b..d88c99ec 100644 --- a/Scripts/API_Tests/add-pgaids.py +++ b/Scripts/API_Tests/add-pgaids.py @@ -4,7 +4,7 @@ from pathlib import Path import Apikeys import os -basefile = "/Users/normrasmussen/Downloads/mizuno-lp-mar25.csv" +basefile = "/Users/normrasmussen/Downloads/multiple_learning_path_analysis.csv" api_key = Apikeys.MIZUNO uuid_url = "https://api.northpass.com/v2/people?filter[email][eq]=" prop_url = "https://api.northpass.com/v2/properties/people/" diff --git a/Tasks.md b/Tasks.md index c5e71600..0c15d010 100644 --- a/Tasks.md +++ b/Tasks.md @@ -42,5 +42,5 @@ ## Cin7 - [X] Custom fields on user records - (CE Props) - available in analytics -- [ ] Can SJ API add sign up fields progromatically +- [X] Can SJ API add sign up fields progromatically - [X] Can we make a custom page that has a custom title. Use this as a landing page instead of an email