-
AuthorPosts
-
January 29, 2021 at 4:52 pm #1276346
On my website m24o.net I have a shopping cart, which will appear on a pop-up window when something is put into the cart (example https://www.m24o.net/product/milan-city-tour-3-days/). Since one of the latest updates or from Enfold or from WP the popup window doesn’t appear anymore. Please tell me how the function can be reactivated. I am sending you the shortcode of the function PHP that I have found some time ago on your developer website. Thank you for help and best regards Olaf
//—————–popup——————
function add_custom_script(){
?>
<script type=”text/javascript”>
jQuery(window).load(function(){
jQuery(‘.open-popup-link’).magnificPopup({
type:’inline’,
midClick: true
});
});
</script>
<?php
}
add_action(‘wp_footer’, ‘add_custom_script’);
/*Click this button to open form in lightbox<div id=”test-popup” class=”white-popup mfp-hide”>
YOUR SHORTCODE GOES HERE
</div>*/January 29, 2021 at 9:06 pm #1276420Hey milano24ore,
Can you disable caching and minification, for now, to see where the error is coming from?
Best regards,
VictoriaJanuary 30, 2021 at 11:07 am #1276497Hi Victoria,
thank you very much for the fast reply and help. I have disabled caching and minification as requested and also the function “Disable jQuery Migrate” Disabling the last, pop-up window opens as requested. Now the website is very slow. When you will have finished checking the site, I will appreciate it if you can tell me that I can able the cache again.
Best regards
OlafFebruary 1, 2021 at 3:20 pm #1276846Hi Olaf,
You can enable the caching and minification then please post us your login credentials (in the “private data” field), so we can take a look at your backend.
- Install and activate ” Temporary Login Without Password “.
- Go to ” Users > Temporary Logins ” on the left-side menu.
- Click ” Create New “.
- Add the email address for the account ( you can use (Email address hidden if logged out) ), as well as the ” Role ” making that the highest possible and the expiry about four days
( to be sure that we have enough time to debug ). - Click ” Submit “.
- You’ll now have a temporary account. Please provide us here in the private section the URL, so we can login and help you out.
When your issue is fixed, you can always remove the plugin!
If you prefer to not use the plugin, you can manually create an admin user and post the login credentials in the “private data” field.Best regards,
NikkoFebruary 1, 2021 at 3:55 pm #1276862This reply has been marked as private.February 2, 2021 at 1:26 pm #1277140Hi Olaf,
Thanks for providing the staging site.
I have tested this in https://www.m24o.net/test/product/milan-city-tour-3-days/ (clicked add to cart and no popup shows up) and it seems to be working properly and I can’t find any js errors.
Can you try to clear your browser cache? if I’m missing the issue please let us know.Best regards,
NikkoFebruary 2, 2021 at 2:27 pm #1277158This reply has been marked as private.February 2, 2021 at 3:26 pm #1277163if you are not using jQuery migrate you should edit a lot of your little snippets on which a click or load event is used
on reasons of f.e. load is in conflict with ajax load – the load is deprecated now on jQuery 3.5.1use instead the .on(‘load’, …
so on your example above://—————–popup—————— function add_custom_script(){ ?> <script type=”text/javascript”> jQuery(window).on('load', function () { jQuery(‘.open-popup-link’).magnificPopup({ type:’inline’, midClick: true }); }); </script> <?php } add_action(‘wp_footer’, ‘add_custom_script’);
February 3, 2021 at 4:19 pm #1277407Dear Guenni007,
Thank you so much for your help, this was really very useful!
With best regards
OlafFebruary 4, 2021 at 5:40 am #1277531 -
AuthorPosts
- You must be logged in to reply to this topic.