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.
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.all shop categories
to your navigation. 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 under category page
.product
component to it's markup. Give it a url like /product/:slug
. Select this page in the plugin's backend settings under product page
.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)