Created
July 24, 2018 17:56
-
-
Save stefbowerman/1c16cd0ba168cfa71b98bc47ed9aed81 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Alter this function with this last line | |
| var xsappinitfrontend = function(jQueryxsAppxsApp) { | |
| // Main function code... | |
| // ends with.. | |
| // jQueryxsApp('#cross-sell').append(settingsoutput); | |
| // Add the following line | |
| jQueryxsApp(window).trigger('xselldone'); | |
| } | |
| // And then add this bit at the bottom of all the xsell stuff | |
| // Right after the if / else statement that starts with | |
| // ` if ((typeof jQueryxsApp === 'undefined') || (parseFloat(jQueryxsApp.fn.jquery) < 3)) { ` | |
| (function($) { | |
| var $window = $(window); | |
| var xsellDone = false; | |
| $window.on('xselldone', function() { | |
| xsellDone = true; | |
| }); | |
| if(Flow) { | |
| Flow.set('on', 'ready', function() { | |
| if(xsellDone) { | |
| Flow.localize(); | |
| } | |
| else { | |
| // Xsell hasn't finished, localize once it's done | |
| $window.on('xselldone', function() { | |
| Flow.localize(); | |
| }); | |
| } | |
| }); | |
| } | |
| }(jQuery)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment