mayflower/shopware-attribute-rest-api

Shopware插件,通过REST API公开文本字段(属性)

安装: 7

依赖项: 0

建议者: 0

安全: 0

星标: 1

关注者: 11

分支: 0

开放性问题: 2

类型:shopware-plugin

v1.0.0 2018-09-10 14:46 UTC

This package is auto-updated.

Last update: 2024-09-07 05:13:43 UTC


README

一个Shopware插件,通过REST API公开文本字段(属性)。

Latest Stable Version Total Downloads Latest Unstable Version License

关于

本插件使用属性CRUD服务通过REST API公开属性。

它旨在用于自动化文本字段管理。

设置

如《Shopware REST API文档》中所述,启用API访问。

使用

attributes资源支持以下操作

由于Shopware属性CRUD服务的结构,可能可以使用POST进行更新和PUT进行创建!

GET

table_name用作ID。

必需参数

返回值

GET(列表)

必需参数

PUT

  • columnName(必需),字符串,
  • unifiedType,字符串,默认为
  • data,数组
    • displayInBackend,布尔值
    • translatable,布尔值
    • core,布尔值
    • label,字符串
    • ...
{
    "columnName": "attr99",
    "unifiedType": "text",
    "data": {
        "displayInBackend": true,
        "translatable": true,
        "core": true,
        "label": "Attribut 99"
    }
}

POST

  • tableName(必需),字符串
  • columnName(必需),字符串,
  • unifiedType,字符串,默认为
  • data,数组
    • displayInBackend,布尔值
    • translatable,布尔值
    • core,布尔值
    • label,字符串
    • ...
{
    "tableName": "s_articles_attributes",
    "columnName": "attr99",
    "unifiedType": "text",
    "data": {
        "displayInBackend": true,
        "translatable": true,
        "core": true,
        "label": "Attribut 99"
    }
}

DELETE

贡献

我们使用Shopware的Vagrant设置进行开发。

设置完成后,将插件代码映射/同步到Vagrant虚拟机。

一种方法是在Vagrantfile中更新类似的内容

config.vm.synced_folder "../ShopwareAttributeRestApi", "/home/vagrant/www/shopware/custom/plugins/ShopwareAttributeRestApi", create: true, type: "nfs"

我们提供了一份基本的Postman集合用于测试。

许可证

有关更多信息,请参阅许可证文件