定制 dannegwork/attribute-of-type-select-graphql-magento2 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

dannegwork/attribute-of-type-select-graphql-magento2

Composer 安装命令:

composer require dannegwork/attribute-of-type-select-graphql-magento2

包简介

GraphQL plugin that accesses custom attributes. To be used on Magento2.4.* setup

README 文档

README

This is a Magento2 plugin with the purpose of customizing the output for the select/dropdown Magento2 catalog attributes.

Functionality

In a clean Magento2 project, the GraphQL endpoint will display the numeric value of the option id for the the single-value / select / dropdown attribute (instead of the textual option). This repository will allow you to:

  1. Access attribute values based on the entity ID & store view
  2. Access any select/dropdown/filterable attribute in a simple JSON format The output of the GraphQL query will be in the format:

<attribute-code>:{ "code":"<attribute-option-key-for-admin-view>", "value":"<attribute-option-value>" }

Exceptions

The dropdown attributes which have a back-end model predefined (are of type "varchar") are not affected.

Requirements

This integration has been developed on Magento 2.4.3

Setup

If you wish to use this simple flow for customizing any Magento2 select attribute, please install the repository as is:

composer require dannegwork/attribute-of-type-select-graphql-magento2

bin/magento module:enable DannegWork_CatalogGraphql

bin/magento setup:upgrade

Sample GraphQL Request

The provided QL works on a Magento 2.4.3 setup, deployed with sample data:

{ products (search: "fusion", pageSize: 5) { items { uid name sku color { code value } format { code value } } } }

Color & format are select fields.

Contact me!

If you have any question, just contact me at contact@danneg.work

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: OSL-3.0
  • 更新时间: 2021-09-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固