Nathanael777 Posted October 27, 2021 Share Posted October 27, 2021 Site URL: https://www.barboxsports.com Hello, I am trying to create a system where when a customer checks out, a google sheet is automatically updated. I have created a dedicated server that simply needs to be called with an order number parameter which I have set up to occur at checkout, however the supplied orderId variable (supplied by Squarespace) is usually incorrect. I will check the console and see that the URL is being provided with an ID that is roughly 50 orders behind, however when I check the source the number seems to be correct (see my screenshot for an example of an orderId which should be 153 but orderId 107 was called). Occasionally the correct ID will be used and everything will work as intended. What's even stranger is the incorrect/old IDs are counting up. I'm not sure where I would post this to support so I figured I would ask here first. Any help would be much appreciated. Beyondspace 1 Link to comment
Beyondspace Posted November 9, 2021 Share Posted November 9, 2021 On 10/28/2021 at 5:42 AM, Nathanael777 said: Site URL: https://www.barboxsports.com Hello, I am trying to create a system where when a customer checks out, a google sheet is automatically updated. I have created a dedicated server that simply needs to be called with an order number parameter which I have set up to occur at checkout, however the supplied orderId variable (supplied by Squarespace) is usually incorrect. I will check the console and see that the URL is being provided with an ID that is roughly 50 orders behind, however when I check the source the number seems to be correct (see my screenshot for an example of an orderId which should be 153 but orderId 107 was called). Occasionally the correct ID will be used and everything will work as intended. What's even stranger is the incorrect/old IDs are counting up. I'm not sure where I would post this to support so I figured I would ask here first. Any help would be much appreciated. Can you use the low code tool Integromat to connect your store and listen to new order event then check the id there to see the potential issue Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio pluginIf you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you Link to comment
Nathanael777 Posted November 16, 2021 Author Share Posted November 16, 2021 In case someone finds this question I'll give the solution I came to: Ultimately the issue was solved by creating my own variable and setting it to the value of "{orderId}". The value was being calculated as an octal integer literal which is what was causing the change in numbers. I was using interpolation originally which is why I didn't think to wrap the initial value in a string. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment