Is there a simple example on how to add an entity extension for customers with field in the admin of shopware 6? - shopware

I want to add an entity extension to a customer in shopware 6. I was able to do so with the examples in the documentation of shopware on the PHP side and now I wonder how to display and modify this new "field" in the shopware 6 backend.
I searched a lot and also tried to find a simple plugin where I could get some inspiration from, but unfortunately I'm not able to find.
So again the question 😊 Is there any simple example on how to add an entity extension for customers with field in the admin of shopware 6? Or an example plugin, where I can see how it could be done?

What you're (likely) trying to achieve would be the combination of multiple separate tasks.
If you want to store data in the database you'd need a new custom entity
If you want to associate the new entity with the customer you'll need the entity extension
You'll need to add a new field in the administration
I've linked to examples respectively, but you'll probably need to take the time and invest in studying the documentation regardless.
I also created an example plugin that combines all these steps and adds a new entity with a height field as association to the customer and displays the field in the administration. You can find the repository here.

Not sure if you considered this, but depending on what you are trying to accomplish, the simplest way is probably adding a custom field (this can be done progamatically or even via the admin panel).
The drawback is, that those fields' values are stored as JSON and it has drawbacks when you try to search through them.

Related

Is it possible to link the opportunity and project with a different constituent in NetSuite?

i am not able to populate the system field "Prject" on opportunity record if the project and opportunity records have a different constituent
I have created the project from opportunity, but by some reason the opportunity has not been linked with the created project. I tried to connect them(populate the project field on opportunity) using a script but get the error: Invalid job reference key for the entity . It seems that netsuite doesn't allow project to be linked with the opportunity with a different client. Is there a way to populate the program field "Project" on opportunity and link the record with each other without changing the constituent on the records?
You would have to create a new Custom body or column field that would allow you to select any Project (regardless of which constituent/institution it is attached to). From there make considerations for why you want the 2 linked, and note that NetSuite will not complete any automation based on this custom field. You will have to make other modifications depending on business needs.

Strapi CMS, How can I make a packages (prices list) table?

I am trying to make an API using strapi for a similar table to the one shown below.
I have tried implementing using two collections and setting up a one to many relationships. However, there are some packages which have a text (in my case its price, quantity, or a duration) instead of just a true sign.
Also, I tried to use a component for futures, but that doesn't allow me to add a subtitle to the feature and doesn't allow me to use spaces in the future name.
What is the best way to implement this table in strapi.
I am planning to use strapi admin panel as my main website admin panel (I will modify data using it).
Thanks.

Sort articles by template variable

I have built a website (with MODX) where some products are managed and displayed via the articles addon. The products should have a custom ordering but I don't know how to use a template variable for that.
If I enter the name of the TV in the "Sort Field" field nothing is shown at all.
So is it somehow possible to use a TV there?
Or is there another way to achive a custom ordering (note that I need the summary and date fields, so I cant't abuse them for that)?
You can do this by using getResource package. Look at sorbyTV, sortdirTV, sortbyTVType parameters in manual:
http://rtfm.modx.com/extras/revo/getresources#getResources-SelectionProperties

How to add value to a field from another lookup field?

I have a custom entity Partnership in which I have one lookup field contacts.
now I want to add the name field value of the partnership from contact fullname in time of creation of Partnership.
is it possible with the help of pre-existing configuration settings,(without plugin or web resource)
Thanks.
Without using a plug-in or web resource you have a couple options.
1- You can configure the mappings between the 2 entities by going to the Entity (contact) -> Relationship -> Mappings -> and add a new mapping there. For this to work though, you will need to create the child record from the subgrid of the contact, and if the contact changes it won't update the values. So it may or may not be an ideal solution for you.
2- You can create a workflow rule that runs on create and/or update of the Partnership record that pulls the value from the parent contact onto the partnership record. The downside of this is that workflows are async so you won't see the update for a few seconds and refresh the Partner record.
Hope this helps.
If you want to be able to click the "New Partnership" button in the CRM ribbon, then select a contact, and have the name of the contact, be used to populate another field on the form, you will have to use JavaScript. There is no configurable way of doing it.
If you'd like the value to be populated before it is saved in the CRM database, you could use JavaScript, or a custom Plugin. If you'd like the value to be updated after the record is created, you could use a workflow.
You'll have to use one of those three methods to populate the field. The real question I have though, is why are you bothering to populate the field in the first place? You can add the full Contact name to any view, so I don't see a real big reason to include it.

Use EE Search Module to search custom fields

I'm sure this is something simple for which I just haven't found the documentation:
I have a website with a member directory. All of the member data is stored in a members channel, which uses a variety of custom fields – some of which are part of the P&T Field Pack.
I use a Safecracker form to enter the data, and it renders the custom fields beautifully:
What I want is essentially the same form, but have it perform a search, instead of enter the field data.
I've scoured the Search Module documentation, but can't find information on how to search individual fields, let alone how to render them. I've also searched the Safecracker documentation for how to configure it to search (the ideal solution).
How do I do this?
Any help would be appreciated.
Thanks!
ty
EE's search module won't do what you want - it's more of a general search tool, and its "Advanced search" form is less about custom fields and more about things like channels and categories.
You want to look at Solspace's Super Search. It's much more powerful, and will allow you to do exactly what you want in terms of your query - though you will have to build the form manually (i.e., you won't get the SafeCracker-style simplicity of using {field:field_name} to have your form fields output for you).
I would also recommend checking out SuperSearch.

Resources