Jump to content

What variable does Squarespace use for total current cart value?

Recommended Posts

Site URL: https://www.protexfaceshields.com/

I'm using Nudgify to add conversion notices to https://www.protexfaceshields.com.

However, I need to know what variable Squarespace uses for the current cart amount of online shoppers. Thus far, "cartTotal" and "_2JFeDgZcv" have not worked. Can anyone help?

<script>
    window.nudgify = {data: {"cart":{"amount":neededCARTvariable,"currency":USD}}};
    (function(w){
        var k="nudgify",n=w[k]||(w[k]={});
        n.uuid="a1f57ee3-614c-4f19-976b-d31e348f2377";
        var d=document,s=d.createElement("script");
        s.src="https://pixel.nudgify.com/pixel.js";
        s.async=1;
        s.charset="utf-8";
        d.getElementsByTagName("head")[0].appendChild(s)
    })(window)
</script>
Link to comment
  • Replies 4
  • Views 405
  • Created
  • Last Reply

Top Posters In This Topic

1 hour ago, tonyhowell said:

I need to know what variable Squarespace uses for the current cart amount of online shoppers. Thus far, "cartTotal" and "_2JFeDgZcv" have not worked.

It isn’t quite that simple! 🙂 The values you mentioned are classes, not variables. There isn’t a variable available that you can simply use; it must be created. 

The JavaScript API provided by Nudgify is designed for developers, as it will require additional JavaScript to be written specific to the site/platform. This code will need to read the JSON data and extract the cart value before storing this in a variable where the API can read it. 

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment
  • 2 weeks later...

I'll DM you.

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.