zorn-v / thelia-customer-order-cancel-module
1.0
2017-03-31 07:41 UTC
Requires
- thelia/installer: ~1.1
This package is auto-updated.
Last update: 2024-09-11 19:38:42 UTC
README
此模块允许客户取消未付款的订单
安装
手动
- 将模块复制到
<thelia_root>/local/modules/目录,并确保模块名称为 CustomerOrderCancel。 - 在您的 Thelia 管理面板中激活它
Composer
将其添加到您的主 Thelia composer.json 文件中
composer require zorn-v/thelia-customer-order-cancel-module:~1.0
用法
模块为 URL /account/order/cancel/{orderId} 提供控制器
在您的模板中,您必须使用 {token_url} 辅助函数。例如,在 account.html 模板中
... {loop type="order-status" name="order.status" id={$STATUS}} ... {if $CODE == 'not_paid'} <a href="{token_url path="/account/order/cancel/%id" id=$ID}" data-confirm="Do you really want to cancel this order ?"> <i class="fa fa-ban"></i> </a> {/if} {/loop} ...