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
| //in product-template.liquid | |
| <div id="canvaTemplateLink" data-value="{{ product.metafields.custom.canva_template_link.value }}"></div> | |
| canva_template_link | |
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
| //add canva button | |
| // Retrieve the element by its ID | |
| const canvaTemplateLinkFromPageElement = document.getElementById('canvaTemplateLink'); | |
| // Get the value from the data attribute | |
| const canvaTemplateLinkFromPageValue = canvaTemplateLinkFromPageElement.getAttribute('data-value'); |
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
| <script> | |
| // Find the element with the class "tt-input-counter" | |
| var counterElement = document.querySelector(".tt-input-counter"); | |
| // Create a new select (dropdown) element with Bootstrap classes | |
| var selectElement = document.createElement("select"); | |
| selectElement.classList.add("form-select", "selectpicker"); // Add form-select and selectpicker classes for Bootstrap styling | |
| selectElement.setAttribute("name", "quantity"); // Set the name attribute | |
| // Add a label to the select element |
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
| <script> | |
| // Find the element with the class "tt-input-counter" | |
| var counterElement = document.querySelector(".tt-input-counter"); | |
| // Create a new select (dropdown) element with Bootstrap classes | |
| var selectElement = document.createElement("select"); | |
| selectElement.classList.add("form-select", "selectpicker"); // Add form-select and selectpicker classes for Bootstrap styling | |
| selectElement.setAttribute("name", "quantity"); // Set the name attribute |
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
| <script> | |
| // Find the element with the class "tt-input-counter" | |
| var counterElement = document.querySelector(".tt-input-counter"); | |
| // Create a new select (dropdown) element with Bootstrap classes | |
| var selectElement = document.createElement("select"); | |
| selectElement.classList.add("form-select", "selectpicker"); // Add form-select and selectpicker classes for Bootstrap styling | |
| selectElement.setAttribute("name", "quantity"); // Set the name attribute |
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 outPricePerBucket(prices: number[]): void { | |
| let bucket = 10; | |
| let count = 0; | |
| for (let i=0;i<prices.length;i++) { | |
| // console.log(`${prices[i]} and bucketStart ${bucket} and counter ${count}`); | |
| if (prices[i] < bucket) { | |
| count = count + 1; | |
| } | |
| else { | |
| console.log(`${bucket-10}: ${'*'.repeat(count)}`); |
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 read_more_less() { | |
| var dots = document.getElementById('dots'); | |
| var moretext = document.getElementById('more'); | |
| var mybtn = document.getElementById('myBtn'); | |
| if (moretext.style.display === 'none') { | |
| moretext.style.display = 'inline'; | |
| mybtn.innerHTML = "Show Less"; | |
| } else { | |
| moretext.style.display = 'none'; | |
| mybtn.innerHTML = "Show More"; |
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
| <div class="container-indent"> | |
| <div class="container container-fluid-custom-mobile-padding"> | |
| <div class="demo-typography"> | |
| <div class="row"> | |
| <div class="readmorepost"> | |
| <!-- Start of text that is to be visible --> | |
| Custom stickers are ideal for promotions as they are inexpensive tools | |
| to promote business,brand products and personal items. Personalized | |
| stickers for business like logo stickers increase the visibility of | |
| your business and leave a strong impression on people who use your |
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
| express | |
| getUrl from the endpoint | |
| getLocale from the country url mapper (library) | |
| get dynmodb data | |
| Dynamodb schema : |
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
| import { DocumentClient } from "aws-sdk/clients/dynamodb"; | |
| import { ReturnItem } from "../Type/ReturnItem"; | |
| export async function getReturnItem(orderId: string, sku: string): Promise<ReturnItem> { | |
| const db: DocumentClient = new DocumentClient({ | |
| region: process.env.AWS_REGION as string, | |
| }); | |
| const myKey: DocumentClient.Key = { | |
| orderId, | |
| sku, |
NewerOlder