robbieaverill / silverstripe-chec
A Silverstripe 4 module which integrates with Chec
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 2
Type:silverstripe-vendormodule
Requires
- php: ^7.3
- silverstripe/cms: ^4.5
Requires (Dev)
- phpunit/phpunit: ^5.7
- squizlabs/php_codesniffer: ^3
This package is auto-updated.
Last update: 2024-11-14 13:11:51 UTC
README
Introduction
This module adds a [BuyNow][/BuyNow]
shortcode to the Silverstripe CMS which can integrate with
Chec Platform in order to display a "buy now" button for your Chec products, with an
integrated checkout window.
This project is a fork of fspringveldt/silverstripe-checio-integration which should be used for SilverStripe 3.x projects.
Requirements
- PHP ^7.3
- Silverstripe CMS ^4.5
Installation
composer require robbieaverill/silverstripe-chec
Loading the Chec JavaScript
This extension automatically tries to load the Chec JavaScript file, but for some reason should your active template
block requirements, ChecExtension::getJavaScript()
fetches and loads this JavaScript content inline for you.
Placing this before the closing body tag (e.g. $ChecJavaScript</body>
) in either your app
or
themes/templates/Page.ss
ensures that it always gets loaded.
Usage
The below short code should be placed in your the content section of your CMS page editor window:
[BuyNowButton,permalink="<your product permalink>"]<your button text>[/BuyNowButton]
Replace <your product permalink>
with your Chec product permalink and <your button text>
with the text you want
displayed in your button/link. You may also add a class="..."
attribute to the permalink to control the classes
added to the button when it is rendered.
Maintainer
Robbie Averill robbie@chec.io
License
This module is licensed under the BSD-3-Clause license. The project is a fork of fspringveldt/silverstripe-checio-integration, and the original license has been retained in accordance.