krombox/module-downloadable-links-sync
最新稳定版本:1.0.6.1
Composer 安装命令:
composer require krombox/module-downloadable-links-sync
包简介
Magento 2 module to sync links for placed orders
README 文档
README
This module lets you sync new, edited, and deleted product downloadable links to existing orders. Example: Your store has product A with a downloadable link, "link #1." There are several orders containing that product. After some time you decided to add "link #2" and change the title for the initial link to "link #1 extended". By clicking Sync links button on the product edit page or by saving the product(depending on settings) your links will be synchronized with the existing orders.
The module uses Magento`s message queue to process the links sync. AMQP(RabbitMQ) or DB connection is used depend on configuration.
Prerequirements
- PHP >= 8.0
Installation
To install, use composer:
composer require krombox/module-downloadable-links-sync
bin/magento module:enable Krombox_DownloadableLinksSync
bin/magento setup:upgrade
Usage
To process the queue, either enable CRON or run the following CLI command manually: bin/magento queue:consumers:start krombox.downloadable_links.sync --max-messages=1
CLI command
If you want to sync multiple products at once or are experiencing timeout issues due to a large number of related orders, you can use the CLI command as an alternative. By default, all products on your store will be processed.
bin/magento krombox:downloadable_links:sync
To sync specific product links, use the --product-ids option to limit processing to particular product IDs or ID ranges. In the example below, command processes products with the following IDs: 1,3,4,5,8,10,11,12.
bin/magento krombox:downloadable_links:sync --product-ids 1,3-5,8,10-12
Extensibility
You can extend the module by creating a custom operation. To do so, create a virtualType for the class Krombox\DownloadableLinksSync\Model\Link\Operation with the appropriate configuration.
<virtualType name="Krombox\DownloadableLinksSync\Model\Link\Operation\Custom" type="Krombox\DownloadableLinksSync\Model\Link\Operation"> <arguments> <argument name="name" xsi:type="string">add</argument> <argument name="resolver" xsi:type="object">Krombox\DownloadableLinksSync\Model\Link\Resolver\Custom</argument> <argument name="processor" xsi:type="object">Krombox\DownloadableLinksSync\Model\Link\Processor\Custom</argument> <argument name="linkProvider" xsi:type="object">Krombox\DownloadableLinksSync\Model\Link\Provider\Main</argument> </arguments> </virtualType>
Afterward, add custom operation to Krombox\DownloadableLinksSync\Model\Link\OperationPool.
<type name="Krombox\DownloadableLinksSync\Model\Link\OperationPool"> <arguments> <argument name="operations" xsi:type="array"> ... <item name="custom" xsi:type="object">Krombox\DownloadableLinksSync\Model\Link\Operation\Custom</item> </argument> </arguments> </type>
Alternatively, you can create a custom operation class by implementing Krombox\DownloadableLinksSync\Model\Link\OperationInterface interface.
For more details, please refer to the etc/di.xml file.
Donate
BTC (BitCoin): bc1qmp5f6n6pe9xulrq0604f2zmhplz4ujq9p8cner
LTC (Litecoin): ltc1qv82lyk9u8gc4ef8duhda64ha4y435v2ve4p6py
ETH (Ethereum ERC20): 0x273b0D4d4e6F6E03E2E39a3Ad02aD57d9680C820
SOL, RAY, BONK, USDT (Solana): 2TjJhsiqVuqZ2YuJvT5DAMuBXD5GFpu6k8ibR1pd4i8t
TRX, USDT (TRON TRC20): TGunJ3mJx5tfYJtLsEiisqcrz5d7oga6No
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 919
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-08-28