swipestripe / swipestripe-downloadable
SwipeStripe 中的可下载产品模块。
2.1.x-dev
2014-07-05 01:40 UTC
Requires
- silverstripe/cms: ~3.1
- silverstripe/framework: ~3.1
- swipestripe/swipestripe: 2.1.*
This package is not auto-updated.
Last update: 2024-09-14 13:07:43 UTC
README
维护者联系方式
SwipeStripe
联系我们
要求
- SilverStripe 3.1.*
- SwipeStripe 2.1.*
文档
在订单处理并支付后,将文件添加到可下载的产品中。
文件上传到 assets/Uploads,当下单时,在 assets/Products/ 目录中创建具有 .dwn 扩展名的文件,以便它们不公开可访问。
当客户下载文件时,在 assets/Downloads/ 中创建临时文件,文件名经过混淆处理。当客户达到下载限制或延长文件下载窗口时,这些文件将被清除。
安装说明
- 将此目录放置在您的 SilverStripe 安装根目录下,将文件夹重命名为 'swipestripe-downloadable'。
- 访问 yoursite.com/dev/build?flush=1 以重建数据库。
- 更新 AccountPage_order.ss 模板以包含下载模板,例如:<% include OrderDownloads %>
配置
- 下载限制是客户可以下载文件的数量,默认设置为 3。
Downloadable_Item::$downloadLimit - 下载窗口是客户必须下载文件的时间量,默认设置为 '1 天'。
Downloadable_Item::$downloadWindow - /assets 中的各种文件夹用于文件生成,可以通过静态变量进行更改
Downloadable_Item::$downloadFolder
Downloadable_Item::$productFolder
Downloadable_Item::$uploadFolder
使用概述
- 在 CMS 中创建一个产品
- 上传该产品的文件
- 在管理员中附加文件后保存并发布产品
- 如果文件很大,将其放入 assets/ 文件夹中,然后运行 /dev/tasks/FilesystemSyncTask,然后在编辑产品时选择该文件。
- 当客户购买附加了文件的 产品时,他们将有权下载该文件。
许可证
Copyright (c) 2011 - 2013, Frank Mullenger
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of SilverStripe nor the names of its contributors may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.