Strapi CMS, How can I make a packages (prices list) table? - node.js

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.

Related

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

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.

Liferay 7 Eclipse IDE override default categories behaviour

I need to create a portlet in order to change the default category behaviour/interface in Liferay 7.
My objective is to duplicate assetcategory table, expand and change its columns, and use this new table as a reference for categories within Liferay backend.
Therefore there are three key points my portlet has to update:
The category organization UI to create/update category tables on
DB. Iā€™m able to create a new Liferay module project (panel-app template) which can present the UI backend interface from the side menu and interact with the DB.
Override default category selection panel within web content
properties panel (metadata > category select). I can create a new
Liferay module project fragment to override the
com.liferay.asset.categories.selector.web, however Iā€™ve noticed I can
select only one file path (eg. META-INF/resources/view.jsp)
Override default asset publisher filter behaviour in order to allow
my custom categories selection. Iā€™ve not yet investigated this
point.
Iā€™m currently stuck at point 2 because after creating a new Liferay module project fragment, set the target Host OSGI Bundle to com.liferay.asset.categories.selector.web (which I believe is the correct one, please correct me if it isn't) and selecting the overridden files as META-INF/resources/view.jsp, I canā€™t proceed to redraw the category selection interface.
Here my attempts:
Updating the code view.jsp (eg. adding some text string) I can correctly
see them in the portlet.
Removing/commenting all the code in view.jsp an error is shown:
Asset category selector is temporarily unavailable
Selecting all three files available to be overridden in the main
portlet wizard (META-INF/resources/view.jsp, init.jsp and
init-ext.jsp) and updating view.jsp (like the first example) nothing
happen in the portlet
Some screenshot below:
Case 1
Case 2
Case 3
I need to create a portlet in order to change the default category
behaviour/interface in Liferay 7. My objective is to duplicate
assetcategory table, expand and change its columns, and use this new
table as a reference for categories within Liferay backend.
Just this alone sounds like a humongous task, bigger than what would fit into a stackoverflow question.
AssetCategories are used in every single content type, e.g. WebContent, Blog Articles, Message Board Posts, Wiki Pages, Knowledgebase Articles etc.. Replacing such a vital component by your own implementation is something that will safely ruin your next upgrade experience, because there you'd have to do this again, bringing your code to whatever changes will be made in the next version. And this "upgrade" includes Security Patches.
Overall, your premise sounds to me like a x-y problem and I'd rather recommend that you step back from your intended solution and look for other options to meet your business requirements. There surely are some.
My recommendation: Rather add something to the platform than ripping out a very central and generic component, reimplementing it in a business-specific manner. If you need a different filtering than Asset Publisher provides: Build your own Asset Publisher and implement the business specific rules there. Or think again about organizing your content in a different way than you currently organize it.
Unless you're already a Liferay Core Developer and are asking for a hint on how to change the implementation for the next version. But your question history here doesn't look like it.

How to create mulitple NetSuite Entity Fields

I have created a bunch of NetSuite Entity Fields through the UI (Customization > List, Records & Fields > Entity Fields > New) in one of our two NetSuite Sandbox instances.
I now need to recreate those same fields in our other sandbox, and then eventually in production.
Rather than input them by hand every time, I'd like to either export/import them, or, script them. Unfortunately the information provided by NetSuite doesn't seem to cover this (if it does it's very hard to find). For example, the Import CSV functionality doesn't seem to cover Entity Fields, and the "SuiteScript Supported Records" documentation (for 1.0) doesn't seem to cover them either.
Is it possible to export/import Entity Fields either via CSV or script?
The way to do this is by creating a 'SuiteBundle' that packages your customizations, which you can then share with other accounts.
You can view the documentation here (Netsuite login required).

SharePoint - How to Group Search Results Using Default Display Templates

Is there documentation on how to create groups for search results, preferably using managed properties? All that I was able to find on it is using query rules, result blocks, or this great tutorial: http://www.eliostruyf.com/grouping-search-results-with-display-templates-for-the-cswp/, but it uses completely custom templates while I'm using modified versions of the default control, item, and group display templates and I really want to retain many of their features and just add what I need instead.
I want to organize the results by site title. I'm hoping to use each item's ParentLink managed property to get the Parent URL or Parent Web and from there, get the title. The search is collecting different items from all the site collections in the farm so that's why I want to organize it this way. How can I at least make groups? Where would this be placed within the control, item, and group templates?

Drupal6 - product comparison

Hi
I have not using any shopping cart module, just created a content type (product) and defining several field(attribute) for each product feature.
I want to ask is there any module in Drupal for product comparison or field comparison?
Thanks
No, but there is a way to do it with the Flag module and Views. It will take more work than just turning on a module, but the outcome is the standard product comparison you're looking for. See this article.
The article is no longer online: here the content of the original post.
Ubercart Product Comparison
For me, using Ubercart in Drupal as an e-commerce solution for your website is the way to go. I have been using Ubercart for years now for a number of web design and development projects, and there are a massive amount of contribute modules to beef it up. One feature that I have been keen to work on is a Product Comparison feature, which would allow users to select products and have them display on a page, providing them with a nice and easy layout to easily compare their selected products.
After searching around the web, I found a few articles and posts from people looking for this feature, asking how it could work or if anyone had done it, but couldnā€™t find anything that said ā€œhere it is, this is how it can be doneā€. So, after a little bit or research and a bit of a play, I have come up with a solution which is not that difficult to achieve and only requires some already existing Drupal modules with just a few tweaks.
Note: This tutorial assumes that you already have a working ecommerce site with Ubercart installed. Best to also try this on a test environment and not a live website.
Step 1. Download Required Modules
Download, install and enable the following modules.
Views (I used 6.x-2.11, I havenā€™t tested it with any other releases)
Flag (I used 6.x-2.0-beta3, I havenā€™t tested it with any other releases)
Step 2. Flags configuration ā€“ Setting up your ā€œcompareā€
Once you have enabled the Flags module, go to the flags administration page at /admin/build/flags.
Click the Add link, enter the name of your flag (something like ā€œcompareā€), and leave the flag type as ā€œnodeā€, and submit.
On the next screen you will need to configure your new flag. Complete the following fields (changing the values if you like). I setup my configuration so only registered users of the website could compare products.
Title ā€“ Compare Products
Flag link text ā€“ Add to compare
Flagged message - [title] has been added to your compare
Unflag link text ā€“ Remove from compare
Unflagged message ā€“ [title] has been removed from your compare
Flaggable content ā€“ Product
Check ā€œDisplay login link for anonymous users.ā€ and for anonymous link text add ā€œ[login] to add to your compareā€
For flag access, check flag and unflag for authenticated users
Under Display options select ā€œDisplay link on node pageā€ and ā€œJavaScript toggleā€ as link type
Click submit to save your flag.
With the settings we used, the ā€œflag link textā€ should now display on your product nodes. Clicking it should make the ā€œflagged messageā€ appear and the link changed to your ā€œunflag link textā€ using JavaScript.
So what we are doing here is just flagging nodes ā€“ itā€™s actually pretty simple. We are flagging/unflagging them as ā€œcompare productā€, so you should now be able to (by clicking on the link provided on your products) add and remove products to compare on your website.
Now we have done this, we need to create a page to display our ā€œflaggedā€ products, in which this case is the products we want to compare.
Step 3. Creating out Compare Products Page
Go to the Views Administration page, enabling the Flag module creates a default flag view. You can use this as a reference, or even change this view to what you need, itā€™s totally up to you. All we need is a view with (at least) the settings explained below.
DEFAULTS
Basic Settings ā€“ Use at least the following settings
Title: Product Comparison
Style: Table
Items per page: Unlimited
Access: Authenticated user
Empty text: Full HTML
- You have not yet added any products to compare. Click the ā€œAdd to compareā€ link when viewing a product to add it to this page.
Relationships
Add the following relationship:
Flags: Node flag
- label: compare
- check ā€œInclude only flagged contentā€
- flag: select the flag you created in step 2
- by: current user
Fields ā€“ You can put whatever fields here you would like to show up against each product. You must include the Node Title, and ideally you would want to show a thumbnail of the product, its price and description and the unflag link to allow users to remove it from this page. I have the following fields for my compare:
Content Image using an imagecache, linking to product
Node: Title linking to product
Flags: Flag link
- Relationship: select the one you added
Product: Sell Price
Node: Teaser
Filters
Node: Published Yes
AND SAVE
Now add a new page display view and give it a URL, then save. Navigate to your new compare page using the URL you entered. If you havenā€™t ā€œflaggedā€ any products yet, go do so and once done you should see those products displayed on your Compare Products page!!!
But, there is one slight issue. Because we needed to use Style: Table to get the layout to better suit a compare list, it still doesnā€™t display it the way we need it too. We want to display each of the products horizontally, with each field label shown on the far left so it is easy to compare our products. To do this we need to retheme the table style for our view.
Step 4. Theme the table output of the view
Under Theme: Information for our view, it displays a list of all the possible templates for the display plugin and for the style plugins. Look for the list titled Style output. This is what we want. It lists the possible templates we can use to change the theming of the style output. The first one it displays is the generic template for the table style output but we donā€™t want to use this one, because if we do we could effect any other table style view that may be on the site. So best to use the next one across, mine was called views-view-tableā€“flag-compare.tpl.php.
Create a new php file and name the file to the template name you want to use. In my case my file is named views-view-tableā€“flag-compare.tpl.php.
Paste the Drupal 6 code from here http://drupal.org/node/174578 into your template file.
Then place the file in your themes directory ā€“ and presto! Your comparison table should be laid out more like a comparison style grid. Below is a screenshot of what my Comparison page looks like after a little bit of extra styling.
Try this module: https://drupal.org/project/comparison
Allows the comparison of the attributes of two or more nodes by generating a table. A checkbox is added to nodes to allow them to be included in the comparison. If two or more nodes are selected a link is added to a page with a comparison table.

Resources