landofcoder/module-split-cart-graph-ql

卖家商品分购物车

安装: 19

依赖: 0

建议者: 0

安全: 0

星标: 0

关注者: 2

分支: 0

开放问题: 0

类型:magento2-module

1.0.0 2022-04-07 08:15 UTC

This package is auto-updated.

Last update: 2024-08-29 05:50:48 UTC


README

``landofcoder/module-split-cart-graph-ql``

主要功能

链接:https://landofcoder.com/magento-2-marketplace-split-cart.html

使用magento 2分订单市场插件,顾客在您的市场购物时可以轻松添加来自不同卖家的多个产品到购物车。无论何时他们在您的市场上购物,他们都可以快速将任何所需产品添加到购物车并完成结账。

  • 购物车将根据卖家进行分割(如果买家从3个卖家那里添加了3个产品,那么购物车将根据卖家分割成3个购物车)
  • 在结账过程中,剩余的卖家产品将从购物车中删除,并且只验证单个卖家的结账
  • 管理员可以轻松管理供应商的订单
  • 客户可以为不同的供应商选择不同的支付方式
  • 客户可以为不同供应商的订单设置不同的收货地址
  • 管理员可以从后端启用/禁用市场分割购物车选项

安装

* = 在生产中请使用 --keep-generated 选项

类型1:压缩文件

  • app/code/Lof 中解压压缩文件
  • 通过运行 php bin/magento module:enable Lofmp_SplitCartGraphQl 启用模块
  • 通过运行 php bin/magento setup:upgrade 应用数据库更新(*)
  • 通过运行 php bin/magento cache:flush 清除缓存

类型2:Composer

  • 将模块添加到Composer仓库,例如
    • 私有仓库 repo.magento.com
    • 公共仓库 packagist.org
    • 公共GitHub仓库作为vcs
  • 通过运行 composer config repositories.repo.magento.com composer https://repo.magento.com/ 将Composer仓库添加到配置中
  • 通过运行 composer require landofcoder/module-split-cart-graph-ql 安装模块
  • 通过运行 php bin/magento module:enable Lofmp_SplitCartGraphQl 启用模块
  • 通过运行 php bin/magento setup:upgrade 应用数据库更新(*)
  • 通过运行 php bin/magento cache:flush 清除缓存

支持查询

  1. 在结账前初始化分割购物车

示例

mutation {
    initCheckoutSplitCart(
      input: {
        seller_url: String!
        cart_id: String!
      }
    ) {
        id
        parent_id
        quote_id
        is_active
        is_ordered
    }
}
  1. 结账分割购物车
mutation {
    placeOrderSplitCart(
        sellerUrl: String
        input: { cart_id: String }
    ) {
        order {
            order_number
            order_id
        }
    }
}
  1. 在取消结账或客户注销时删除分割购物车
mutation {
    removeSplitCart(
        input: { cart_id: String }
    )
}
  1. 获取购物车项目的卖家信息

示例

{
  customerCart {
    id
    total_quantity
    is_virtual
    items {
      uid
      id
      quantity
      product {
        id
        sku
        uid
        name
      }
      seller {
        seller_id
        seller_url
        seller_name
      }
    }
  }
}
  1. 获取商店配置以启用/禁用分割购物车功能
{
    storeConfig {
        lofmp_splitcart_enabled
    }
}