Set up Import and Export data
It's time to update the HTML for the Order section. Open Order.js
and find the render
method; before the line document.querySelector("#order").innerHTML = html;
, add the following snippet:
if (window.showOpenFilePicker) {
html += `
<a class="navlink material-symbols-outlined"
href="javascript:Order.importCart()" style="color: var(--primaryColor")>
file_upload
</a>
<a class="navlink material-symbols-outlined"
href="javascript:Order.exportCart()" style="color: var(--primaryColor")>
file_download
</a>
`;
}