Created
January 11, 2019 18:34
-
-
Save robisatthefunction/de178982efd8944729d3807af087cf9e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function () { | |
| var shipping_value = document.querySelectorAll("span.right.ng-binding")[document.querySelectorAll("span.right.ng-binding").length - 2]; | |
| var cart_total = document.querySelectorAll("span.right.ng-binding")[document.querySelectorAll("span.right.ng-binding").length - 1]; | |
| var bucket = false; | |
| for (var i=0; i<window.dataLayer.length; i++) { | |
| if (window.dataLayer[i].subProgramName === "Fall Individuals") { | |
| bucket = true; | |
| } | |
| if (window.dataLayer[i].subProgramName === "Spring Individuals") { | |
| bucket = true; | |
| } | |
| if (window.dataLayer[i].subProgramName === "Sports") { | |
| return false; | |
| } | |
| } | |
| if(shipping_value){ | |
| return cart_total.innerHTML.substring(1) >= 34.00 && bucket === true; | |
| }else{ | |
| return cart_total.innerHTML.substring(1) >= 29.00 && bucket === true; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment