Last active
February 16, 2022 14:14
-
-
Save Kazuki-tam/2355de94127950229cfc63a66d3c79ed to your computer and use it in GitHub Desktop.
カレンダーマスター&テワタシデータ初期化処理
This file contains 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 resetData() { | |
const attr = { | |
attributes: { | |
'delivery_date': null, | |
'delivery_time': null, | |
'受け渡し方法': null, | |
'受け渡し日': null, | |
'受け渡し時間': null, | |
'受け渡し曜日': null, | |
} | |
}; | |
fetch('/cart/update.js', { | |
method: 'POST', | |
headers: { | |
'Content-Type': 'application/json', | |
}, | |
body: JSON.stringify(attr), | |
}) | |
.then(response => response.json()) | |
.then(data => { | |
console.log('Success:', data); | |
}) | |
.catch((error) => { | |
console.error('Error:', error); | |
}); | |
} | |
// リセット関数実行 | |
resetData(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment