Guest 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. 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 BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox, video lightbox and much more) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace (+100 Spark plugin customisations) 🚀 Learn how to rank new pages on Google in 48 hours! If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
Guest Posted November 16, 2021 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
Akuipers Posted February 8 Share Posted February 8 I just did made it a string and converted to a number. Fixed whatever weird octal conversion the above user said it was doing. Javascript: Number("{orderId}") 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