Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • To connect your Shopify feed to your cart, you’ll need to add the Product ID join to our preezie results. Please get in touch with support@preezie.com to help you with this, the steps are:

    Image Removed

...

...

Turn on the feature

  • Then turn on the feature in your CMS admin > Settings > Tenant settings
    Get in touch with support@preezie.com if you need help with this

    • In the admin tab select Shopify then Active

    • If your website has a custom shopping cart integration then you can add an optional Redirect for the shopper directly to your cart page (in a new tab)

      • This is used in the case where the cart is not automatically refreshed when preezie adds products to your cart, i.e. it looks like nothing has happened!

    • Hit > Save API Integration

...

  • To connect your feed to your cart, you’ll need to add the Product ID field that your website’s add to cart is using to map to your preezie database attributes. This is the join between the results and your website’s cart. Please get in touch with support@preezie.com to help you with the steps below

    Image Removed

...

...

Turn on the feature

  • Turn on the feature in your CMS admin > Settings > Tenant settings
    Get in touch with support@preezie.com if you need help with this

    • In the admin tab select Custom then Active

    • If your website requires you require it then you can add an optional Redirect to your cart page after the shopper clicks add to cart (in a new tab)

      This is used in the case where the cart is not automatically refreshed when preezie adds products to your cart, i.e. it looks like nothing has happened!

    • Hit > Save API Integration

...

Hence each time the add to cart button is clicked przAddToCartEvent is fired and subsequently the actions within your customised script above.

As an example, here’s a custom example of a Shopify add to cart script:

Code Block
<script>
        setTimeout(() => {
          const przWidget = document.getElementsByClassName('preezie-widget-app')[0]
          if(przWidget) {
            przWidget.addEventListener('przAddToCartEvent', (event) => {
                console.log(event.detail);
                fetch("https://preezie.myshopify.com/cart/add.js", {
                  method: "POST", 
                  mode: "cors",
                  cache: "no-cache", 
                  credentials: "same-origin", 
                  headers: {
                    "Content-Type": "application/json"    
                  },
                  redirect: "follow", 
                  referrerPolicy: "no-referrer", 
                  body: JSON.stringify({"items":event.detail} ), 
              });
            })
          }          
        }, 2000);
      </script>

Turn on and style your buttons

...