Re: Klaviyo and "display_on_policy_continue: true" workaround

Solved

Klaviyo and "display_on_policy_continue: true" workaround

SpotterJ
Shopify Partner
67 1 17

Apparantly, this most useful feature of Klaviyo only works for older stores (post Dec 5th 2017).

 

Anyone have some thoughts on a good workaround?

Learning something new every day
Accepted Solution (1)
PaulNewton
Shopify Partner
7201 637 1496

This is an accepted solution.

You'd need get some confirmation of what the actual underlying technical issue is to even attempt a workaround. Like if it's a completely backend issue on the apps part you'll need another app.

If it's some javascript kludge then sometimes things like this are only fixed by debugging the javascript find stoppage conditions and monkeypatch them or the properties/variables used in the logic.

 

Without knowing for sure what the underlying technical issue is your not going to get very far with casual development.

Or even with api dev either prolly https://developers.klaviyo.com/en/docs/how-to-set-up-custom-back-in-stock 

 

There may have been a change to the inventory api , or ajax api?, unfortunately the public changes logs are not strict and accurate timelines.

 

Suspect changes on shopify's side, shopify decided to nuke inv qty's from the ajax instead of providing it as a setting, so things that need to check stock on the frontend cannot do so with just onsite ajax.

https://community.shopify.com/c/api-announcements/inventory-levels-will-no-longer-be-available-throu...

 https://community.shopify.com/c/api-announcements/deprecated-notice-inventory-quantity-and-inventory... 

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


View solution in original post

Replies 4 (4)

PaulNewton
Shopify Partner
7201 637 1496

Please be specific , link to any relevant documentation , including explanations of why it doesn't work on older stores.

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


SpotterJ
Shopify Partner
67 1 17

@PaulNewton Sorry, I meant pre- not post 2017. I am tired.

 

https://help.klaviyo.com/hc/en-us/articles/360001895651-How-to-Install-Back-in-Stock-for-Shopify

Note: The following function is only compatible with Shopify stores created before December 5th, 2017.
klaviyo.init({
    account: 'PUBLIC_API_KEY',
    platform: 'shopify',
    display_on_policy_continue: true
});

I'm wondering what happened on that date, seems so arbitrary.

Trying to get this to work with a lightly customized version of Dawn. 

 

Learning something new every day
PaulNewton
Shopify Partner
7201 637 1496

This is an accepted solution.

You'd need get some confirmation of what the actual underlying technical issue is to even attempt a workaround. Like if it's a completely backend issue on the apps part you'll need another app.

If it's some javascript kludge then sometimes things like this are only fixed by debugging the javascript find stoppage conditions and monkeypatch them or the properties/variables used in the logic.

 

Without knowing for sure what the underlying technical issue is your not going to get very far with casual development.

Or even with api dev either prolly https://developers.klaviyo.com/en/docs/how-to-set-up-custom-back-in-stock 

 

There may have been a change to the inventory api , or ajax api?, unfortunately the public changes logs are not strict and accurate timelines.

 

Suspect changes on shopify's side, shopify decided to nuke inv qty's from the ajax instead of providing it as a setting, so things that need to check stock on the frontend cannot do so with just onsite ajax.

https://community.shopify.com/c/api-announcements/inventory-levels-will-no-longer-be-available-throu...

 https://community.shopify.com/c/api-announcements/deprecated-notice-inventory-quantity-and-inventory... 

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


SpotterJ
Shopify Partner
67 1 17

Thanks, Paul. That's really insightful and interesting as well. I can certainly understand why Shopify turned it off.

 

I'll see if I can tap into the listener on the variant buttons and show my own button and modal. First, sleep and think about how important this is. 

 

Thank you.

Learning something new every day