Fetching all relation data in Netlify CMS - netlify-cms

I searched online but couldn’t find a solution.
I have two collections - posts and authors.
I want to have the entire referenced model and not just one field when I say I want all the posts.
It seems like we can only specify one field in value_field.
What's the solution/workaround for this?

Related

What is the best way to get nested relationships in Laravel Nova?

I have 3 tables with relationships; Feedback has one Type and a Type has multiple Answers:
Feedback->Type->Answers
In Nova, I want to display all Answers to the currently Type on the Feedback page. What is the best way to achieve this? Using using Pivot Fields?
Nova/Feedback:
HasOne::make('Type', 'answer', Type::class),
shows error: call to undefined urikey. my models also match nova relationships
Nova/Type:
HasMany::make('Answer'),
Nova/Answer:
BelongsTo::make('Type'),
Is it only to display or also to add while creating a model?
What we mostly use is this packages:
https://novapackages.com/packages/yassi/nova-nested-form
and we extend where needed in specific usecases.

How to index two document types in parent-child relationship in Elasticsearch

I am building a search functionality for two types of related documents, let's call them "blogs" and "posts", respectively a blog website (with a bunch of posts) and the specific posts written in that blog. I'd like to be able to search against both of them. In a relational database (which ES is not), I would have two main tables which would be linked against a foreign key, and I could search the two tables separately or with a join. In Elasticsearch, I am considering a parent-child relationship where "blog" is the parent document, and there are potentially many "post" documents associated with it as the child.
EDIT: I should explain why I want to index them this way. Basically, I want people to be able to search for blogs (the overall series of posts written by the same author), and the search terms might not be in the blog's description alone, but rather in the posts; for instance, a blog about Python might have a general description that talks about python, but the blog posts might talk about django, so if someone searches for "django" I'd like the python blog to come up. Also, I want people to be able to search for specific posts. I also think (prove me wrong!) these need to be separate types of documents because they would have different fields, e.g. a post might have a date field, while a blog would not have that field.
In any case: Ideally, I would like to be able to offer a search function against "blog" which would also search against the "post" text (as the relevant text might be in the post); additionally, I'd like to allow users to search all posts regardless of what blog they are associated with.
What are the best practices for setting this up? From what I can tell, Elasticsearch has removed the ability to have two types of documents on the same index, and parent-child relationships need to be on the same index. With this constraint, it seems like parent-child relationships would only be for relationships between documents of the same type, e.g. if you are indexing people and you can indicate who is a parent and child (literally).
The other option would be to create two indexes, one for blogs (which would include the posts' texts) and a second index which would include only the posts. But my instinct is that this would duplicate a tremendous amount of data, and also a lot more work to keep it updated and in sync with my main relational data store.

Amazon Seller Inventory File – Where to get main image URLs?

I'm trying to update the inventory with more information on clothing sizes, material composition etc. by uploading the appropriate inventory file. Now, the template table that I got from here has loads and loads of required columns such as country_of_origin and target_gender that I need to fill out, as well as main_image_url. I'm not sure what to enter there, as the existing images are just fine.
After researching (see below), I'd like to know if I need to go through the trouble of somehow downloading and uploading all of the product images just for the sake of the inventory table, or if there is any other way to create an inventory file that will not mess up the product information.
Or am I maybe misguided in the way that I am trying to do the product updates?
Thanks for any help!
My Research
Can I just leave the field blank even though it is a required field?
 
On this Amazon help page, it says to include every piece of information for existing products into the table even it might seem redundant. Whether that is a recommendation or an absolute requirement, I cannot tell.
Is there an efficient way to retrieve all of the main image URLs for existing products?
Apparently, it is not possible to download the main_image_url in a inventory report like I did with most other required product data columns.
As our products are imported to Amazon by a Shopify app, we do not have all of the product images saved on a server by product ID or anything like that.
According to this StackOverflow answer, there are API calls for retrieving product images by ASIN, but those are scaled down, I cannot use those.

How to add another table column in searchable array in nova?

i am getting data from different different tables and i displayed all those in one section that section contains search button also, i want to add another resource field as a searchable item in nova ,i am trying to add based on the relation of the particular table but it's throwing an error undefined column, How to add please help..
public static $searchable=['id','name','account.type'];
Basically, the search by relationship is not possible through Nova.
A package well made for your needs is this one: LaravelNovaSearch
This package includes both relationship search but also has other useful features making the search much more comprehensive.
Another package, which I have not personally tested, but which seems to be useful for your needs: NovaSearchRelations
My advice is to use LaravelNovaSearch, more maintained and more complete.

Magento Custom Module Grid Serializer

I am working on a custom Magento module to enter Composer information (name, bio, birth, death, etc.) and associate products (songs) with the composer. The module contains two tabs, one for the general info and the other for a list of the products (songs). The association should work exactly as the functionality of Related Products, Up-sells, and Cross-sells in the Product editing page. I feel like I've been running around in circles on a few points in regards to paging through the available songs and selecting and saving the entries. It's mainly dealing with the Grid Serialization. I've looked through as many resources as I can find, including several tutorials, without any luck:
http://magebase.com/magento-tutorials/understanding-the-grid-serializer-block/
I've posted the relevant files at this Gist and would appreciate any feedback or discussion. The files have a lot of material commented out from trying various solutions but they may prove useful in terms of thought process. Certainly available to post any other files that may be relevant.
I think this answer is exactly what you need. I know that single link answers are not very appreciated but the answer is kind of long to replicate in here.
You can also use this module creator to create you module (also available on magento connect). It has an UI that let's you create the modules in a similar way with how you create a table using phpMyAdmin. For each entity you create in your module you have the ability to say "Link many to many with products". This will create the the relation table between products and your entity and the second tab in the admin where you can choose products that are associated with your entity. Exactly like the products in the categories or like related products.
I admit that I'm the developer of the extension, but this should not be considered as spam since the extension is free and I get no profit out of it.

Resources