spicyweb/craft-reorder
Composer 安装命令:
composer require spicyweb/craft-reorder
包简介
Easy reordering of previous Craft Commerce user orders
README 文档
README
ReOrder
Easy reordering of previous Craft Commerce user orders.
ReOrder makes it easy to allow users to quickly replicate an old order's line items in their existing cart, including the items' quantities, product options and notes.
Requirements
- ReOrder 3.x requires Craft CMS 5 and Craft Commerce 5.
Installation
ReOrder can be installed through the Craft Plugin Store. It can also be set up using Composer:
composer require spicyweb/craft-reorder
Then browse to Settings → Plugins in the Craft control panel and choose to install ReOrder.
Usage
ReOrder can be configured to either keep or discard the existing cart items when reordering an old order, and to allow or disallow reordering an order if not all of the associated purchasables are still available, whether they have been deleted, disabled or are just out of stock -- in which case, if reordering is allowed, ReOrder will just replicate the available items.
These options can be configured globally in the Craft control panel and can be overridden on a case-by-case basis in your template files.
ReOrder also makes it easy to allow a customer to select the items they want to reorder, if they don't want to reorder an entire order.
Example: retain cart but disallow partial reorders
<form method="POST"> <input type="hidden" name="action" value="reorder/reorder"> {{ csrfInput() }} {{ redirectInput('shop/checkout') }} <input type="hidden" name="order" value="{{ order.number }}"> <input type="hidden" name="retainCart" value="1"> <input type="hidden" name="allowPartial" value="0"> <button type="submit">ReOrder!</button> </form>
Example: allow customer to select which items to reorder
<form method="POST"> <input type="hidden" name="action" value="reorder/reorder"> {{ csrfInput() }} {{ redirectInput('shop/checkout') }} <input type="hidden" name="order" value="{{ order.number }}"> {% for item in order.lineItems %} <input type="checkbox" name="reOrderItems[]" value="{{ item.id }}"> {# other item info #} {% endfor %} <button type="submit">ReOrder!</button> </form>
spicyweb/craft-reorder 适用场景与选型建议
spicyweb/craft-reorder 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3.85k 次下载、GitHub Stars 达 3, 最近一次更新时间为 2018 年 09 月 25 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「commerce」 「craftcms」 「craft-plugin」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 spicyweb/craft-reorder 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 spicyweb/craft-reorder 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 spicyweb/craft-reorder 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Expand, collapse, change the status of, or delete multiple blocks in a Matrix field simultaneously.
GraphQL authentication for your headless Craft CMS applications.
Provides an add-on purchasable entity.
Supercharged text field validation.
Adds a 'checkout' to a SilverStripe site which links to an Estimate and adds the ability to setup and pay
Display your categories and products on front end of your website
统计信息
- 总下载量: 3.85k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2018-09-25