revinners/shopware6-add-to-basket-plugin 问题修复 & 功能扩展

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

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

revinners/shopware6-add-to-basket-plugin

最新稳定版本:1.0.11

Composer 安装命令:

composer require revinners/shopware6-add-to-basket-plugin

包简介

Add to basket plugin for Shopware 6

README 文档

README

The plugin provides a simple API endpoint to add products to the shopping cart.

If you'd like to learn more or work with us, visit our website at revinners.com for more information.

Installation

composer require revinners/shopware6-add-to-basket-plugin # add the plugin to your Shopware project
./bin/console plugin:refresh # refresh the plugin list
./bin/console plugin:install --activate RevinnersAddToBasket # install and activate the plugin

Usage

Call the API endpoint with the SKU and quantity of the product to add. The endpoint will return a JSON response.

Endpoint: /add-to-basket
Method: GET
Parameters:

  • sku (string, required): The SKU (product number) of the product to add.
  • qty (integer, required): The quantity of the product to add.

Example Request

https://example.com/add-to-basket?sku=SW10001&qty=2

Example Responses

{
  "success": true,
  "message": "Product added to the basket"
}
{
  "success": false,
  "message": "Product with SKU SW10001 not found"
}
{
  "success": false,
  "message": "Validation failed",
  "errors": [
    "SKU is required",
    "Quantity must be a positive integer"
  ]
}

Testing

  • ./vendor/bin/phpunit --configuration="custom/plugins/RevinnersAddToBasket" --color - run the tests
  • ./vendor/bin/ecs check src - run the code style check
  • ./vendor/bin/phpstan analyse src - run the static analysis

License

This plugin is licensed under the MIT License. You are free to use, modify, and distribute this software in accordance with the terms of the license.

For more details, see the LICENSE file included in this repository.

About us

At Revinners, we specialize in building e-commerce shops and developing custom plugins based on the Shopware 6 platform. Our goal is to deliver efficient, scalable, and tailored solutions to meet the unique needs of online businesses.

If you'd like to learn more or work with us, visit our website at revinners.com for more information.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-12-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固