This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

How to display the rendered entity of a store in a code ?

I created a custom module for Drupal 8 and Drupal Commerce. It is used to display a link "Accept the conditions of sale" in the purchase funnel during an order.

This link displays a modal window with the rendering of a page.

I have created a "terms and conditions" display mode in my store types. I want the link to show the store's rendered "terms and conditions" entity in a modal window.

So I want to make the entity store instead of showing a page in the modal link.

How to do this ?

Here is my code :

Best way to store data that nodes can share

I want an entity where I can store various bits of data (using fields) and link that data to multiple page nodes. But that data should not be visible to anyone - it is more for adding and displaying data programmatically or via Views. What's the best way to go about this?

Views complex table

Do you now how I can build complex table in Drupal? I want to get something like this (in upload picture). I have nodes with fields: nid, code, name, date, sum. Thanks! 

https://drive.google.com/file/d/1BNpHNYMoVrOI5CMGaQuMj50t12GvGkdr/view?u...

Custom module how to include JS/CSS with contenthash in file name ?

What is a good way to include JS and CSS files in a module using the .libraries.yml file that have file names as follows :

abc-61c284b39224e2b2e4d5.css

abc-61c284b39224e2b2e4d5.js

The JS and CSS are generated using contenthash which would change on every build of the files if their content changes. How can I include these files in my pages using the file name as only : abc without caring for the contenthash ?

How do I get the administrator to automatically flag ?

I created a module for flagging entities automatically when created or updated.

There are some errors in my code because only nodes work.

If a user "user1" creates a node, the flag will be in his name. I want the flag to be done automatically on behalf of the site administrator.

How do I get the administrator to automatically flag ?

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions