Magnific Popup js plugin not working correctly on 3.50.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
8 years ago
Hi all,

Using NOPCommerce 3.50,

I've set DefaultPictureZoomEnabled to True and initially I was getting a "magnific popup is not a function" error in firebug when the product details page (_ProductDetailsPictures.cshtml) was loading.  Upon changing the

    <script type="text/javascript">

declaration to explicitly include the source as such:

            <script src="~/Scripts/jquery.magnific-popup.js" type="text/javascript">
                $(document).ready(function () {
                    $('#[email protected]').magnificPopup(
                    {
                        type: 'image',
                        removalDelay: 300,
                        gallery: {
                            enabled: true
                        }
                    });
                });
            </script>

I was no longer getting the "magnific popup is not a function" error, however, when I click on an image, it still opens in a separate tab and firebug tells me there is no <script> tag on the page.

I've spent too much time on this and I'm primarily a back end developer with very little web front-end skills.  Any help is greatly appreciated.  Thanks.
8 years ago
I've just tested. I cannot reproduce it. Everything works fine out of the box. If you open \Views\Product\_ProductDetailsPictures.cshtml file, then you can see that this javascript file is added the following way
Html.AddScriptParts("~/Scripts/jquery.magnific-popup.js");
8 years ago
Thanks for the response and thanks for trying to replicate it.  I'm going to try it on a clean install in a new sandbox/environment today.  I'll post back my findings.
8 years ago
I've also installed and verified the issue does not exist on a clean install on a new dev box (this was an obvious step I should have taken before posting).  The only difference in my original dev environment (where I'm encountering the issue) is I've semi-manually loaded products and images to the db.  Some tables I used my own db scripts, but for the product table I used the excel import feature from the admin console.  In any case, this has shed some new light on my issue though.  I'm glad it's not an issue in the release.  I can move forward from here.  Thanks again.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.