Managing paid content shouldn't be complicated. I recently ran into a challenge where a project needed a seamless way to sell node publication durations using #DrupalCommerce. To solve this, I built and contributed Commerce Node Pay.
This module allows site administrators to:
✅ Map specific Content Types to Product Variations.
✅ Sell "Publication Durations" (days) as individual products.
✅ Automatically handle node publishing and expiration upon payment.
Key Technical Highlights:
🔹 Uses a custom Entity Trait for dynamic duration settings.
🔹 Fully integrated with the Commerce Order workflow.
🔹 Built with modern DI and autowiring for D10/D11.
It was a great deep-dive into Drupal 10/11's Dependency Injection, Entity Traits, and Event Subscribers. Big thanks to the #Drupal community for the documentation and support during the contribution process!
Check it out on Drupal.org:
https://www.drupal.org/project/commerce_node_pay
- Log in to post comments