Questions tagged [plugin-sprig]

Questions about the Sprig plugin.

Filter by
Sorted by
Tagged with
0 votes
1 answer
14 views

Sort entries by separate related entries count

I am working on a sprig board that filters out Lessons from a structure in Craft. This screenshot better illustrates this and how it works. The main table is built using the following: {# Sets default ...
user avatar
  • 1,824
0 votes
0 answers
53 views

Craft Commerce variants and stock limit

I'm working on solution that shows product variants with ability to select attributes in the front end. Now I have code like this: {% set colour = colour ?? [] %} {% set length = length ?? [] %} {% ...
user avatar
1 vote
1 answer
44 views

Sprig replacing search field even with s-preserve="true"

I have a relatively simple search of a section called articles. Each entry within articles has a category assigned. I've named the category animal. Layout is as follows: Header Search/filtering ...
user avatar
0 votes
0 answers
78 views

Advanced Sprig Filtering

I'm trying to create a filter system where by users can drill down their filtering, so for example they can search whether or not the item is a poster and then in the second search filter, they can ...
user avatar
1 vote
1 answer
33 views

Hiding categories in real time with Sprig in a faceted search

I've built three buttons with checkbox dropdowns that display categories that filter the content below based on categories. I am currently using the relatedTo function to only display the categories ...
user avatar
0 votes
0 answers
58 views

Craft Commerce/Sprig - change add to cart button dependent on what is in cart

I am using Craft Commerce with Sprig and I am hoping to get some help with the add to cart button, which I need to change dynamically dependent on what is already in the cart. Essentially I have two ...
user avatar
  • 1
1 vote
1 answer
154 views

Sprig use category filtering AND load more

I have some checkboxes that filter entries by category. All that is working fine on its own. I also have a load more button that is supposed to append additional entries to the query results. The ...
user avatar
  • 251
2 votes
1 answer
70 views

Re-initialize / layout Masonry after a sprig change

I've got Sprig set up to filter entries by a few categories. I'm trying to re-layout Masonry JS after this update takes place. For starters, I add Masonry to the window variable (defined as global in ...
user avatar
  • 251
2 votes
1 answer
65 views

Swiper breaks when using Sprig

Not sure if this is the right place to ask my question, but I hope someone can help me. I am using Sprig to re-render some cards based on some parameters (with a dropdown filter). These cards also use ...
user avatar
1 vote
2 answers
155 views

Using sprig for category filter but keep getting deprecation errors

I'm using sprig, following the https://craftquest.io/courses/commerce-product-filtering-with-sprig example. I have 3 selects (thickness, look, finish), each using categories from a different group. ...
user avatar
1 vote
1 answer
388 views

How to use Sprig to filter categories using a dropdown

I'm having an issue where I'm adding a dropdown to my search to filter through the first parent attribute in a category (Winter 2020, Spring 2021, and so on). The search field works, but nothing ...
user avatar
  • 37
1 vote
1 answer
117 views

Simplifying code using the new andRelatedTo param

I have the following code that works with Sprig. But with the new andRelatedTo param, I am wondering if this could be simplified? However, I am a little unsure if/where to start on this and how the ...
user avatar
  • 1,824
1 vote
1 answer
271 views

Sprig "Load more" not loading over https

I've recently added an SSL to the site I'm working on, and it seems to have broken my "load more" buttons via sprig. When I click the button now, I get Blocked loading mixed active content “...
user avatar
1 vote
1 answer
130 views

Load currentUser using Sprig with Blitz

I'm having an issue with Sprig + Blitz Caching. I'm trying to load a user image if currentUser exists, though I'm having an issue with the caching. Sprig is loading in the unregistered user photo when ...
user avatar
  • 1,218
1 vote
1 answer
284 views

Sprig - Filter entries by custom field checkbox values, separate values as well as all values

I am having a question regarding Sprig. I do want to filter my entries for values that are defined in a dropdown field (example below is simplified). It does work to the point where I want to filter ...
user avatar
  • 1,064
1 vote
1 answer
77 views

Show matrix fields based on quantity [Sprig]

I'm using Commerce to sell tickets to an event and need to get the names of each person. I would like to do this via a Matrix field, showing fields based on the quantity selected. I followed along ...
user avatar
  • 337
2 votes
2 answers
383 views

How to filter entries by checkboxes using Sprig

I am using the Sprig plugin to filter news entries on a news overview page. I have three checkboxes for the categories related to the news entries. I have the page working for the basic functions by ...
user avatar
1 vote
1 answer
312 views

How to use Sprig's "Load More" Recipe After Update

This is a continuation of a previous question I had (Here). I am using Sprig's Load More Recipe. In my category page, I want the load more function to only pull up entries that equals the current ...
user avatar
2 votes
1 answer
210 views

Using Sprig's live search but show all entries first

I want to display all results in the games section to start with, then once you search, it shows the filtered results. Sprig's starting point I think assumes that you're showing nothing, like a normal ...
user avatar
  • 3,195
0 votes
1 answer
224 views

Sprig/Snaptcha CSRF issue/question

We have a site using Sprig and Snaptcha. One of our forms is always returning a 400 error "Unable to verify your data submission" which is usually a CSRF issue but thought Sprig takes care ...
user avatar
  • 1,711