sition/shopware6-api-v1 问题修复 & 功能扩展

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

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

sition/shopware6-api-v1

Composer 安装命令:

composer require sition/shopware6-api-v1

包简介

Shopware 6 Base Rest API v1

README 文档

README

http://www.shopwaredemo.nl/api/v1/_info/swagger.html

shopware6apiclient

example

require_once __DIR__ . '/vendor/autoload.php'; 

use Sition\Shopware6\ShopwareClient;

$test = new ShopwareClient( 'http://www.shopwaredemo.nl', 'CLIENT_ID', 'CLIENT_SECRET' );

get product

$response = $test->request( 'GET', 'product?filter[product.active]=1&filter[product.productNumber]=SWDEMO10007'); 

$body = json_decode($response->getBody()->getContents(), true);

var_dump($body);

create category

$body = array(  "name" => "test cat" );

$response = $test->request('POST','category',$body);

$body = json_decode($response->getBody()->getContents(), true);

get complete order including all details

$jayParsedAry = [
    "total-count-mode" => 0,
    // "ids" => "640ae70d50704641af16592613aacc21",  // specifieke id.
    "page" => 1,
    "limit" => 25,
    "filter" => [
        [
            "type" => "equals",
            "field" => "stateId",
            "value" => "4c22d7bf1bcd40f1b74385fb28420056" // open orders
        ]
    ],
    "associations" => [
        "lineItems" => [
            "associations" => [
                "product" => [
                    "associations" => [
                        "tax" => [
                        ]
                    ]
                ]
            ]
        ],
        "currency" => [
        ],
        "orderCustomer" => [
        ],
        "language" => [
        ],
        "salesChannel" => [
        ],
        "addresses" => [
            "associations" => [
                "country" => [
                ],
                "countryState" => [
                ],
                "salutation" => [
                ]
            ]
        ],
        "deliveries" => [
            "associations" => [
                "shippingMethod" => [
                ],
                "shippingOrderAddress" => [
                    "associations" => [
                        "country" => [
                        ],
                        "countryState" => [
                        ],
                        "salutation" => [
                        ]
                    ],
                ]
            ]
        ],
        "transactions" => [
            "associations" => [
                "paymentMethod" => [
                ]
            ]
        ],
        "documents" => [
            "associations" => [
                "documentType" => [
                ]
            ]
        ],
        "tags" => [
        ]

    ],
    "aggregations" => [
        [
            "name" => "BillingAddress",
            "type" => "entity",
            "definition" => "order_address",
            "field" => "billingAddressId",
            // opmerking: CountrId is al opgehaald in Adresses array, evenals stateid en salutation.

        ],
    ]

];



$response = $test->request( 'POST', 'search/order', $jayParsedAry);
$body = json_decode($response->getBody()->getContents(), true);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-08-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固