定制 spicyweb/craft-reorder 二次开发

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

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

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>

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 3
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: proprietary
  • 更新时间: 2018-09-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固