team-nifty-gmbh/laravel-shopware 问题修复 & 功能扩展

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

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

team-nifty-gmbh/laravel-shopware

Composer 安装命令:

composer require team-nifty-gmbh/laravel-shopware

包简介

Laravel integration for the Shopware 6 Admin API SDK

README 文档

README

Laravel integration for the Shopware 6 Admin API SDK.

Provides a ServiceProvider, Facade, config, and global helper for seamless Shopware 6 API access in Laravel applications.

Installation

composer require team-nifty-gmbh/laravel-shopware

The ServiceProvider is auto-discovered. Publish the config:

php artisan vendor:publish --tag=shopware-config

Configuration

Add to your .env:

SHOPWARE_BASE_URL=https://your-shop.example.com/api
SHOPWARE_CLIENT_ID=your-client-id
SHOPWARE_CLIENT_SECRET=your-client-secret

Usage

Via Helper

// Get all products
$products = shopware6()->product()->getProductList();

// Create a product
$response = shopware6()->product()->createProduct([
    'name' => 'My Product',
    'productNumber' => 'SW-001',
    'stock' => 100,
    'taxId' => '...',
    'price' => [['currencyId' => '...', 'gross' => 19.99, 'net' => 16.80, 'linked' => true]],
]);

// Search with criteria
use TeamNiftyGmbH\Shopware\Support\CriteriaBuilder;

$criteria = CriteriaBuilder::make()
    ->equals('active', true)
    ->contains('name', 'shirt')
    ->sort('name')
    ->limit(10)
    ->association('manufacturer')
    ->toArray();

$results = shopware6()->product()->searchProduct($criteria);

Via Facade

use TeamNiftyGmbH\LaravelShopware\Facades\Shopware;

$order = Shopware::order()->getOrder($orderId);

Via Dependency Injection

use TeamNiftyGmbH\Shopware\Shopware;

class OrderSyncService
{
    public function __construct(
        protected Shopware $shopware,
    ) {}

    public function syncOrders(): void
    {
        $orders = $this->shopware->order()->getOrderList();
        // ...
    }
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固