I have started my CMS project today and its going well except I have now hit a stumbling block.
I have 1500+parts - no problem, I have the images for the main part, no problem, but I have two or three variables per product and have over 500 images to attach different ones to each one.
I added another image field in CMS no problem but then get the same image replicated - as expected - on every part.
So what is the simplest way to add variable images per part? TIA
I have an item and have pick showing. The same item has 2/3 components/additions for that item which may be colour related or not. I have the same item that comes with one of these and one other so two different items for sale but core item is the same.
So I gave a pic of core item but want to now add the specific add ons only for that item - so the two are not the same. I have 500+ variants for all my items. Some have none some have up to 4 but each main item I have already it’s adding the different ones to each.
Sure, that’s a classic data definition problem. In essence, you have a relational database you need to code up.
The problem with the CMS is that it’s pretty one-dimensional, not relational. In essence, you have 2000+ parts as far as the CMS would be concerned. The trick then is how do you “attach” sub-variants to the main (e.g. color variations)?
The simplest way I can think of is to define all products in the CMS, then in the YAML have a Primary variable, and a Related Products variable. Display the primaries on your page, and if a primary has variations, then show the Related Products links. It’s a lot of manual work, though.
I posted a while ago how to bring together an image and related items to that image. In this case it was a random image and then bring data related to that image, not sure is what you want
Steve TIA as always. OK using your robot analogy, I have a “naked robot” it has a head a body - 2 x arms, and legs. I have 4 robots. All the same - basic naked. One has a hat, the other has a hat but different coloured arms holding a chopper, one has a different coloured body but holding a spoon, one has different legs but no hat, holding a fork and knife. So I have a basic robot picture showing the “body type” and colour, but now have different “accessories”
I would like the robot on the left (image) and then individual accessories for that robot on right dependent on that variant. I can do layout and have the pics of the “main” robot figure but I have so many variables for each one that if I add a picture in CMS md file I can not get it just to select the one/two etc for that variant. Hopes this helps? TIA
Ok this was different sets of plates cups bowls colours etc. think I understand your required setup.
Assume your accessories are a set number of different items, 4 robots could have the any of the ?? Accessories, but you could define them. Rather than try do every single robot with every possible setup just assign the accessories against the type, ok hurts my head a bit but think I understand. Away on holiday at the moment so no mac
back this morning only away for 3 days just adapted my plate cup bowls, created 2 databases in the frontmatter, this means when you define the item you just add the accessories or details to the item, images ca be pulled by defining in the accessory database, means you just create the short item info pulling from the databases
not sure if this is what you meant
really like this - custom component needs some more work on layout, you have to define all the tailwind colours at start of custom component ore create it external, otherwise it will not see the colours
You could create as many databases at the start as required
Steve - glad you had a good break - this is amazing I think you are very talented! Now if you could print this out then this is exactly what I require. I would be happy to pay you to get sorted with this. TIA
@PMUK never used print before need to look up, would need to know your layout requirement and what you are adding to each inventory item etc, will be free
main item (info), you can add as many as you want, then what will be the variable items (again as many as you want), it will just be what you add to the inventory setup
I have lazy loading added for image, not sure how many inventory you are adding, dont think this will be an issue though
Assume need to work out how to break on next page so items do not split across pages when printing
ok it is a question of adding some print: eg print:break-inside-avoid (bit like columns, I have all those from my column layout component I created 18 months ago) and some other print:'s depending on what is required, will try and add them through trial and error, again what needs printing and format,
found - print:hidden incase something shouldn’t be printed eg menu, assume will work in advanced setting in Elements
ok off to work now, getting there with print, just tested print command+p portrait or landscape, my layout is still from my cups bowls plates so a not optimised, even hid heading print:hidden, hope that will work with a menu etc on page
OH no I sat down at computer to find first video gone and I do not know how you set up database to get this far. Can you kindly put up old video or post a sample project so I can get DB structure you had for extra photos. I appreciate you’re at work!
Not back until this evening, might be easier if you show the layout you want and how may images and info I will create and send you as basic setup you will just need to continue to populate, don’t need actual images or exact information just setup, where images sit and where text sits, remember it is a custom component, runs in an item and not a collection
Steve THANKS it’s a commercial project so can’t say too much at present but the robot one you had on last night before removing this morning was what I was going to play with today. I am just need ing to play at moment so that layout - the md file bit and the links on page is what I need to start with, I will then be able to give you a play project or ask for help as required. I am sure what the robot one was I can play, add and get correct as I’m learning fast but not fast enough! Have a good rest of day! THANKS again