[wordpress插件] Disable Cart Fragments by Optimocha通过Optimocha禁用购物车碎片

wordpress 插件 文章 2020-04-17 18:30 454 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

Disable Cart Fragments is a lightweight plugin which effectively speeds up your WooCommerce website by disabling the cart fragments script.

禁用购物车片段是一个轻巧的插件,可以通过禁用购物车片段脚本来有效地加速您的WooCommerce网站。

It also enqueues the script back when the cart is not empty anymore;

当购物车不再为空时,它还会使脚本排队。

so it only works while the cart is empty.

因此它只能在购物车为空时使用。

Why is disabling cart fragments important?

为什么禁用购物车片段很重要?

WooCommerce makes an AJAX request to check your cart and update your cart totals in wherever your theme shows cart contents (like the header menu).

WooCommerce发出AJAX请求,以检查您的购物车并在主题显示购物车内容的任何地方(例如标题菜单)更新购物车总计。

This AJAX call is made to override caching plugins, which is good, but it generally takes time.

进行此AJAX调用是为了覆盖缓存插件,这很好,但通常需要时间。

How does Disable Cart Fragments solve the issue?

“禁用购物车碎片”如何解决此问题?

With our plugin, you have the best of both worlds: You keep using the caching plugin and you still get to update the cart totals when the cart is not empty

使用我们的插件,您将两全其美:您继续使用缓存插件 ,当购物车不为空时,您仍然可以更新购物车总计

.

This check is made via WooCommerce cart cookies, so it still employs JavaScript but doesn’t rely on slow AJAX requests.

该检查是通过WooCommerce购物车Cookie进行的,因此它仍使用JavaScript,但不依赖缓慢的AJAX请求。

The check is made instantly, whether you’re using a caching plugin or not.

无论您是否使用缓存插件,都会立即进行检查。

How cool is that?

那有多酷?

WooCommerce Optimization Services

WooCommerce优化服务

Feel free to reach out to us at Optimocha.com and let us help

可以随时通过 Optimocha.com 与我们联系,并帮助我们

you optimize your WooCommerce website!

您可以优化WooCommerce网站!

Main plugin features

主要插件功能

    • Disables WooCommerce cart fragments.
    • 禁用WooCommerce购物车片段。

    • Checks the cart cookies and if it’s not empty, loads the cart fragments script so the cart totals are still updated.
    • 检查购物车cookie,如果它不为空,则加载购物车片段脚本,以便仍然更新购物车总数。

    • Brings you joy.

    • 带给您欢乐。

      (WARNING: Might not bring joy in some rare cases.)

    • (警告:在极少数情况下可能不会带来欢乐。)

安装步骤

    1. Download the plugin (.zip file) on your hard drive.
    2. 在硬盘上下载插件(.zip文件)。

    3. Unzip the zip file contents.
    4. 解压缩zip文件内容。

    5. Upload the disable-cart-fragments folder to the /wp-content/plugins/ directory.
    6. disable-cart-fragments 文件夹上载至 / wp-content / plugins / 目录。

    7. Activate the plugin through the ‘Plugins’ menu in WordPress.
    8. 通过WordPress中的“插件”菜单激活插件。

    9. When activated, it will start working.

    10. 激活后,它将开始工作。

      There’s no settings page, simply activate and use.

    11. 没有设置页面,只需激活并使用即可。

下载地址
https://downloads.wordpress.org/plugin/disable-cart-fragments.1.01.zip
-EOF-

AI助手支持GPT4.0