basket/add-to-basket
最新稳定版本:v0.0.23
Composer 安装命令:
composer require basket/add-to-basket
包简介
Statamic addon to integrate with Basket app
README 文档
README
Statamic addon to simplify adding an Add to Basket button on your website
How to Install
Run this command from the root of your Statamic project
composer require basket/add-to-basket php artisan vendor:publish --tag=add-to-basket-config --force php artisan vendor:publish --tag=add-to-basket-template --force
Add your api_key to env file
ADD_TO_BASKET_API_KEY=xxx
Set the environment to either staging when testing or production
ADD_TO_BASKET_ENVIRONMENT=staging
Configure the button template at views/vendor/basket/add-to-basket-button.blade.php
How to Use
- Add the Add To Basket field to your page blueprint with the handle
add_to_basket - Click the Add To Basket 'Enabled' checkbox in the page entry and Save
- Add script tag to your template
{{ basket:script_tag | raw }} - Add style tag to your template
{{ basket:style_tag }} - Add the button to your template:
{{ if add_to_basket.enabled && add_to_basket.links | length }}
{{ basket:share_modal_button data={{add_to_basket}} | raw }}
{{ /if }}
统计信息
- 总下载量: 13.59k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2023-09-18