You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在PrestaShop 1.7中禁用Jzoom?请求技术协助

How to Disable Jzoom in PrestaShop 1.7

Hey there, let's work through this Jzoom disable issue you're facing on your PrestaShop 1.7 store. I've dealt with similar headaches before, so here are some targeted steps to fix it:

1. Check Your Theme's Built-in Settings First

Most PrestaShop themes (including the default Classic theme and third-party options) have a dedicated toggle for product image zoom—no code edits needed. Head to your admin panel:

  • Go to Design > Theme & Logo > Configure [Your Active Theme]
  • Look for sections like Product Images or Product Page Settings
  • Keep an eye out for an option labeled "Disable Image Zoom" or "Turn off Jzoom"—toggle it off and save changes. Don't forget to clear your store's cache afterward!

2. Disable Jzoom If It's Built Into Your Theme

Many themes integrate Jzoom directly into their core code (not as a separate module), which explains why you can't find a "Jzoom module" in your modules list. Try these code tweaks:

  • Edit the theme's JS files: Navigate to your theme's directory (usually themes/[your-theme]/assets/js/) and look for files like theme.js, product.js, or custom.js. Search for lines that initialize Jzoom, like:
    $('.product-cover').jzoom({
      // Jzoom settings here
    });
    
    Comment out or delete this block of code.
  • Remove zoom-related classes from templates: You mentioned editing products.tpl and product-cover-thumbnails.tpl—double-check if the product image container has classes like jzoom or js-product-zoom (e.g., <div class="product-cover jzoom">). Removing these classes will prevent the zoom script from targeting the image.

3. Look for Hidden Zoom Modules

Sometimes zoom functionality comes from a third-party module with a generic name (not explicitly "Jzoom"). Go to Modules > Modules Manager and search for keywords like "zoom", "image", or "product gallery". Disable any modules that mention image zooming—this might be the culprit if Jzoom was added via a module you didn't notice.

4. Force Disable with CSS/JS (Last Resort)

If none of the above works, you can force-disable the zoom behavior using these quick fixes:

  • CSS Fix: Add this to your theme's custom CSS (Design > Theme & Logo > Customize > Add Custom CSS):
    .jzoom-lens, .jzoom-zoom-container {
      display: none !important;
    }
    .product-cover {
      pointer-events: none; /* Prevents mouse interactions that trigger zoom */
    }
    
  • JS Fix: Add this snippet to your theme's custom JS file:
    $(document).ready(function() {
      // Prevent Jzoom from initializing
      if ($.fn.jzoom) {
        $.fn.jzoom = function() {};
      }
    });
    

5. Clear All Caches!

PrestaShop caches everything—after making any changes, be sure to:

  • Clear your store's admin cache (Advanced Parameters > Performance > Clear Cache)
  • Clear your browser's cache (Ctrl+Shift+R on Windows/Linux, Cmd+Shift+R on Mac)
  • If you're using a CDN, clear its cache too.

内容的提问来源于stack exchange,提问作者Tuyeyas

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.14 07:07:34