basket / add-to-basket
Statamic addon to integrate with Basket app
Installs: 7 834
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:Vue
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 }}