Forgive me as we have all sinned and in hindsight I may have taken a wrong turn, but…
My wife’s business is plant based food. She sells fresh and frozen dishes for collection. Frozen are left over fresh which can be frozen.
We add the dish details in an Excel workbook which using VBA (which I can code, ish) is uploaded to her wix store into initially one of two collections, ‘Pantry’ for fresh and ‘Freezer’ for frozen. This allows us to upload details before the dishes are available for sale. When we have stock we add the dish the Fresh or Frozen collections which are then displayed and available to buy on the site… Phew!
As an added complication, some for the Pantry dishes won’t yet have an image to add (which is done manually rather than via the Excel/CSV upload).
Two things for all you bright people;
How can I (with code) via a gallery (pro) only show dishes from one collection (eg Pantry) rather than all products?
How can I exclude any dishes that do not have an image yet?
The site is nomnomnosh.uk, but before you start salivating (which you would) bear in mind it’s collection only from Bury St Edmunds, UK.
As always I appreciate your JS skills and willingness to help.
Hi there You would be much better off using a repeater rather than a Wix Pro Gallery, which is fairly restricted, whereas repeaters have (nearly) limitless possibilities. Check out this post which has links to numerous resources to get this done.
The ‘No stock’ collection has one product, so I was hoping that this would display just one product, but it displays nothing.
I’m using the .hasSome function as the collections field in the product table is an array value.
It doesn’t (now) throe any errors but equally does not filter correctly. Any thoughts?
I’ve also taken some code extracts from another of the links which can change some of the repeater elements. I don’t use these but copied them for reference. What code/test would I need to add to this to exclude dataset entries that do not have an image loaded?
Ok, I have solved this out of code and still using the Wix gallery pro.
I used the two dataset approach included (some way down) in:
And then created a new collection ‘DisplayDishes’ which only includes those dishes with an image. The filter in the Collections dataset then as an INCLUDE filter on a MANUAL ENTRY value of ‘DisplayDishes’.
This worked for me for now, though it would be useful to know howto do in code too…