Pushed Walmart's ecommerce stuff to production and made the changes the client requested. Updated bulk_invite_and_props script for Chubb.

This commit is contained in:
Norm Rasmussen
2024-07-02 17:18:10 -04:00
parent b7af632306
commit 7312718822
4 changed files with 63 additions and 46 deletions

View File

@ -34,26 +34,44 @@
{% endif %}
<div class="np-card-content-footer">
<div class="np-card-content-progress np-button-color">
{% if course.enrolled? == false and course.properties.course_cost > 0 %}
{{ course.properties.course_cost }}
{% if course.properties.course_cost > 0 %}
{% if course.enrolled? == false %}
Paid Course
{% elsif course.progress > 0 and course.progress < 100 %}
Purchased
{% elsif course.progress == 100 %}
Purchased
{% else %}
Purchased
{% endif %}
{% else %}
{% t shared.progress, count: course.progress %}
{% endif %}
</div>
{% capture course_path %}{% route course, id: course.id %}{% endcapture %}
{% capture course_path %}{% route course, id: course.id %}{% endcapture %}
{% if course.has_to_restart? %}
{% include "course_version_outdated_popup", path: course_path %}
{% endif %}
<a class="np-button np-button-wide" href="{{ course_path }}">
{% if course.enrolled? == false and course.properties.course_cost > 0 %}
Paid Course
{% elsif course.progress > 0 and course.progress < 100 %}
Continue
{% elsif course.progress == 100 %}
Retake
{% else %}
View
{% endif %}
{% if course.properties.course_cost > 0 %}
{% if course.enrolled? == false %}
Preview
{% elsif course.progress > 0 and course.progress < 100 %}
Continue
{% elsif course.progress == 100 %}
Retake
{% else %}
Start
{% endif %}
{% elsif course.progress > 0 and course.progress < 100 %}
Continue
{% elsif course.progress == 100 %}
Retake
{% else %}
View
{% endif %}
</a>
</div>
</div>

View File

@ -88,7 +88,7 @@
t.setAttribute("data-firstname", "{{ current_person.first_name }}");
t.setAttribute("data-lastname", "{{ current_person.last_name }}");
t.setAttribute("data-email", "{{ current_person.email }}");
t.setAttribute("data-redirectionurl", "https://luminatesandbox.northpass.com/app/courses/{{ course.id }}"); //url they are currently on
t.setAttribute("data-redirectionurl", "https://walmartluminate.northpass.com/app/courses/{{ course.id }}"); //url they are currently on
t.setAttribute("data-snappayurl", "https://snappayglobal.com/Interop/HostedPaymentPage");
document.getElementsByTagName("head")[0].appendChild(t);
return false;
@ -118,7 +118,7 @@
alert.appendChild(error_text)
sessionStorage.clear()
} else {
window.location.replace('https://luminatesandbox.northpass.com/c/{{ course.enrollment_code }}')
window.location.replace('https://walmartluminate.northpass.com/c/{{ course.enrollment_code }}')
sessionStorage.clear()
}
// Set course prop as whole number, if 0, don't do anything

View File

@ -5,4 +5,5 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tiny-slider/2.9.4/tiny-slider.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/tiny-slider/2.9.2/min/tiny-slider.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.19.2/axios.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>