1. Validate cart at checkout request
↓
2. Show checkout form if valid
↓
3. Cart Submission (Radar rejected rules will fail here)
↓
4. Validate that order is still valid
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
| [ | |
| { | |
| "orderId": 7258, | |
| "customerEmail": "lost_romantic1986@yahoo.com", | |
| "eventDate": "2025-03-16", | |
| "expectedAmountInAvalara": 328 | |
| }, | |
| { | |
| "orderId": 7336, | |
| "customerEmail": "LB1361@GMAIL.COM", |
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
| [ | |
| { | |
| "orderId": 7703, | |
| "orderDate": "2025-03-19", | |
| "customerEmail": "maddilinsteadt@yahoo.com", | |
| "eventDate": "2025-05-16", | |
| "transactionId": 85765039502945, | |
| "lineItemAmount": 444, | |
| "expectedAmount": 148 | |
| }, |
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
| // Assumes jQuery is available | |
| // Call getCartJSON() to get the cart object with additional variant data | |
| // Do not call this function, let the `getCartJSON` function call this | |
| var _addProductVariantJSONToCart = function(cart) { | |
| var uniqueProducts = cart.items.map(function(item) { | |
| return item.handle; | |
| }).filter(function(handle, index, self) { | |
| return self.indexOf(handle) === index; | |
| }); |
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 calculate-rem($size) { | |
| // transform px to em | |
| $remSize: $size / 16px; | |
| @return $remSize * 1rem; | |
| } | |
| @function get-vw($target, $viewport-width) { | |
| // Transform px to vw | |
| $vw-context: ($viewport-width*.01); | |
| @return ($target/$vw-context) * 1vw; |
find . -print | grep -i my_filename
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
| /* | |
| A happy number is a number defined by the following process: | |
| Starting with any positive integer, replace the number by the sum of the squares of its digits, | |
| and repeat the process until the number equals 1 (where it will stay), | |
| or it loops endlessly in a cycle which does not include 1. | |
| Those numbers for which this process ends in 1 are happy numbers, | |
| while those that do not end in 1 are unhappy numbers (or sad numbers).[1] | |
| For example, 19 is happy, as the associated sequence is: |
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
| /** Steps **/ | |
| // 1.) First Grab the 1000 words and put into an array: | |
| var wordArray = document.getElementsByTagName('pre')[0].innerHTML.split("\n"); | |
| var characterArray = document.getElementsByTagName('pre')[0].innerHTML.replace(/\n/g,'').split(''); | |
| // 2.) Create an object which stores character by frequency, and create a sorting function | |
| var characterObj = {}; | |
| var populateCharacterObjByFrequency = function(string) { | |
| for (var i=0; i<string.length; i++) { |
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
| /* | |
| Assuming the 'people' set looks as follows: [{birth: 1910, death: 1986}, {birth: 1930, death: 1993}, etc] | |
| */ | |
| var people = [...]; // predetermined | |
| var yearArray = []; | |
| var aliveInYearSet = []; | |
| var mostPopulousYears = []; | |
| // populate year array |
Four couples and one single person attend a party. At the time they enter, none of the guests know anyone else besides their partners, if they came with one. Once in the room, everyone wanders around individually and mingles, and if they meet someone new they introduce themselves. After a few hours, a buzzer goes off and everyone stops talking. Every person has made a unique number of introductions ranging from zero to eight. With this info, how many introductions has the single person made?
Facts for clarity:
- 9 people total, 4 couples and one stag
- Each person has a unique introduction count, ranging from 0 - 8
- Couples do not introduce themselves to their partners
NewerOlder