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

commerce number pattern

Hello.

I would like to know how can i create a custom pattern for this module.

Im working in a commerce that have two kind of price one is for particular and the other one is for profesional.

i would like that in the invoices have the next format: 22ES-P-00001

22: Is the two digits of the year.

ES: Is the country code.

P: Could be P for profesional or A for particular depend of price.

00001: The order number.

Not sure if i can do it with code or without code.

Thanks in advance.

hook_node_info() D7 vs D9

In Drupal 7 you could create an entity using custom module, and use hook_node_info() for it to show up under Content > Add Content menu.

Drupal 9 has the same hook, but doesn't seem to work the same way.

Am I missing something?

Is "no_cache" in routing.yml reflected in both Internal and Dynamic Page Cache?

There is a configuration item called "no_cache" in the option of the module's routing.yml.
If set to "TRUE", it is defined as a non-cacheable route, is this valid for both "Internal Page Cache" and "Dynamic Page Cache"?

( ref. Structure of routes | Routing system | Drupal Wiki guide on Drupal.org )

Upgrading to Drupal 9 Entity.Manager Error

I am new to Drupal and was tasked with the project or upgrading a website from Drupal 8 to 9. I was able to get the site up to 8.9 with php7.4, but I am having problems going from 8.9 to 9. I run the Upgrade Status report before and made sure to update all the modules with composer, but I am still getting this error when visiting the site after install 9.4.3. Again I am very new to Drupal so if this post is in the wrong place please let me know!

No theme() function in Drupal 9

Drupal 7 used to have a function named "theme()" to return "themed" output: https://api.drupal.org/api/drupal/includes%21theme.inc/function/theme/7.x

I'm upgrading Notify to Drupal 9 and it leverages on Advanced Help to provide help topics. Example:

$output = theme('advanced_help_topic', [
  'module' => 'notify',
  'topic' => 'users',
]);

How to do this in Drupal 9?

[Solved] Is it possible to block Drupal from processing all modules inside a Custom folder (i.e. modules/XYZ)

I believe some HTACCESS solution might be possible, but not sure how.

I use a script that creates boilerplate drupal module.

I created a folder inside the "modules" folder to store this code, but if the generated code has any issue, my site stops working since Drupal tries to read this code and consider this as a real module.

I placed this folder in a different directory, and that solved the problem, but having it inside the modules folder itself would be more logical and easy to maintain.

Pages

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