Drupal7

DrupalD's picture

Drupal : Send Ubercart PayPal payment to node author

This CodeLet alter the 'uc_paypal_wps_email' variable when PayPal payment is enabled with Ubercart & sets to node author's PayPal account email address.
This requires creating a field on user's account with name 'PayPal Email' (field_paypal_email).

DrupalD's picture

Drupal: Create Drupal7 node Programmatically

This CodeLet will read data from an external API, parse the JSON response & build a node of specific type. It imports taxonomies & images as well.
The fascinating thing about this CodeLet is, it can import data to multi - value node fields, including multi widget fields & different field types.

DrupalD's picture

Drupal7: JSON, hook_form_alter & hook_menu

This CodeLet demonstrates the use of hook_form_alter & hook_menu.
Using hook_form_alter, a text field is added to site information page. Once a API key is saved, the button has value 'Update configuration'
Using JSON menu, one can pull a node of type page, as JSON string.

Pages

QR code for this page URL This page URL
Feedback