If you use Snipcart with October feel free to form this repo.
Ecommerce solution for October CMS using snipcart.com as a backend.
Demo: https://snipcart.offline.swiss
Please note: this plugin is not affiliated with Snipcart directly. It simply provides an easy way to use the third-party e-commerce service with October CMS. Therefore, Snipcart-specific questions may need to be directly put through Snipcart's support. We'll provide support for plugin-specific questions, and plugin maintenance.
- Multi-currency
- Multi-language (via Rainlab.Translate, Backend available in german and english)
- Discounts and coupon codes
- Inventory management
- Product attributes and variants
- Product links and downloads
- Update orders directly from the October CMS backend
- OFFLINE.SiteSearch support
- Fully functional and responsive demo theme ready to download
- Create an account on snipcart.com
- Add the
snipcartshopDependencies
component to your layouts. This component includes all needed js and css files from the snipcart servers. jQuery can be included optionally as well. - If you are using Rainlab.StaticPages, add a new menu entry of the type
all shop categories
to your navigation. - Create a page and add the
products
component to it's markup. If you want to filter the product category by url parameter don't forget to select "Get category from url" as category filter option. Give it a url like/category/:slug*
(don't forget the star if you want to use subcategories). Select this page in the plugin's backend settings undercategory page
. - Create a page and add the
product
component to it's markup. Give it a url like/product/:slug
. Select this page in the plugin's backend settings underproduct page
. - Setup at least one currency in the plugin's backend settings. Set up the same currencies in your Snipcart dashboard under Account / Regional Settings.
- If you are using discounts, make sure to set up Task scheduling for your October installation. This way the discount usage stats will get updated every hour.
- Create a public and a private API key in your Snipcart dashboard under Account / Credentials. Paste both keys in the respective input field in the plugin's backend settings.
- Copy your custom webhook URL from the plugin's backend settings (under API and webhooks). Set the URL as Webhooks URL in your Snipcart dashboard under Account / Webhooks
Starting with version 1.0.32 you are able to specify a custom currency format in the backend settings. The code you provide is parsed as a Twig template so all the functionality of Twig is available.
If you do not enter a specific format the following will be used
{{ currency }} {{ price|number_format(2, '.', '\'') }}
The following variables are available
Variable | Description | Example value |
---|---|---|
price |
The full price of the product as float | 1500.40 |
integers |
The price without decimals | 1500 |
decimals |
Only the decimals of the price | 40 |
currency |
The currency code you specified above | EUR |
product |
The product model this price is from. | A full model instance |
These are a few example usages:
{{ currency }} {{ price|number_format(2, '.', '\'') }}
-> EUR 1'200.40
<span class="integers">{{ integers }}</span>
<span class="separator">,</span>
<span class="decimals">{{ decimals }}</span>
<span class="currency">{{ currency }}</span>
-> 1200,40 EUR
{{ price|number_format(2, '.', '\'') }} {{ currency }}
{% if (product.taxable) %}
(VAT included)
{% else %}
(VAT excluded)
{% endif %}
-> 1200,40 EUR (VAT included)