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
| time_namelookup: %{time_namelookup}s\n | |
| time_connect: %{time_connect}s\n | |
| time_appconnect: %{time_appconnect}s\n | |
| time_pretransfer: %{time_pretransfer}s\n | |
| time_redirect: %{time_redirect}s\n | |
| time_starttransfer: %{time_starttransfer}s\n | |
| ----------\n | |
| time_total: %{time_total}s\n |
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
| { | |
| destination_address: { | |
| country_code: "CA", | |
| province_code: "QC", | |
| city: "Montreal", | |
| address1: "address 1", | |
| address2: "address 2", | |
| address3: "address 3", | |
| postal_code: "K2K2K2" | |
| }, |
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
| const toastNoticeOptions = { | |
| message: 'Product saved', | |
| duration: 5000, | |
| }; | |
| const toastNotice = Toast.create(app, toastNoticeOptions); | |
| const toastErrorOptions = { | |
| message: 'Error saving', | |
| duration: 5000, |
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
| var discountPayload = { | |
| amount: '1', | |
| discountDescription: "$1 off discount", | |
| type: 'flat', | |
| } | |
| var unsubscriber = cart.subscribe(Cart.Action.UPDATE, function (payload: Cart.Payload) { | |
| console.log('[Client] setDiscount', payload); | |
| unsubscriber(); | |
| }); | |
| cart.dispatch(Cart.Action.SET_DISCOUNT, { |
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
| var unsubscriber = cart.subscribe(Cart.Action.UPDATE, function (payload: Cart.Payload) { | |
| console.log('[Client] setLineItemProperties', payload); | |
| unsubscriber(); | |
| }); | |
| cart.dispatch(Cart.Action.SET_LINE_ITEM_PROPERTIES, { | |
| index: 0, | |
| data: { | |
| referral: 'Shopify', | |
| userID: '1234', | |
| } |
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
| var lineItemPayload = { | |
| variantId: '1234', | |
| quantity: 1 | |
| }; | |
| var unsubscriber = cart.subscribe(Cart.Action.UPDATE, function (payload: Cart.Payload) { | |
| console.log('[Client] addLineItem', payload); | |
| unsubscriber(); | |
| }); | |
| cart.dispatch(Cart.Action.ADD_LINE_ITEM, { |
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
| if ( 'AmbientLightSensor' in window ) { | |
| const sensor = new AmbientLightSensor(); | |
| sensor.onreading = () => { | |
| if ( sensor.illuminance < 20) { | |
| element.style.setProperty('--bg', 'black’); | |
| } else { | |
| element.style.setProperty('--bg', 'blue’); | |
| } | |
| }; | |
| sensor.start(); |
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
| if ( 'AmbientLightSensor' in window ) { | |
| const sensor = new AmbientLightSensor(); | |
| sensor.onreading = () => { | |
| if ( sensor.illuminance < 20) { | |
| element.style.setProperty('--bg', 'black’); | |
| } else { | |
| element.style.setProperty('--bg', 'blue’); | |
| } | |
| }; | |
| sensor.start(); |
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
| <style> | |
| .announcement-bar { | |
| background-color: {{ section.settings.announcement_bar_color }}; | |
| text-align: center; | |
| text-decoration: none; | |
| } | |
| .announcement-bar__message { | |
| font-size: large; | |
| padding: 10px; | |
| color: {{ section.settings.announcement_bar_text_color }}; |
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
| <style> | |
| .announcement-bar { | |
| background-color: {{ section.settings.announcement_bar_color }}; | |
| } | |
| </style> |