New idea. What do you think about connecting payload to some Point of Sale system like Square? As for me it sounds interesting to see real time updating catalog, items quantity, online orders with changing status and quantity in both POS and CMS systems and etc.
@nlv_codes2 күн бұрын
Thanks for the suggestion! It would be a new challenge for me too; I haven’t done much ecomm like that.
@RomainLENAOUR2 күн бұрын
Good job ! Do you have a github with code examples? It would be interesting to see how you structure your projects (components, blocks...).
@nlv_codes2 күн бұрын
Thank you! I don’t yet, but I could put one of my projects up. I’ll get to work on that!
@nlv_codesКүн бұрын
Here's a link to the repo in the video, hope it helps! github.com/midlomarketing/midlomark/
@RomainLENAOURКүн бұрын
@@nlv_codes great !!!
@timofeysmile85433 күн бұрын
Thank you for your videos! These are great for beginners in PayloadCMS. Could you please advise me or even make video about my issue if you find it interesting. I have some collection for my pet project: Cars, Manufacturer, Models. All models contain manufacturer field and model name field. All cars contains manufacturer field and model field. How can I make it so I couldn`t pick model before I choose manufacturer and I could see only the models options that refer to manufacturer. Like if I`ve picked Audi I could see only its models options like A6 Q5 etc. and couldn`t see others manufacturer models. And if I decide to change manufacturer, the model field become clear.
@nlv_codes2 күн бұрын
I'm glad you find these videos helpful! Your question and use-case is very interesting. I may try it out on my next live stream. I haven't tested this out, so I'm not sure if this will work. BUT you could use filterOptions and admin.condition. You would set your admin.condition so that your model relationship field is hidden until you select a value for your manufacturer. Then, in your model relationship field, you can use `filterOptions`, and use `data` or `siblingData` to get the value of your manufacturer field and use that as your filter for the model relationship field.
@timofeysmile85432 күн бұрын
@@nlv_codes Thank you!!! With your advise, docs and AI power I made this XD Here is the field: { name: 'model', type: 'relationship', relationTo: 'models', label: 'Model', required: true, admin: { condition: (_, { manufacturer }: { manufacturer?: string }) => !!manufacturer, // Поле отображается только если выбран производитель }, filterOptions: ({ siblingData, relationTo }: FilterOptionsProps) => { const manufacturerId = (siblingData as { manufacturer?: string }).manufacturer if (!manufacturerId) { return false // Не показываем модели, если производитель не выбран } // Фильтруем только те модели, которые принадлежат выбранному производителю if (relationTo === 'models') { return { manufacturer: { equals: manufacturerId, }, } } return true // Если условие не применимо, возвращаем все }, }, As for complete beginner it looks kinda messy, but at least it works XD