conneqt/module-multivers-special-prices 问题修复 & 功能扩展

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

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

conneqt/module-multivers-special-prices

Composer 安装命令:

composer require conneqt/module-multivers-special-prices

包简介

Multivers (Unit4) special price integration for conneqt/module-special-prices

README 文档

README

Magento 2 module that integrates Unit4 Multivers ERP pricing into the conneqt/module-special-prices framework. It calls the Multivers CalcSpecPriceCommand REST API to retrieve customer-specific prices and plugs in via PriceCalculatorInterface.

Requirements

  • PHP >= 8.1
  • conneqt/module-special-prices ^1.6
  • guzzlehttp/guzzle ^7.11

Installation

composer require conneqt/module-multivers-special-prices
bin/magento module:enable Conneqt_MultiversSpecialPrices
bin/magento setup:upgrade
bin/magento setup:di:compile

Configuration

Stores > Configuration > Conneqt > Multivers Special Prices

GroupFieldDescription
APIBase URLRoot URL of the Multivers web service, e.g. https://yourdomain/V23
APIDatabaseMultivers administration/database code used in API paths
APIOAuth Token URLFull URL of the OAuth 2.0 token endpoint (ROPC grant)
APIClient ID / SecretOAuth client credentials
APIUsername / PasswordResource owner credentials (ROPC)
APIConnection / Response TimeoutSeconds before aborting a request
Attribute MappingMultivers Customer ID AttributeCustomer EAV attribute code holding the Multivers customer ID (default: multivers_customer_id)
Attribute MappingMultivers Product ID AttributeProduct attribute code mapping to the Multivers item code (default: sku)
PricingCurrency CodeMultivers currency code, e.g. EUR. Leave blank to use the store's base currency
PricingVAT IncludedWhen Yes, prices from Multivers already include VAT — align Magento tax config accordingly
PricingProject IDOptional Multivers project ID appended to every request
PricingFallback on Missing Customer IDWhen Yes, customers without a Multivers ID see the base price instead of a hard error
LoggingLog API Requests/ResponsesWrites every CalcSpecPriceCommand call to system.log. Disable in production

Use Test Connection in the API group to verify credentials without leaving the config screen.

Customer attribute

A data patch (AddMultiversCustomerIdAttribute) creates the multivers_customer_id varchar attribute on the customer entity and makes it available in the admin customer grid and edit form. Populate it per-customer with the matching Multivers customer ID.

How it works

  1. PriceCalculator::calculate() resolves the Multivers customer ID from the configured attribute and the product ID from the configured attribute (fallback: SKU).
  2. It calls CalcSpecPriceCommand via PriceApi.
  3. Price resolution: if price > 0 use it directly; if discount > 0 derive from base price; otherwise return base price.
  4. The parent module's ResultCache plugin handles Redis caching of results — no duplication here.
  5. The OAuth bearer token is cached in Magento's config cache pool, respecting the expires_in TTL from the token response.
  6. Tier prices are not supported (CalcSpecPriceCommand is single-qty only); calculateTierPrices returns null to let the base module fall through.

API endpoint

POST api/{database}/CalcSpecPriceCommand
  ?customerId={customerId}
  &productId={productId}
  &currencyId={currencyId}
  &quantity={quantity}
  &orderDate={orderDate}
  &vatIncluded={0|1}
  &projectId={projectId}

Response: { "discount": float, "price": float, "stockTransferPrice": float }

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: proprietary
  • 更新时间: 2026-06-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固