klaviyo / magento2-klaviyo

37 stars 51 forks source link

Js error _learnq is not defined #42

Closed calin-ImDigital closed 5 years ago

calin-ImDigital commented 5 years ago

I suppose this commit introduced changed and breaks the js for the product viewed

ReferenceError: _learnq is not defined

https://github.com/klaviyo/magento2-klaviyo/commit/4d7c9370220df81409cb19a257ef77262a1a2245

klaviyo version : 1.1.0 magento : 2.3.2

remstone7 commented 5 years ago

@cdiacon-img just waiting for a review and will push a patch for version 1.1.1 https://github.com/klaviyo/magento2-klaviyo/pull/41

remstone7 commented 5 years ago

@cdiacon-img all set, in the new release V1.1.1

calin-ImDigital commented 5 years ago

@remstone7 thanks for a quick reply, upgrading now... 🎉

calin-ImDigital commented 5 years ago

@remstone7 just my 2cents here https://github.com/klaviyo/magento2-klaviyo/commit/7335b5215148a6ea0d1db88ea3d6124a24172b2c

I think this could be done better using require js

define(['domReady!'], function () {
    console.info(' DOM is ready !');
});
calin-ImDigital commented 5 years ago

@remstone7 I don't think this fixed the issue 😞

Screen Shot 2019-07-30 at 6 26 38 PM Screen Shot 2019-07-30 at 6 26 30 PM

remstone7 commented 5 years ago

hmm alright, will go the requirejs approach, locally tested and looked good for me adding this.