定制 ecwhim/module-canonical-url-graph-ql 二次开发

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

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

ecwhim/module-canonical-url-graph-ql

最新稳定版本:1.0.0

Composer 安装命令:

composer require ecwhim/module-canonical-url-graph-ql

包简介

N/A

README 文档

README

This module provides support of Magento GraphQL for Magento 2 Canonical URL Extension by Ecwhim.

Installation

You can install the module in the following ways:

  1. Install the module using Composer via packagist.com.
  2. Download package from github.com.

Install the module using Composer via packagist.com

  1. Log in to your Magento server as, or switch to, the file system owner.
  2. Navigate to your Magento project directory.
  3. Get the latest version of the module:
composer require ecwhim/module-canonical-url-graph-ql
  1. Enable the module.

Download package from github.com

  1. Download the latest version of the package from github.
  2. Extract the package to the <magento root directory>/app/code/Ecwhim/CanonicalUrlGraphQl directory.
  3. Enable the module.

How to use

CategoryInterface attribute

The following table defines the CategoryInterface attribute added by our extension.

ATTRIBUTE DATA TYPE DESCRIPTION
ecw_canonical_url String The absolute canonical URL.

Example Usage

The following query shows how to get the canonical URL for a category:

Request:

{
    categoryList(filters: {ids: {eq: "14"}}){
        id
        name
        ecw_canonical_url
    }
}

Response:

{
    "data": {
        "categoryList": [
            {
                "id": 14,
                "name": "Jackets",
                "ecw_canonical_url": "https://example.com/men/tops-men/jackets-men.html"
            }
        ]
    }
}

CmsPage attribute

The following table defines the CmsPage attribute added by our extension.

ATTRIBUTE DATA TYPE DESCRIPTION
ecw_canonical_url String The absolute canonical URL.

Example Usage

The following query shows how to get the canonical URL for a CMS page:

Request:

{
    cmsPage(identifier: "customer-service") {
        identifier
        title
        ecw_canonical_url
    }
}

Response:

{
    "data": {
        "cmsPage": {
            "identifier": "customer-service",
            "title": "Customer Service",
            "ecw_canonical_url": "https://example.com/customer-service"
        }
    }
}

ProductInterface attribute

The following table defines the ProductInterface attribute added by our extension.

ATTRIBUTE DATA TYPE DESCRIPTION
ecw_canonical_url String The absolute canonical URL.

Example Usage

The following query shows how to get the canonical URL for a product:

Request:

{
    products(filter: { sku: { eq: "24-MB01" } }) {
        items {
            name
            sku
            ecw_canonical_url
        }
    }
}

Response:

{
    "data": {
        "products": {
            "items": [
                {
                    "name": "Joust Duffle Bag",
                    "sku": "24-MB01",
                    "ecw_canonical_url": "https://example.com/joust-duffle-bag.html"
                }
            ]
        }
    }
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: OSL-3.0
  • 更新时间: 2022-10-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固