Skip to content

Instantly share code, notes, and snippets.

@xlplugins
Last active April 23, 2024 13:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xlplugins/fbda67d868e4a27b49e7b72f149628a4 to your computer and use it in GitHub Desktop.
Save xlplugins/fbda67d868e4a27b49e7b72f149628a4 to your computer and use it in GitHub Desktop.
update side cart at page load #side cart
// Paste your JS code here, don't include script tags<script>
window.addEventListener('load', function () {
(function ($) {
$('body .cart-trigger').click(function(){
$('body').trigger('fkcart_open');
$('.oxy-off-canvas').css('display','none')
});
setTimeout(($) => {
if ($ == undefined) {
console.log('jQuery not found');
return;
}
$('body').trigger('fkcart_update_side_cart', [false]);
}, 1500, $)
})(jQuery);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment