getgrav / grav-plugin-snipcart Goto Github PK
View Code? Open in Web Editor NEWGrav Snipcart Plugin
Home Page: https://getgrav.org
License: MIT License
Grav Snipcart Plugin
Home Page: https://getgrav.org
License: MIT License
In your example site you have t-shirts with and add to cart button.
T-shirts tend to come in multiple sizes. How would this be handled with the plugin?
Judging from the commit dates on the Repo, I don't know if this plugin is still actively developed at all, but the snipcart requirements for defining subscription plans has changed.
https://docs.snipcart.com/configuration/recurring-and-subscription-plans-definition
Instead of using 'data-plan-name', 'data-plan-id', etc, Snipcart now expects subscriptions to be defined the same as items - just with 'data-item-payment-interval' and 2 other optional attributes defined.
Hi! I was thinking to improve the multi language grav to this plugins.
Something like adding the file to the root plugin:
languages.yaml
Then inside this files define all the labels can be modifyed by the language site. For example:
es:
PLUGIN_SNIPCART:
CARD: Carrito
ADD_TO_CARD: 'Añadir al carrito'
DETAIL: 'Detalle'
ca:
PLUGIN_SNIPCART:
CARD: Cistell
ADD_TO_CARD: 'Afegir al cistell'
DETAIL: 'Detalls'
Then into :
snipcart_detail_item.html
Add the template for the use the Language traductor tag:
{{ "PLUGIN_SNIPCART.ADD_TO_CARD"|t|e }}
in case of the old "Add" static label.
Any ideas or working progress were welcome!
Best regards,
Hi, is there a way to change the position of the price and the red circle background, change to flexible square/rengtangle form? Thank you in advance..
Hello,
I want to show my prices with 2 decimal places after the commata ex: 9,60 €
But if the last decimal is a zero it's cut off and shows: 9,6 €
Where do I need to change it to show both decimals even if it is a 0?
Thanks
Oliver
Hello,
how can I add custom order fields.
In the docs I found this example:
<script id="snipcart" data-api-key="{YOUR_API_KEY}" data-cart-custom1-name="Comments" data-cart-custom2-name="Rating on 10" data-cart-custom2-options="1|2|3|4|5|6|7|8|9|10" data-cart-custom3-name="Do you accept terms?" data-cart-custom3-options="true|false" data-cart-custom3-required="true" src="https://cdn.snipcart.com/scripts/snipcart.js" type="text/javascript"> </script>
But it doesn't add the new fields. Just a new empty tab (that it skips).
thank you
That should be snipcart.yaml
not simplesearch.yaml
in the docs.
If I disable "Use built-in CSS", how do I specify the CSS file to use without hacking the plugin?
If I hack the plugin/css, they get overwritten when plugin is updated.
Maybe a feature request to have a field in the plugin settings to add /path/to/custom.css
Does this plugin automatically add the JS file to my grav site when i download it? If i am correct all i have to do is sign up for snipcart and add the "test" API key to the snipcart.YAML file. I have done this and snipcart still will not recognize the JS file on my site. any help?
As per my initial Grav forum post, using the Shop Site Skeleton, or probably more specifically, the Snipcart Plugin, items do not display correctly when using an iPad (has worked fine on all other devices tested).
The issue, as seen in the screenshot below, is with the wrapping on nth-child
in the CSS. I believe the troublesome lines in css/snipcart.css
are:
@media only all and (min-width: 60em) and (max-width: 74.938em) {
.snipcart-products .snipcart-item.block {
width: 33%;
clear: none; }
.snipcart-products .snipcart-item.block:nth-child(3n+1) {
clear: left; } }
I have changed the value of nth-child
with varying results, but have not found a solution that works.
Any assistance in determining a solution much appreciated.
Hello, please help me, I have a problem with add to cart button & cart link on right top site.
My site: novitabatik.com, just try please. Thanks for your contribution :)
Hello,
Your plugin just works great!!!
I would just need a little help with a filter-function:
I'm working on a wineshop where I have 4 major categories "Red", "white", "rosé" & "champagne"...
On my website I also have a page about the different wineyards, and now I would like to link the wineyards to their respective wines in the shop but the wines are spreaded in all categories. Is there any way to tag a wine by putting in the snipcart_detail.md something like
taxonomy:
tag: [wine, red wine]
wineyard: oliver
And then set a link on the wineyard-page to a shop-page that shows me all the products of this wineyard?
For ex. a link that would look like:
test.com/shop/tags:oliver
Could you help me please?
Thanks,
Oliver
In the /partial/snipcart_detail_item.html.twig, lines 10 where it shows
{{ snipcart_image.cropResize(400,400).html(page.header.title,'snipcart-thumb-image')|raw }}
single quotes needs to be added between
'page.header.title'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.