Created
April 3, 2025 02:46
-
-
Save guilhermechapiewski/fb515fdb31113942e4d6464e026b6902 to your computer and use it in GitHub Desktop.
Ecwid "hello world"
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
Ecwid.OnAPILoaded.add(function() { | |
Ecwid.OnPageLoaded.add(function(page) { | |
if (page.type == "PRODUCT") { | |
console.log( | |
` | |
Page loaded! | |
Ecwid store ID is: ${Ecwid.getOwnerId()} | |
Product ID is: ${page.productId} | |
` | |
) | |
} | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment