Tag Archives: Rules

Ubercart – Charge throught membership subscription on Drupal 7

I have never tried to build a Drupal application with paid membership. Both Ubercart and Drupal Commerce provide membership subscription feature. This example is a proof of concept on implementing paid membership on Ubercart.

1. Enable the Roles module in Ubercart.
ubercart-membership-1
Continue reading Ubercart – Charge throught membership subscription on Drupal 7

Drupal 7 – Customize Ubercart invoice email template

You can find the Ubercart invoice email template files @ sites/all/modules/ubercart/uc_order/templates. You could copy and edit the uc-order–customer.tpl.php to fit your needs but you could not select it @ E-mail customer checkout notification > Email an order invoice in Rules. This is because you have to implement the hook_uc_invoice_templates() before the new template is selectable.
Continue reading Drupal 7 – Customize Ubercart invoice email template

Drupal 7 – Create your own Rules event

Update @ 2012-10-25: Please make sure you have the PHP filter module enabled. Thanks Beneto.

The Rules module is must have module for developers who needs to deal with some workflow features. Basically each rule contains 3 parts.

  • Event
  • Condition
  • Action

By default the Rules module already provides some basic events, conditions and actions. But some times we may want to create custom components. For me, the most critical part is create a custom event which i would like to show in this post. For the other two, it is less important because the default components already include Execute custom PHP code. That means even without custom module, i could still do whatever i want in Condition and Action.
Continue reading Drupal 7 – Create your own Rules event

Drupal – Enable Custom PHP Code Condition for Rules

Last time i have shown you the basic usage of the Rules module.
Drupal – Build Simple Workflow with Rules

Whenever a rule is fired, you can add some conditions to validate if the actions should be run. And you can even setup a PHP code condition for rule. But this feature required the PHP Filter in the Drupal Core modules.
Continue reading Drupal – Enable Custom PHP Code Condition for Rules