studiomitte/cart-count 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

studiomitte/cart-count

最新稳定版本:1.0.0

Composer 安装命令:

composer require studiomitte/cart-count

包简介

Endpoint for EXT:cart cart information which can be retrieved by an AJAX request

README 文档

README

This extensions provides a basic endpoint to fetch information from current cart session when using the TYPO3 extension cart. The main benefit is to have pages still cacheable and show e.g. the count of articles in the cart.studiomitte

Example

{
    "net":551,
    "gross":551,
    "count":1,
    "products": [
        {
            "title":"A title",
            "sku":"1234",
            "net":551,
            "gross":551,
            "quantity":1
        }
    ]
}

Installation

Install this extension by using composer require studiomitte/cart-count.

Usage

By calling the URL /?cartId=123 you can retrieve the cart information. 123 is the page configured in the cart plugins where the order is saved.

This extension does not any JS to fetch the data but one example can be

$.get("/?cartId=195", function (data) {
    if (data.count > 0) {
        $(".cart__icon__wrapper").append("<span class='cart__count cart__count--big'>" + data.count + "</span>");
    }
});

Credits

This extension was created by Georg Ringer for Studio Mitte, Linz with ♥.

Find more TYPO3 extensions we have developed that provide additional features for TYPO3 sites.

统计信息

  • 总下载量: 4.65k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2020-07-29